Commit Graph

15 Commits

Author SHA1 Message Date
hanishkvc dd0a7ec500 SimpleChatTC:Pdf2Text: Make it work with a subset of pages
Initial go, need to review the code flow as well as test it out
2025-12-04 19:41:39 +05:30
hanishkvc 63a8ddfbb9 SimpleChatTC:SimpleProxyHS: make helper work with any num of args
This makes the logic more generic, as well as prepares for additional
parameters to be passed to the simpleproxy.py helper handshakes.

Ex: Restrict extracted contents of a pdf to specified start and end
page numbers or so.
2025-12-04 19:41:39 +05:30
hanishkvc 61064baa19 SimpleChatTC:Pdf2Text and otherwise readme update
Half asleep as usual ;)
2025-12-04 19:41:39 +05:30
hanishkvc e077f23f9e SimpleChatTC:Pdf2Text: Refine desc and MaxResultDataLength
Needed to tweak the description further for the ai model to be
able to understand that its ok to pass file:// scheme based urls

Had forgotten how big the web site pages have become as also the
need for more ResultDataLength wrt one shot PDF read to get
atleast some good enough amount of content in it with large pdfs
2025-12-04 19:41:39 +05:30
hanishkvc 21544eaf87 SimpleChatTC:ResultMaxDataLength, Desc
Allow user to limit the max amount of result data returned to ai
after a tool call.

Inturn it is set by default to 2K.

Update the pdf2text tool description to try make the local file
path support more explicit
2025-12-04 19:41:39 +05:30
hanishkvc dfeb94d3f6 SimpleChatTC:Pdf2Text: cleanup initial go
Make the description bit more explicit with it supporting local
file paths as part of the url scheme, as the tested ai model was
cribbing about not supporting file url scheme. Need to check if
this new description will make things better.

Convert the text to bytes for writing to the http pipe.

Ensure CORS is kept happy by passing AccessControlAllowOrigin in
header.
2025-12-04 19:41:39 +05:30
hanishkvc f97efb86e4 SimpleChatTC:SimpleProxy:Pdf2Text: js side initial plumbing
Expose pdf2text tool call to ai server and handshake with simple
proxy for the same.
2025-12-04 19:41:39 +05:30
hanishkvc 25df32b553 SimpleChatTC:ChatSessionID: Get all handlers to account for chatid
This should ensure that tool call responses can be mapped back to
the chat session for which it was triggered.
2025-12-04 19:41:39 +05:30
hanishkvc 84403973cd SimpleChatTC:SimpleProxy: once in a bluemoon transformed bearer
instead of using the shared bearer token as is, hash it with
current year and use the hash.

keep /aum path out of auth check.

in future bearer token could be transformed more often, as well as
with additional nounce/dynamic token from server got during initial
/aum handshake as also running counter and so ...

NOTE: All these circus not good enough, given that currently the
simpleproxy.py handshakes work over http. However these skeletons
put in place, for future, if needed.

TODO: There is a once in a bluemoon race when the year transitions
between client generating the request and server handling the req.
But other wise year transitions dont matter bcas client always
creates fresh token, and server checks for year change to genrate
fresh token if required.
2025-12-04 19:41:39 +05:30
hanishkvc 0552ff9098 SimpleChatTC:SimpleProxy:ClientUI: Send Authorization bearer
User can configure the bearer token to send
2025-12-04 19:41:39 +05:30
hanishkvc 044d1cf535 SimpleChatTC:tools.proxyUrl: rename to just proxyUrl
Next will be adding a proxyAuth field also to tools.
2025-12-04 19:41:39 +05:30
hanishkvc 221b5a9228 SimpleChatTC:ToolCallWeby: Cleanup the toolweb module flow
Avoid code duplication, by creating helpers for setup and toolcall.

Also send indication of the path that will be used, when checking
for simpleproxy.py server to be running at runtime setup.
2025-12-04 19:41:39 +05:30
hanishkvc de6f370d3b SimpleChatTC:ToolCall:SearchWebText using UrlText
Initial go at implementing a web search tool call, which uses the
existing UrlText support of the bundled simpleproxy.py.

It allows user to control the search engine to use, by allowing
them to set the search engine url template.

The logic comes with search engine url template strings for
duckduckgo, brave, bing and google. With duckduckgo set by default.
2025-12-04 19:41:39 +05:30
hanishkvc 978ee3db1e SimpleChatTC:ToolCalling:Seprat out JSWebWorker and ProxyBasedWeb
Remove the unneed (belonging to the other file) stuff from tooljs
and toolweb files.

Update tools manager to make use of the new toolweb module
2025-12-04 19:41:39 +05:30
hanishkvc d00e5b341a SimpleChatTC:Duplicate tooljs.mjs to toolweb.mjs
So as to split browser js webworker based tool calls from web
related tool calls.
2025-12-04 19:41:39 +05:30