Commit Graph

10 Commits

Author SHA1 Message Date
hanishkvc 72a780e181 SimpleChatTCRV:UICleanup: ToolCall trigger and UserInput block
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).
2025-12-04 19:41:40 +05:30
hanishkvc 52cce3e5f7 SimpleChatTC:IDBHelper: Move core indexedDB helper as a module
ie opening db as well as a transaction to access a store within
the db.
2025-12-04 19:41:39 +05:30
hanishkvc 5935ecceca SimpleChatTC:DataStore:Cleanup:Msg, duplicate on routing side
Avoid the duplicate plumbing code and use a common ops plumbing
helper.

Remove args[key] oversight from DataStoreList msg on webworkr
2025-12-04 19:41:39 +05:30
hanishkvc 2d497069d2 SimpleChatTC:DataStore:list - web worker side logic
The basic skeleton added on the web worker side for listing keys.

TODO: Avoid duplication of similar code to an extent across some
of these db ops.
2025-12-04 19:41:39 +05:30
hanishkvc bd7f7cb72a SimpleChatTC:DataStore: Delete a record - the db web worker side 2025-12-04 19:41:39 +05:30
hanishkvc d80e438cfa SimpleChatTC:DataStore:Put, stringify undefined, readme
Update the descriptions of set and get to indicate the possible
corner cases or rather semantic in such situations.

Update the readme also a bit. The auto save and restore mentioned
has nothing to do with the new data store mechanism.
2025-12-04 19:41:39 +05:30
hanishkvc 2dad246d53 SimpleChatTC:DataStore: Dont ignore the error paths
And indexedDB add isnt the one to be happy with updating existing
key.
2025-12-04 19:41:39 +05:30
hanishkvc 4ad88f0da8 SimpleChatTC:DataStore:Eagerness to Wrong JSON conversions
In the eagerness of initial skeleton, had forgotten that the
root/generic tool call router takes care of parsing the json string
into a object, before calling the tool call, so no need to try
parse again. Fixed the same.

Hadnt converted the object based response from data store related
calls in the db web worker, into json string before passing to the
generic tool response callback, fixed the same.

- Rather the though of making the ChatMsgEx.createAllInOne handle
string or object set aside for now, to keep things simple and
consistant to the greatest extent possible across different flows.

And good news - flow is working atleast for the overall happy path
Need to check what corner cases are lurking like calling set on
same key more than once, seemed to have some flow oddity, which I
need to check later.

Also maybe change the field name to value from data in the response
to get, to match the field name convention of set. GPT-OSS is fine
with it. But worst case micro / nano / pico models may trip up, in
worst case, so better to keep things consistent.
2025-12-04 19:41:39 +05:30
hanishkvc 2f58542713 SimpleChatTC:DataStore: Duplicate tooljs to tooldb initial skel 2025-12-04 19:41:39 +05:30
hanishkvc aedffe1df0 SimpleChatTC:DataStore: Initial skeleton of a Db WebWorker
Create the DB store

Try Get and Set operations

The post back to main thread done from asynchronous paths.

NOTE: given that it has been ages since indexed db was used,
so this is a logical implementation by refering to mdn as needed.
2025-12-04 19:41:39 +05:30