#118 — Support LLM Chats started from widgets in other Chats
Repo: Twill-AI/facade State: closed | Status: done Assignee: Unassigned
Created: 2024-09-24 · Updated: 2025-09-15
Description
Need to support LLM Chats started for not-dashboard Widgets. Like when user click widget title in LLM Chat we need to start new LLM Chat. It works for now but without persistence, probably because of front-end implementation.
AC:
- Discuss with @c4benni how such chats are handled from the UI code or debug HTTP + WS communication.
-
Detect issue and either file new front-end ticket of fix in Facade. - Fix back-end behavior to protect from wrong WS requests as much as possible.
Investigation details
If investigate WS communication if sent prompt in “Query widget” page:
We see that UI sends ChatPromptText without origin_type and origin_id. And sid=widget_id, not llmchat_id. Back-end should fail here with something like “Wrong LLM Chat ID and ‘origin’ parameters are not specified in order to start new or search existing LLM Chat”.
In Facade's logs
2024-10-16T14:44:20.941951067Z INFO: 10.0.2.94:42802 - "OPTIONS /api/v1/llmchats/233/items?limit=1&types=ChatResponseSummary HTTP/1.1" 200 OK
2024-10-16T14:44:21.514073091Z INFO: 10.0.2.94:42802 - "GET /api/v1/llmchats/233/items?limit=1&types=ChatResponseSummary HTTP/1.1" 200 OK
2024-10-16T14:44:27.972151835Z 2024-10-16 14:44:27.971|INFO|mrttnntf8n|main_graph:294|Starting Answer... Is first interaction: True
2024-10-16T14:44:27.977252034Z 2024-10-16 14:44:27.977|INFO|mrttnntf8n|databa
## Notes
_Add implementation notes, blockers, and context here_
## Related
_Add wikilinks to related people, meetings, or other tickets_