Commit Graph

193 Commits

Author SHA1 Message Date
hanishkvc f3424d3a2a SimpleChatTCRV:Cleanup: Efficient ChatMessage Ui Delete
avoid refreshing the full chat session messages ui

also Update readme
2025-12-04 19:41:39 +05:30
hanishkvc 95f79eb8b0 SimpleChatTCRV:CleanUp: Refresh chat ui, if user empty submits
This ensures that the tool call edit/trigger is reshown, when user
submits a empty response and the logic stops from going ahead.
2025-12-04 19:41:39 +05:30
hanishkvc efcd81aa2f SimpleChatTCRV:SimpleProxy:DumpHeaders 2025-12-04 19:41:39 +05:30
hanishkvc e731d29dc9 SimpleChatTCRV:Cleanup:Delete keeps view around adjacent messages
Rename to get_chatmessage_index.

Return the index of the chatmessage deleted.

Add a scroll element into view helper.

Now the UniqId wrt the ChatMessage is stored as a attribute
wrt the corresponding chatmessage block. And same used wrt
scrolling after deleting messages.

When a chat message is deleted, previously the screen would have
moved to last message in the chat session, now it tries to remain
wrt adjacent messages on the screen.
2025-12-04 19:41:39 +05:30
hanishkvc c0dbc1d59c SimpleChatTCRV:ChatMessage:Copy using PopOver menu & navigator
Currently only the text/content part is handled wrt copy. Image
URL isnt handled, even if present.
2025-12-04 19:41:39 +05:30
hanishkvc 70a163fd18 SimpleChatTCRV:CMPopOver:Relative positioning - P1
Use position fixed followed by using position-area so that one
can use anchor passed through showPopover.

Avoid the hidePopover from mouseLeave, because as the mouse moves
over the poped up popover ui, the mouseLeave will be called on
the chat message block/container. And that would have closed the
popover and inturn mouseEnter would have got called on ChatMsg,
given now with the popover hidden, the ChatMsg block is directly
accessible. So this leads to twinkling / toggling ie continues
show/hide of the popover.

Inturn in mouseEnter itself decide when to close the previous
popover (ie if the chatmessage id is different from what it was
before).
2025-12-04 19:41:39 +05:30
hanishkvc 62fb992e0e SimpleChatTCRV:CMPopOver: show within chatmessage, del logic
Trap the mouseenter and mouseleave events wrt the chatmessage
block to show the chatmessage-popover ui inturn within the
corresponding chatmessage.

When ever user clicks the popover menu's delete button, the
uniqId associated with each chat message, is now used to
delete the user selected chat message.

Initial skeleton wrt clipboard copy.
2025-12-04 19:41:39 +05:30
hanishkvc 1d2ef9dddb SimpleChatTCRV:ChatMessage: UniqId, Delete logic, edit popover ui 2025-12-04 19:41:39 +05:30
hanishkvc a2a0a378a9 SimpleChatTCRV: Response handling try catch, update errors
Had forgotten to move the one shot resp into try catch before.
Fixed it. Ensure both oneshot multipart resp try catch

Add some todos for later.

Add a new check wrt response being normal or a error related one
ie the content is actually a error message.
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 ca8e6ab1a6 SimpleChatTCRV:iDB:GetKeys: helps decide whether restore btn shown 2025-12-04 19:41:39 +05:30
hanishkvc 570131943f SimpleChatTCRV:iDB:Add Put/Get; SimpleChat Save/Load using iDB
Added put and get helpers wrt indexedDB.

Updated save and load related logics in SimpleChatTCRV.
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 29c2bafec8 SimpleChatTCRV:HandleUserSubmit:details of internaly caught exc
If a caught error had chained in details about what triggered it
in the 1st place, then show it also to user.
2025-12-04 19:41:39 +05:30
hanishkvc 13c1c9d285 SimpleChatTCRV:Vision: DataUrl helpers
Move all dataUrl handling into helper functions.

