Commit Graph

3 Commits

Author SHA1 Message Date
hanishkvc b2e7f5fd44 SimpleChatTC:ToolsManager: Cleanup inc delayed direct posting
Me.tools.toolNames is now directly updated by init of ToolsManager

The two then in the old tools.init was also unneeded then also as
both could have been merged into a single then, even then. However
with the new flow, the 1st then is no longer required.

Also now the direct calling of onmessage handler on the main thread
side wrt immidiate result from tool call is delayed for a cycling
through the events loop, by using a setTimeout.

No longer expose the tools module throught documents, given that
the tools module mainly contains ToolsManager, whose only instance
is available through the global gMe.

Move the devel related exposing throught document object into a
function of its own.
2025-12-04 19:41:39 +05:30
hanishkvc 85c2779579 SimpleChatTC:Cleanup:MeInTools: update tools, toolweb
Now gMe can be used in toolweb with proper knowledge of available
members and can also be cross checked by tools
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