Commit Graph

5 Commits

Author SHA1 Message Date
hanishkvc fe0e118a6b SimpleChatTCRV:ToolCall:ExternalAi: Show its response live
Include the DivStream of ExternalAi toolcall in the other chat
session UIs, so that user can see what the external_ai toolcall
is doing, without having to switch out to external ai session tab.

Update the name of the tool call external ai session.

Ensure to clear previous chat session wrt external ai tool calls
As the ai may call external ai toolcall with the same system
prompt sometimes, which wont trigger the autoclear logic, wrt
the corresponding chat session.

TODO: In future maybe provide a option to continue any previous
chat session if the system prompt is not changed wrt external ai
toolcall.
2025-12-04 19:41:40 +05:30
hanishkvc 17de6d4a47 SimpleChatTCRV:DivStreams: Have sep div for each chat session
For reasons mentioned in last commit

Also include removing and reappending the chat session specific
div in uirefresh.
2025-12-04 19:41:40 +05:30
hanishkvc 08d165427b SimpleChatTCRV:DivStream: Allow predetermined div for streamd resp
This will help ensure that switching sessions etal wont lead to
loosing handle to sessions that one exited from, with additional
logic to be added later.

Rather I am thinking, maybe it may make more sense to dynamically
pick the currently active chat sessions latestResponse field to
inturn show into a div element at end of the elDivChat.

On thinking further, maybe making elDivStream into elDivStreams
with seperate div for each session is the better thing, as the
SC.handle_response will be able to update its corresponding div
and the session switch can link the currently visible session's
div to be mapped to elDivChat.

NOTE: Rather this commit in itself should take care of the current
normal flow, which wont allow user to switch sessions when a tool
call or handshake with server is pending. However in future if
I want the ui to be freely switched independent of if a tool call
or server handshake is active, then I need the logic mentioned in
previous para.
2025-12-04 19:41:40 +05:30
hanishkvc 5025001bd4 SimpleChatTCRV:ToolCall Ai - Decouple SimpleChat from Me a bit
Had a custom struct for parts of Me needed by SimpleChat, and inturn
that need to be controlled when starting a independent parallel ai
session. For now if chat streaming is used or not and tools is enabled
or not is allowed to be explicitly controlled when handle_chat_hs is
called.

Inturn when toolai triggers the parallel ai session, it disables
tools calling support wrt this child/external ai tool call. Else
even the external ai session may end up triggering tool call wrt
external ai for the same job and thus get into a infinite recursive
loop.

Also
* update the toolai meta data a bit.
* increase time allowed for toolcall to return a response, especially
  usefull for external_ai tool call.

Cleanup some old notes and update readme in general.
2025-12-04 19:41:40 +05:30
hanishkvc 18529445ce SimpleChatTCRV:ToolCall:ExternalAi: initial go 2025-12-04 19:41:40 +05:30