So that its manipulation is done in a controlled manner, as well as
in future, changes to the semantic can be easily carried out by
updating the helper functions suitably and inturn updating the caller
as needed.

For now avoid push and pop and work with 0th index directly, given
that currently the logic is setup for handling only a single image
with the ai model. This keeps things simple. It can be changed if
required in future easily.
2025-12-04 19:41:39 +05:30
hanishkvc 4e4dc30ffe SimpleChatTCRV:Vision:HandleUserSubmit: Ensure cleanup even early
There can be issue with chat.add->chat.save, in that trying to
store into localStorage or so can raise exception, like quota
exceeded and so.

So now trap chat.add also and inturn for now take care of clearing
image state while also trapping and rethrowing a new error which
identifies the above location, as well as tracks the original err
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 8d762fcf3f SimpleChatTCRV:Vision:Show images as part of the message 2025-12-04 19:41:39 +05:30
hanishkvc a6b5555fe5 SimpleChatTCRV:Submit: Remember to include image, if available
Also rename the id/label of InFile+Btn to Image.

Extra fields while Adding.
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 dfba64e0ae SimpleChatTCRV:Vision: Create needed MixedContent b4 nw handshake 2025-12-04 19:41:39 +05:30
hanishkvc 72f62eed0f SimpleChatTC:Vision: take care of image_url wrt newFrom & load 2025-12-04 19:41:39 +05:30
hanishkvc 5db6f927df SimpleChatTC:Vision: Prepare NSChatMessage for Text &| Image
Avoid directly accessing content field, from any place other than
where it is absolutely requried.

Add a bOverwrite field to the content_adj helper, so that one can
overwrite instead of appending passed content to whats already in.

* this is currently used only wrt
  * promote_tooltemp helper
  * trim garbage helper
* the oneshot could ideally use overwriting, but currently
  not doing as this flow will occur only once per message

Add a image_url field for the image url with image data in dataurl
format with base64 encoded image data.
2025-12-04 19:41:39 +05:30
hanishkvc 8079618c85 SimpleChatTC:Alert end user in case emtpy message to ai
Currently the logic doesnt allow user to send a empty message to
ai, during their term. Previously this path wasnt directly alerting
the end user. Now it informs the end user using placeholder property
so they can see the alert, while also ensuring that once user enters
something, the alert wont interfere.

The logic takes care of saving any original placeholder, so that
the same is restored, when user switches sessions.
2025-12-04 19:41:39 +05:30
hanishkvc fe0cc8bef1 SimpleChatTC:NSChatMessage: fix up initial go
Allow for empty tool call results

Block no content response from user role only.

Also change for console.debug to console.log so people can
see the blocking of empty response from user, in the browser
console.
2025-12-04 19:41:39 +05:30
hanishkvc b4aaf5bd1b SimpleChatTC:NSChatMessage:Tool role newFromOld and load fixup
Had forgotten to update these two functions wrt the tool response
related new fields. This is fixed now.

Also show tool-call-id and tool-name to end user as part of chat
message showing.

ALERT on disk structure change old saves wont work esp wrt tool
responses
2025-12-04 19:41:39 +05:30
hanishkvc b9defe2843 SimpleChatTC:NSChatMessage: Handle edits by user wrt tool response 2025-12-04 19:41:39 +05:30
hanishkvc 3d4f84947a SimpleChatTC:NSChatMessage:ToolResponse show handling
Given that the user query box no longer includes the special xml
string wrt tool response data (TOOL.TEMP ROLE), so now instead set
a special attribute to indicate that user query/input box is
maintaining a tool response.

For regular Tool responses in the chat session, now show the tool
call id and tool name before the tool response data (ie content
field).
2025-12-04 19:41:39 +05:30
hanishkvc b251f7de7c SimpleChatTC:NSChatMessage with tool response/result fields
Add a new static helper to create a ChatMessageEx for a given
tool response data.

