Commit Graph

20 Commits

Author SHA1 Message Date
hanishkvc dc71a9be4c SimpleChatTCRV:Remember to reset the Input File type value 2025-12-04 19:41:39 +05:30
hanishkvc 18b94482c5 SimpleChatTCRV:InputFileDialog:AcceptList:Images:Jpeg and Png
Allow passing the accept list for file type input element helper.

Inturn given that currently it is used for the image selection
for vision models, set it to jpeg and png in the caller for the
same.
2025-12-04 19:41:39 +05:30
hanishkvc f8af792dc2 SimpleChatTCRV:UICleanup: ObjInfo dClassNames
Distinguish between top level and remaining levels.

More flexibility and also cleaner flow
2025-12-04 19:41:39 +05:30
hanishkvc dac97c1e8f SimpleChatTCRV:UI Cleanup: DetailsNotDiv Current settings info
So that we dont overload users with the details by default, but
user can open or close the block of current settings info details.
2025-12-04 19:41:39 +05:30
hanishkvc 4ee6e271fb SimpleChatTCRV:Vision:Show user image selection in btn
Add a new helper to create a file type input which includes a btn
with image. Use same wrt the user image selection button.

Update button creation helper to show innerText only if the newly
added innerHTML arg is undefined.

When ever user makes a image selection, the image will be shown
in the input-filetype-image-button. In turn when the same is
submitted to ai engine server, the image will be cleared.
2025-12-04 19:41:39 +05:30
hanishkvc 930fd656b9 SimpleChatTCRV:Basic skeleton to load a dataUrl 2025-12-04 19:41:39 +05:30
hanishkvc a54fa472dd SimpleChatTC:ShowObjPropsEdit:Any depth trapping of ui setup - t2
Fix up the oversights wrt any depth trapping flow

Remember to start the propWithTree being checked/trapped with :
to indicate the root of the prop hierarchy and also use : as sep
between the elements of the props hierarchy tree

Also had forgotten about the goof up possible with using in in a
condition statement to check for array to contain a entry of interest
in JS, fixed it now.
2025-12-04 19:41:39 +05:30
hanishkvc 8d7eb68712 SimpleChatTC:ShowObjPropsEdit:Any depth trapping of ui setup
Maintain the current property hierarchy to its root over recursive
calls.

Allow callers to specify the props to be trapped using the prop
hierarchy.

Pass the prop hierarchy to the fTrapper.

This should allow one to trap any prop wrt its editing ui setup,
irrespective of whether it is a prop of the main object passed,
or a member of a child prop of the main object passed or so ...

Update the setting up of ChatHistoryInCtxt and ApiEndPoint to follow
the new semantic/flow.
2025-12-04 19:41:39 +05:30
hanishkvc b19e754322 SimpleChatTC:Cleanup:Rename func arg to match semantic better 2025-12-04 19:41:39 +05:30
hanishkvc 03426f0276 SimpleChatTC:Cleanup:EditObjProps: rename vars followingConvention
Part 1 - add el prefix wrt the element handle related vars
2025-12-04 19:41:39 +05:30
hanishkvc fc26e47222 SimpleChatTC:ShowObjPropsInfo: Use sections to indicate relations
Also create a top level div wrt whole. And allow class to be
specified for the same as well as the top level legend, optionally
2025-12-04 19:41:39 +05:30
hanishkvc 24ba85026e SimpleChatTC:ShowInfo: Make logic recursive, avoid JSON.stringify 2025-12-04 19:41:39 +05:30
hanishkvc 34b2beea1a SimpleChatTC:ShowInfo: Create and use common automated info show
Also fetch info from ai-server, and place path and ctx size into
current Me instance and include in show info.
2025-12-04 19:41:39 +05:30
hanishkvc 3e0cf2a2df SimpleChatTC:ObjPropsEdit: Obj within Obj aware fRefiner
Use same to set a placeholder for Authorization entry in headers
2025-12-04 19:41:39 +05:30
hanishkvc f874c69983 SimpleChatTC:UiShowObjPropsEdit allow refining 2025-12-04 19:41:39 +05:30
hanishkvc 6253c717b3 SimpleChatTC:Trappable UiShowObjPropsEdit for custom handling
Use it to handle apiEP and iRecentUserMsgCnt in more user friendly
way, where they get a selection to choose from.
2025-12-04 19:41:39 +05:30
hanishkvc 756b128539 SimpleChatTC:UI:ObjPropEdits handle objects, use for gMe 2025-12-04 19:41:39 +05:30
hanishkvc b771e42dc1 SimpleChatTC:UI:Common helper to edit obj members of few types
Make the previously relatively generic flow wrt apiRequestOptions
settings into a fully generic reusable by others flow.

Rather had stopped short of it, when previously moved onto other
things at that time.
2025-12-04 19:41:39 +05:30
hanishkvc 6e5b532313 SimpleChatTC:UI: el_get/el_set to avoid warnings 2025-12-04 19:41:39 +05:30
Diego Devesa 1d36b3670b
llama : move end-user examples to tools directory (#13249)
* llama : move end-user examples to tools directory

---------

Co-authored-by: Xuan Son Nguyen <son@huggingface.co>
2025-05-02 20:27:13 +02:00
Renamed from examples/server/public_simplechat/ui.mjs (Browse further)