Skip to content

feat(agent): bind chat sessions to a fixed datasource - #70

Merged
lzq986 merged 1 commit into
mainfrom
feat/bind-sesson-ds
Aug 4, 2026
Merged

feat(agent): bind chat sessions to a fixed datasource#70
lzq986 merged 1 commit into
mainfrom
feat/bind-sesson-ds

Conversation

@lzq986

@lzq986 lzq986 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

close #49

  • new session_datasource table + mapper; sessions lock to the datasource chosen at creation (INSERT IGNORE, immune to later ACTIVE-status switches)
  • tools (get_tables / get_table_schema / execute_sql) resolve the datasource per session via ToolCallContext, falling back to the global active datasource for legacy sessions
  • ChatRequest carries datasourceId; binding happens before the first agent stream
  • session list now exposes datasourceId/Name; frontend adds a datasource picker on new sessions, shows the bound source in the header (locked once a message is sent) and in the session list, and resets stale bindings when switching sessions

 - new session_datasource table + mapper; sessions lock to the datasource chosen at creation (INSERT IGNORE, immune to later ACTIVE-status switches)
 - tools (get_tables / get_table_schema / execute_sql) resolve the datasource per session via ToolCallContext, falling back to the global active datasource for legacy sessions
  - ChatRequest carries datasourceId; binding happens before the first agent stream
  - session list now exposes datasourceId/Name; frontend adds a datasource picker on new sessions, shows the bound source in the header (locked once a message is sent) and in the session list, and resets stale bindings when switching sessions
@lzq986
lzq986 merged commit 2a21b9c into main Aug 4, 2026
3 checks passed
@lzq986
lzq986 deleted the feat/bind-sesson-ds branch August 6, 2026 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 增加会话和数据源绑定的标识

1 participant