Use the same when storing tool response in the chat session msgs
list.

This inturn avoids the need for creating a xml string with all
the fields corresponding to tool response. So also no need to
extract the individiual tool response fields from the all-in-one
xml string and populate the tool response fields in the network
structure equivalent ns data structure, when recent_chat_ns is
called.
2025-12-04 19:41:39 +05:30
hanishkvc 7a61ca6aac SimpleChatTC:NSChatMessage: MultiChatUI and beyond updated for same
TODO: individual tool/function calls from tool_calls field, accessed
using different methods in different places for now. Need to think
on which is the best method to retain and use everywhere and or
retain things as is.
2025-12-04 19:41:39 +05:30
hanishkvc 9bd754d594 SimpleChatTC:NSChatMessage: Update SimpleChat to use same
Remove the load from disk support that was previously retained
wrt the old on-disk-storage format for the chat session messages.

Make a note to allow non ai server handshake roles to be maintained
wrt NSChatMessage. Add helper to cross check if a message belongs
to such temp roles or not.

Update SimpleChat class to make use of the new NSChatMessage based
needed flow.
2025-12-04 19:41:39 +05:30
hanishkvc 70b754c5a6 SimpleChatTC:NSChatMessage class driven wrt ChatMessageEx
NSChatMessage implements the undefined based flow and provides
helpers to check if any of the field like content or reasoning
or tool_calls is available in the chat message or not.

It also provides helpers to get the corresponding fields.

ChatMessageEx updated to make use of NSChatMessage.
2025-12-04 19:41:39 +05:30
hanishkvc b2d53c1e14 SimpleChatTC:ChatMessage undefined driven
Switch from empty strings or empty list and so to undefined.

undefined will be treated by Javascript and JSON to mean, not even
instantiated and also dont instantiate the same
2025-12-04 19:41:39 +05:30
hanishkvc 272e2689f7 SimpleChatTC:Get body also for Not Ok responses from ai server
Rather a chat with gpt-oss generated a assistant response which
included chat-content, chat-reasoning and chat-toolcall all in the
same response. On responding to same with tool call result, the
server http handshake responded with a 500 Internal server error,
So added this to get more details in this case, as well as in
general for future.
2025-12-04 19:41:39 +05:30
hanishkvc c0f7c8654e SimpleChatTC:ShowToolCall: Trap invalid args generated by GenAi 2025-12-04 19:41:39 +05:30
hanishkvc f7cff8232d SimpleChatTC:TCPending: Clear pending in unhappy paths
ie if exception raised during tool call execution and or time out
occurs
2025-12-04 19:41:39 +05:30
hanishkvc 4d71ded5df SimpleChatTC:ToolsManager: Instantiate in Me and Use
Rename Tools to ToolsManager to convey its semantic better.

Move setup of workers onmessage callback as well as directly passing
result to these callbacks into ToolsManager.

Now that Workers have been moved into ToolsManager, and ToolsManager
has been instantiated as a member of Me, use the same in place of
prev workers of Me.
2025-12-04 19:41:39 +05:30
hanishkvc 0e7fe8bcf2 SimpleChatTC:MeInTools: WebWorkers in Me
Given that Me is now passed to the tools logic during setup, have
the web worker handles in Me itself, instead of in tool related
modules.

Move setup of web worker related main thread callbacks, as well as
posting messages directly to these main thread callbacks, into Me.
2025-12-04 19:41:39 +05:30
hanishkvc d56a4a06b0 SimpleChatTC:Cleanup:Make main chat related classes importable
Have main classes defined independent of and away from runtime flow

Move out the entry point including runtime instantiation of the
core Me class (which inturn brings other class instances as neede)
into its own main.js file.

With this one should be able to import simplechat.js into other
files, where one might need the SimpleChat or MultiChat or Me class
definitions.
2025-12-04 19:41:39 +05:30
hanishkvc 0fcb13257c SimpleChatTC:UI:ClearChat, Unicode icons for Clear, settings
Allow user to clear the existing chat. The user does have the
option to load the just cleared chat, if required.

