If user explicitly makes a content text format selection, the
same will be used.
Else based on session settings, a format will be used.
Now when the popover menu is shown, the current message's format
type is reflected in the popover menu.
Given that now fetch_web_url_raw can also fetch local files, if local
file access scheme is enabled in simpleproxy.py, so rename this
tool call by dropping web from its name, given that some ai models
were getting confused because of the same.
User can enable or disable the simple minded bruteforce markdown
parsing from the per session settings.
Add grey shading and align text to left wrt table headings of
markdown to html converted tables.
By default ensure external_ai tool call related special chat session
starts with tool calls disabled and client side sliding window of 1.
Add a helper in SimpleChat class to set these along with clearing of
any chat history.
Inturn now give the user flexibility to change this from within
the program, if they need to for what ever reason, till the program
restarts.
Gives quick overview of the features, given that the original readme
(now docs/details.md++) got created over a period of disjoined time
as features got added.
Ensure we are working with the Chat Messages in Chat session, which
are in the currently active sliding window.
Remove any chat message blocks in the chat session ui, which are
no longer in the sliding window of context.
This brings uirefresh semantic to be in sync with chat_show logic
Rename the default 2 chat session names to make them neutral.
Update internal name to include AnveshikaSallap, better matching
the semantic of the logic, given support for tool calling, vision,
reasoning, ...
Also update usage note wrt simpleproxy.py for web access related
tool calls and few other minor tweeks.
Ensure toolNames array is reset, each time setup is called, so
that it doesnt end up with duplicate entries and equally dont
end up with entries of tool calls which are no longer available,
maybe because some config changed etal.
Ensure the ChatId is logged wrt the toolweb related setup actions.
Ensure that ExternalAi tool call related chat session, has its
tools config disabled, when its created itself, so that end user
doesnt get confused, given that external_ai toolcall explicitly
forces tools support to disabled.
Update some of the notes and readme
Given that ValidatedToolCallTrigger UI setup has to also setup
the auto trigger logic, which inturn is dependent on the autosecs
value in the Config associated with the Chat session involved, so
pass chatId to ShowMessage and inturn ValidatedToolCallTriggerUI
setup logic
Rename the function name to better match the semantic.
Update the external ai tool call description to indicate that it
doesnt have access to internet or tool calls.
Update the sys_date_time description and avoid the confusion caused
to some ai wrt the template string as to whether it is optional or
required and wasting reasoning time around it. Now simply state that
it is a reqd argument, and suggest the internal default template as
a useful one to use.
Update the msg returned by data store tool calls, to make them less
verbose (ie avoid duplicating key list or got key data) while also
more informative (ie num of keys, data length)
Update the readme.
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.
Missing DivStream caught. Logic ready for a distant future,
where one may allow the chat session to be switched even
if there is a pending ai server / tool call response.
Avoids the unneeded removeChild before calling appendChild.
Also found the reason why sometimes the DivStream was missing
from DivChat. Rather when I switched from the transient <p>
element to the persistant session specific <div> elements,
I had forgotten to convert the flow fully, rather I had
forgotten to replace the elP.remove() with elP.replaceChildren
Also retaining that debug log wrt missing DivStream path, Just
in case for now, to cross check once later, I havent missed
any other path.
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.
Also had forgotten to rename to image_urls, when switching from
single image with its corresponding field image_url to image_urls,
wrt removing the same after it has been added to the content array.
move sessions buttons div to heading block
and move program name to the default block added to chat div, if
there is no chat in a given chat session.
cleanup the default block helpers to follow a common pattern.
also make the chat message bubbles/blocks bit more prominently box
shadowy
As firefox doesnt seem to currently support anchor based relative
positioning of the popover, so explicitly set the position of the
popover.
Also reposition the popover to be in the bottom right corner rather
than the previous top center position.
* Rather updated position-area css property ensures this automatically
wrt chrome browsers.
* while for firefox the explicit code that is added is needed.
NOTE: Had added that id, just in case firefox was goofing up bcas of
the element not having unique id or so, either way the firefox issue
is unrelated and more fundamental lack of support for now.
Add better visual cues wrt the tool call trigger block and the
user input block, and inturn remove the now unneeded horizontal
seperation line between chat messages block and the tool call
trigger block.
Bring in the user role color gradient to the full user input block
Change the TEMP roles to use -TEMP instead of .TEMP suffix, so
that role based css rules get applied without any complexity
that may inturn not get applied.
Avoid extra newlines in the err message returned by the tool call
workers. Given that now there is a proper tool call response
sent back to the ai backend/server, without using user and ai
text content block itself to maintain the tool call and its
response info (which is what this client was doing initially
and so more spacing was added to important parts to bring it
into better focus, just in case).
Now use javascript to trap the button click and inturn change css
class to hide or show the corresponding div.
This moving away from details with summary being the top level
title + buttons block, avoids the warning wrt non standard use of
details element, as well as gives a clear icon to end users wrt
toggling the sessions+systemprompt block.
Had forgotten to use ${} for variable within a literal template
string.
Had forgotten to use the full hierarchy of props when setting the
id of elements, which is useful to map a label to a button and so.
This would have led to the wrong button being clicked when a label
with duplicated id was clicked. Ie if two different objects within
a object, have properties/fields with the same name, then previously
this would have led to a bunch of labels and buttons or so having
the same id, bcas their hierarchy was not being accounted for. This
is fixed now.
Allow AutoCreated Object Properties Editing UI to be themed to an
extent by assigning a id to the top level element, which is based
on the legend specified.
Use the same to add inline padding as well as adjust border radius
wrt the elements within, for the Settings ui. And min height and
border width wrt input, select and buttons within.
Similarly for the default Usage,Restore and SettingsInfo summary
titles, avoid border-radius.
Show the string representation of the sliding window selected.
Add some padding to system prompt input.
Reduce fullbody height by a tiny bit so that everything fits within
the overall height of the screen available, without needing a dummy
no use vertical scrollbar for full body. Rather its hardcoded for
now, in a sense, need to look into all elements competing for vertical
space and see how to make this auto adapt responsively, if there is
any subtle issue beyond me going beyond 100vh.
Set scrollbar in general to thin and minimal contrast subdued look.
Change user gradiant to blue hue, also add a subtle whitish hue based
gradiant to assistant chat messages. Also make trimmed content bgnd
a gradiant.
Wrt print media target, instead of trying to change the body color
directly, use the global variable added for same, so that other elements
also adjust suitably wrt the change like gradiants merging seemlessly
into the changed overall background and so.
Allow the input textarea to grow vertically to an extent, while still
ensuring that it doesnt cross a limit which could lead to additional
full page scrollbar showing up.
Add a border-radius by default across elements. In turn add padding
wrt toolcall details block so that things dont get cutoff and appear
proper.
PopOver menu now auto closes, if user doesnt interact with it, for
a predefined timeout period.
Change the button border color, which seems to make it more pleasent
with current backgrounds at different places.
Update usage note wrt vision and click to toggle wrt title area.
Make the restore / load session block into a details based block.
Also place it into the parent div immidiately, but in hidden state.
Inturn only if a corresponding entry found in the db, create the
button for loading, as well as unhide it. This ensures that the
restore block's position|order doesnt change in the set of ui
elements wrt usage,restore,settings-info.
Have a common 1vmin radius wrt buttons in general and chat messages.
While the input area and its buttons have more rounded look.
Force a minimum height wrt the buttons in general, while ensuring
that the popover menu buttons tightly fit the content/icons in them.
ui_reset_userinput now resets role associated with user input to
user always.
chat_show now does a full on ui_reset_userinput, and thus inturn
session switching now force cleans up User Input area, state and
associated data (like dataURLs) with chat_show->ui_reset_userinput.
UIRefresh helper does a partial ui_reset_userinput thus cleaning
up the user input state. Inturn given that addsmart_uishow calls
uirefresh, so avoid calling partial ui_reset_userinput after call
to addsmart_uishow.
show_message now sets user input area role to either ToolTemp or
User (all cases other than ToolTemp).
Avoid chat_show getting called twice during starting.
Update description of sys_date_time to be more verbose
Update the readme DONE section, where I had few days back forgotten
and started making entries as parts of a item list or so.
Rename chatmsg_ui_refresh to chat_uirefresh.
Even in case of the delete path and inturn deleting one of the last
two messages in a chat session, now use the generified chat uirefresh
logic instead of the chat_show full session refresh / recreation of
the session ui
Inturn to make the uirefresh really generic and usable in all cases
including above case, now take care of clearing the tool call edit
/ trigger at the beginning, so that the last 2 messages decide in
turn whether to show a tool call edit/trigger ui or not, as well as
the tool call response edit / submit ui.
SC.add discards any temp role message and not just tool temp msg
New SC.add_smart which either adds a new message to the chat session
or replaces existing last message in the chat session, based on same
role or different, given that the chat session cant have the same
role type chat message occuring adjacent in it. Inturn rename MCUI
chatmsg_add_uishow to chatmsg_addsmart_uishow and use add_smart
* helps wrt trying to rerun a tool call with modified args or so.
Rather prev discard temp role messages in SC.add not good enough
as uniqId will change in its case.
Helps avoid adding duplicate ToolTemp messages in chat session ui
* can help if loading a prev chat session which ended in a user
message without a ai response. User can type in a new message
and continue that old chat session, with the new message, replacing
the old user message as well as initiating handshake with ai server
in a proper manner.
Replace MCUI chatmsg_ui_updateprev_appendlast with chatmsg_ui_refresh
which is a more generic flow, which takes care of updating the ui as
needed irrespective of if the specified set of messages are already
in the chat session ui or not. Also allows the caller to control how
many messages at the end need to be refreshed wrt ui.
If deleting a non last (and non just before last) message, then
just directly remove the corresponding chat message block from the
ChatSession UI and be done with it.
However if deleting the last (or just before last) message, then
one needs to decide on whether tool call edit/trigger ui is shown
or removed and so... and similarly wrt tool response edit/submit.
As position-area is not yet officially supported in firefox (its
only in nightly builds, as of now), so switching to the inset
block/inline start/end css properties.
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.