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.
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.