Add icons wrt clearing chat and settings.
2025-12-04 19:41:39 +05:30
hanishkvc c5ff065ad2 SimpleChatTC:Cleanup in general
Update readme wrt searchDrops, auto settings ui creation

Rename tools-auto to tools-autoSecs, to make it easy to realise
that the value represents seconds.
2025-12-04 19:41:39 +05:30
hanishkvc f75bdb0e00 SimpleChatTC:WebTools And Search - headers and search drops - js
Allow the web tools handshake helper to pass additional header
entries provided by its caller.

Make use of this to send a list of tag and id pairs wrt web search
tool. Which will be used to drop div's matching the specified id.
2025-12-04 19:41:39 +05:30
hanishkvc 7fce3eeb2a SimpleChatTC:SettingsDefault:Enable cache prompt api option 2025-12-04 19:41:39 +05:30
hanishkvc e6fd0ed05a SimpleChatTC: ToolCalling enabled, Sliding window adjust
Chances are for ai models which dont support tool calling, things
will be such that the tool calls meta data shared will be silently
ignored without much issue.

So enabling tool calling feature by default, so that in case one
is using a ai model with tool calling the feature is readily
available for use.

Revert SlidingWindow ChatHistory in Context from last 10 to last 5
(2 more then origianl, given more context support in todays models)
by default, given that now tool handshakes go through the tools
related side channel in the http handshake and arent morphed into
normal user-assistant channel of the handshake.
2025-12-04 19:41:39 +05:30
hanishkvc 8501759f60 SimpleChatTC:Cleanup:UsageNote, Initial SettingsInfo shown
Usage Note
* Cleanup / fix some wording.
* Pick chat history handshaked len from config

Ensure the settings info is uptodate wrt available tool names
by chaining a reshowing with tools manager initialisation.
2025-12-04 19:41:39 +05:30
hanishkvc a4483e3bc7 SimpleChatTC:Cleanup Usage Note and its presentation a bit
Make it a details block and update the content a bit
2025-12-04 19:41:39 +05:30
hanishkvc e10a826273 SimpleChatTC: Cleanup - remove older now unused show chat logic 2025-12-04 19:41:39 +05:30
hanishkvc d3a893cac9 SimpleChatTC:Update notes 2025-12-04 19:41:39 +05:30
hanishkvc c21bef4ddd SimpleChatTC:Fixup auto toolcall wrt newer ChatShow flow
This is a initial go wrt the new overall flow, should work, but
need to cross check.
2025-12-04 19:41:39 +05:30
hanishkvc 8bc7de4416 SimpleChatTC:TC Result truncating only if needed
As I was seeing the truncated message even for stripped plain text
web acces, relooking at that initial go at truncating, revealed
a oversight, which had the truncation logic trigger anytime the
iResultMaxDataLength was greater than 0, irrespective of whether
the actual result was smaller than the allowed limit or not,
thus adding that truncated message to end of result unnecessarily.
Have fixed that oversight

Also recent any number of args based simpleprox handshake helper
in toolweb seems to be working (atleast for the existing single
arg based calls).
2025-12-04 19:41:39 +05:30
hanishkvc e077f23f9e SimpleChatTC:Pdf2Text: Refine desc and MaxResultDataLength
Needed to tweak the description further for the ai model to be
able to understand that its ok to pass file:// scheme based urls

Had forgotten how big the web site pages have become as also the
need for more ResultDataLength wrt one shot PDF read to get
atleast some good enough amount of content in it with large pdfs
2025-12-04 19:41:39 +05:30
hanishkvc 21544eaf87 SimpleChatTC:ResultMaxDataLength, Desc
Allow user to limit the max amount of result data returned to ai
after a tool call.

Inturn it is set by default to 2K.

Update the pdf2text tool description to try make the local file
path support more explicit
2025-12-04 19:41:39 +05:30
hanishkvc 6a8ced244c SimpleChatTC:Raise Error on Ai Chat server handshake NotOk resp 2025-12-04 19:41:39 +05:30
hanishkvc 91f39b7197 SimpleChatTC:Move chat server handshake to SimpleChat 2025-12-04 19:41:39 +05:30
hanishkvc 482517543b SimpleChatTC:Seperate out actual nw handshake - initial go
move the actual chat handshake with ai server into a seperate code
to an extent.

also initial anchor to trap handshake http error responses

Rather come to think of it, its better to move this into SimpleChat
class.

Use finally to ensure any needed cleanup for handle_user_submit
occurs within itself.
2025-12-04 19:41:39 +05:30
hanishkvc 9e9016f7fe SimpleChatTC:UICleanup: WordBreaks, Print avoid side vertical
Define rules to ensure that chat message contents wrap so as to
avoid overflowing beyond the size of the screen being viewed.

The style used for chat message role to be placed with vertical
oriented text adjacent to the actual message content on the side
seems to be creating issue with blank pages in some browsers,
so avoid that styling when one is printing.
2025-12-04 19:41:39 +05:30
hanishkvc f3593a9611 SimpleChatTC:ShowMessage:Show any number of toolcalls
Also make reasoning easily identifiable in the chat
2025-12-04 19:41:39 +05:30
hanishkvc 41ef449db1 SimpleChatTC:ShowMessage: Seperate out the content parts 2025-12-04 19:41:39 +05:30
hanishkvc 2f07288e40 SimpleChatTC:ShowMessage: containers, role, contents
Seperate out the message ui block into a container containing
a role block and contents container block.

This will allow themeing of these seperately, if required.
As part of same, currently the role has been put to the side
of the message with vertical text flow.
2025-12-04 19:41:39 +05:30
hanishkvc a4f247d730 SimpleChatTC:Cleanup:Move showing message into ShowMessage 2025-12-04 19:41:39 +05:30
hanishkvc 59effa6ea8 SimpleChatTC:Cleanup: tool resp xml, some allowed domains
Add a newline between name and content in the xml representation
of the tool response, so that it is more easy to distinguish things

Add github, linkedin and apnews domains to allowed.domains for
simpleproxy.py
2025-12-04 19:41:39 +05:30
hanishkvc cf06c8682b SimpleChatTC:Reasoning+: Update readme wrt reasoning, flow cleanup
Also cleanup the minimal based showing of chat messages a bit

And add github.com to allowed list
2025-12-04 19:41:39 +05:30
hanishkvc 937aa57528 SimpleChatTC:MultiChatUI:ChatShow cleanup of Initial skeleton
Fix up the initial skeleton / logic as needed.

Remember that we are working with potentially a subset of chat
messages from the session, given the sliding window logic of
context managing on client ui side, so fix up the logic to use
the right subset of messages array and not the global xchat
when deciding whether a message is the last or last but one,
which need special handling wrt Assistant (with toolcall) and
Tool (ie response) messages.

Moving tool call ui setup as well as tool call response got ui
setup into ChatShow of MultiChatUI ensures that switching between
chat sessions handle the ui wrt tool call triggering ui and tool
call response submission related ui as needed properly.

Rather even loading a previously auto saved chat session if it had
tool call or tool call response to be handled, the chat ui will be
setup as needed to continue that session properly.
2025-12-04 19:41:39 +05:30
hanishkvc 2cc10f6705 SimpleChatTC:MultiChatUI.ChatShow: Mov SimpleChat.Show in -initial
Also take care of updating the toolcall ui if needed from within
this.
2025-12-04 19:41:39 +05:30
hanishkvc 62bce9ebfb SimpleChatTC:Show: Cleanup
Update existing flow so that next Tool Role message is handled
directly from within
2025-12-04 19:41:39 +05:30
hanishkvc 47d9550131 SimpleChatTC:Reasoning: Cleanup the initial go
Rather simplify and make the content_equiv provide a relatively
simple and neat representation of the reasoning with content and
toolcall as the cases may be.

Also remove the partial new para that I had introduced in the
initial go for reasoning.
2025-12-04 19:41:39 +05:30
hanishkvc dbb5512b20 SimpleChatTC:Reasoning: Initial Go 2025-12-04 19:41:39 +05:30
hanishkvc 734beb08f5 SimpleChatTC:ChatSessionID through the tool call cycle
Pass chatId to tool call, and use chatId in got tool call resp,
to decide as to to which chat session the async tool call resp
belongs and inturn if auto submit timer should be started if auto
is enabled.
2025-12-04 19:41:39 +05:30
hanishkvc 13d312fe0d SimpleChatTC:ToolTemp: Ensure add removes non promoted ToolTemp 2025-12-04 19:41:39 +05:30
hanishkvc 4eb3322017 SimpleChatTC:ToolCallErrPath:ToolTemp and MultiChatUIChatShow
Update the immidiate tool call triggering failure and tool call
response timeout paths to use the new ToolTemp and MultiChatUI
based chat show logics.

Actual tool call itself generating errors, is already handled
in the previous commit changes.
2025-12-04 19:41:39 +05:30
hanishkvc e79faebde1 SimpleChatTC:ToolTemp and ChatShow
Add a new role ToolTemp, which is used to maintain any tool call
response on the client ui side, without submitting it to the server
ie till user or auto submit triggers the submitting of that tool
call response.

When ever a tool call response is got, create a ToolTemp role based
message in the corresponding chat session. And dont directly update
the user query input area, rather leave it to the updated simplechat
show and the new multichatui chat_show helper and inturn whether the
current chat session active in ui is same as the one for which the
tool call response has been recieved.

TODO: Currently the response message is added to the current
active chat session, but this needs to be changed by tracking
chatId/session through the full tool call cycle and then adding
the tool call response in the related chat session, and inturn
updating or not the ui based on whether that chat session is
still the active chat session in ui or not, given that tool call
gets handled in a asynchronous way.

Now when that tool call response is submitted, promote the equiv
tool temp role based message that should be in the session's chat
history as the last message into becoming a normal tool response
message.

SimpleChat.show has been updated to take care of showing any
ToolTemp role message in the user query input area.

A newer chat_show helper added to MultiChatUI, that takes care of
calling SimpleChat.show, provided the chat_show is being requested
for the currently active in ui, chat session. As well as to take
care of passing both the ChatDiv and elInUser. Converts users of
SimpleChat.show to use MultiChatUI.chat_show
2025-12-04 19:41:39 +05:30
hanishkvc 0552ff9098 SimpleChatTC:SimpleProxy:ClientUI: Send Authorization bearer
User can configure the bearer token to send
2025-12-04 19:41:39 +05:30
hanishkvc 044d1cf535 SimpleChatTC:tools.proxyUrl: rename to just proxyUrl
Next will be adding a proxyAuth field also to tools.
2025-12-04 19:41:39 +05:30
hanishkvc a1b33ecd1c SimpleChatTC:ToolCallResponseTimeout: Allow end user to control
Moved it into Me->tools, so that end user can modify the same as
required from the settings ui.

TODO: Currently, if tc response is got after a tool call timed out
and user submitted default timed out error response, the delayed
actual response when it is got may overwrite any new content in
user query box, this needs to be tackled.
2025-12-04 19:41:39 +05:30
hanishkvc de6f370d3b SimpleChatTC:ToolCall:SearchWebText using UrlText
Initial go at implementing a web search tool call, which uses the
existing UrlText support of the bundled simpleproxy.py.

It allows user to control the search engine to use, by allowing
them to set the search engine url template.

The logic comes with search engine url template strings for
duckduckgo, brave, bing and google. With duckduckgo set by default.
2025-12-04 19:41:39 +05:30
hanishkvc fb968347b0 SimpleChatTC:AutoToolCalls: Track and clear related timers
also cleanup the existing toolResponseTimeout timer to be in the
same structure and have similar flow convention.
2025-12-04 19:41:39 +05:30
hanishkvc 45f9db9963 SimpleChatTC:Auto tool calling control to end user
Instead of enforcing always explicit user triggered tool calling,
now user is given the option whether to use explicit user triggered
tool calling or to use auto triggering after showing tool details
for a user specified amount of seconds.

NOTE: The current logic doesnt account for user clicking the buttons
before the autoclick triggers; need to cancel the auto clicks, if
user triggers before autoclick, ie in future.
2025-12-04 19:41:39 +05:30
hanishkvc dbb24fec77 SimpleChatTC:ToolResponse: Use browser dom for xml/html safe
Instead of simple concatenating of tool call id, name and result
now use browser's dom logic to create the xml structure used for
now to store these within content field.

This should take care of transforming / escaping any xml special
chars in the result, so that extracting them later for putting
into different fields in the server handshake doesnt have any
problem.
2025-12-04 19:41:39 +05:30
hanishkvc 74226a0992 SimpleChatTC:ToolCall response relaxed handling
Use DOMParser parseFromString in text/html mode rather than text/xml
as it makes it more relaxed without worrying about special chars
of xml like & etal
2025-12-04 19:41:39 +05:30
hanishkvc aac5213104 SimpleChatTC:Tools: Show available tool names
Dont allow tool names to be changed in settings page
2025-12-04 19:41:39 +05:30
hanishkvc aa8c8040cf SimpleChatTC:Cleanup:ChatProps: apiEP 2025-12-04 19:41:39 +05:30
hanishkvc ad65659a63 SimpleChatTC:Cleanup:ChatProps: bTrimGarbage
Also remove more inner/detailed stuff from show info in not bAll
mode, given that many of the previous differentiated stuff have
been moved into chatProps and inturn shown for now
2025-12-04 19:41:39 +05:30
hanishkvc 82be13aa33 SimpleChatTC:Cleanup:ChatProps: bCompletionInsertStandardRolePrefix 2025-12-04 19:41:39 +05:30
hanishkvc 734f74c908 SimpleChatTC:Cleanup:ChatProps: bCompletionFreshChatAlways
Moved into Me.chatProps
2025-12-04 19:41:39 +05:30
hanishkvc 78ccca056f SimpleChatTC:Cleanup:ChatProps: iRecentUserMsgCnt
Update Me class

Update show settings

Update show props info

Update readme
2025-12-04 19:41:39 +05:30
hanishkvc 7409b29862 SimpleChatTC:Cleanup:ChatProps: Move bStream into it 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 3e490cefc5 SimpleChatTC:Cleanup: Move bTools and toolFetchProxyUrl into tools
Also update the readme wrt same and related
2025-12-04 19:41:39 +05:30
hanishkvc 303af1800e SimpleChatTC:ShowInfo:Clean up layout of showing of props data
Also ensure when switching between sessions, the full set of props
info is shown.
2025-12-04 19:41:39 +05:30
hanishkvc 0e21d67e8a SimpleChatTC:ShowInfo: Allow showing minimal info set, if needed 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 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 2a94cb3786 SimpleChatTC:Fetch:Proxy URL rename and in settings 2025-12-04 19:41:39 +05:30
hanishkvc 8ca77e455a SimpleChatTC:NonStreaming: Update oneshot mode wrt tool calls
Take care of the possibility of content not being there as well as
take care of retrieving the tool calls for further processing.

With this tool calls should work in non streaming mode also
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 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 3718a39c06 SimpleChatTC:Use generic obj props edit for settings in general
Bring more user controllable properties into this new settings ui
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