Commit Graph
2403 Commits
Author SHA1 Message Date
t8y2 7923f4915e fix(elasticsearch): apply document filters in browser 2026-06-11 18:56:38 +08:00
t8y2 3f25a69d23 feat(mysql): add unsigned integer types to column type options 2026-06-11 18:34:51 +08:00
runstone 9ab41795d6 @
feat(ai): add agent loop with tool calling, fix connection routing and Gemini compatibility

## 背景说明
将 dbx AI 助手从单次 SQL 文本生成器升级为具备 tool calling 的数据库 Agent。
Phase 1 实现 Agent Loop 框架 + 只读工具(list_tables、get_columns)。
参考:Pi agent-core,.trellis/tasks/06-11-feat-ai-agent-loop-tool-calling-upgrade

## 修改内容
- 新增 agent_loop.rs:Agent Loop 核心,支持 OpenAI/Claude/Gemini Provider 的 tool calling,最大 10 轮,Ollama 自动降级为 text-only
- 新增 agent_tools.rs:read_only_tools (list_tables, get_columns) 的工具定义与执行器
- 新增 agent_events.rs:AgentEvent/ToolCall/ToolResult/ToolDefinition 类型定义
- 修改 ai.rs:AiMessage 新增 tool_call_id 字段
- 修改 lib.rs:注册 agent_events、agent_loop、agent_tools 模块
- 修改 routes/ai.rs & commands/ai.rs:新增 ai_agent_stream SSE 端点
- 修改 tauri.ts & http.ts:新增 AgentEvent 类型与 aiAgentStream 函数
- 修改 api.ts:注册 aiAgentStream 转发
- 修改 ai.ts:新增 runAgentStream,AiContext 增加 connectionId 字段
- 修改 AiAssistant.vue:接入 runAgentStream,解析 AgentEvent 渲染工具调用步骤
- 修改 en.ts / zh-CN.ts:新增 agentSteps 国际化文案

## 修复的问题
- [#I01] connectionName 误传为 connectionId → add connectionId to AiContext
- [#I02] agent loop 取消操作无效 → add cancel checks before each turn
- [#C01] TODO 缺少 issue 引用 → add PRD reference to TODO
- [#C02] stream_with_tools 命名不准确 → add clarifying doc comment
- [#C03] Gemini functionResponse.name 解析错误 → fix tool_call_id format and extraction

## 测试建议
- execute_get_columns:合法表名/空表名/SQL 注入字符拒绝
- call_openai_with_tools:空 choices/空 tool_calls/非 JSON arguments
- call_gemini_with_tools:空 candidates/parts 无 functionCall
- runAgentStream:有效 connectionId 正常调用
@
2026-06-11 18:27:24 +08:00
t8y2 edeee4f7d9 fix(mongo): preserve bson date fields 2026-06-11 18:09:41 +08:00
Doracoin c7c71850d4 fix(windows-build): ssh-agent err when building on windows 2026-06-11 17:29:40 +08:00
t8y2 759cab9088 docs: add dbx-agents side-by-side workspace setup 2026-06-11 15:28:44 +08:00
t8y2 36e08d6741 fix(jdbc): format date values by column type 2026-06-11 15:20:27 +08:00
t8y2 a9882d5312 feat(sidebar): show table comments on hover 2026-06-11 15:09:56 +08:00
t8y2 c10d2d9586 refactor(mysql): extract temporal value serialization, fix DATE display 2026-06-11 14:12:05 +08:00
t8y2 a4768db69c fix(docs): remove non-existent initials property in homepage 2026-06-11 14:11:57 +08:00
t8y2 97ccd56299 fix(docs): remove non-existent initials property in databases page 2026-06-11 14:01:02 +08:00
t8y2 a81286fed7 feat(build): gate DuckDB behind optional feature, support --no-default-features 2026-06-11 13:58:44 +08:00
t8y2 65f6e866b1 feat(docs): expand database support page to 50+ engines 2026-06-11 13:49:43 +08:00
t8y2 21fd98d0ee feat: configurable toolbar visibility with settings UI 2026-06-11 13:32:39 +08:00
t8y2 4a264d638c feat: reorganize toolbar with more dropdown and add theme to appearance settings 2026-06-11 13:13:23 +08:00
t8y2 26d714909e feat(elasticsearch): model indices as first-class nodes 2026-06-11 12:52:47 +08:00
t8y2 6f253abe55 fix: paginate contributor wall and add static fallback 2026-06-11 12:45:42 +08:00
t8y2 521a3021c4 fix(clickhouse): load table index metadata 2026-06-11 12:23:28 +08:00
t8y2 293df56274 fix(ai): relax connection test token limit 2026-06-11 11:59:23 +08:00
SuLea-IT 5cf736ad96 feat: optimize data compare memory usage
Thanks @SuLea-IT for the contribution! This significantly reduces memory usage (53% lower RSS peak) by avoiding per-row HashMap materialization and cloning. Appreciate the detailed memory audit docs as well.
2026-06-11 11:57:22 +08:00
t8y2 66237d7160 feat(project): set assigned issues in progress 2026-06-11 11:54:24 +08:00
t8y2 6f15fa303c feat: support empty redis key separator for flat key display 2026-06-11 11:28:43 +08:00
SuLea-IT 89aa315a2d Merge pull request #1037
Thanks!
2026-06-11 11:12:05 +08:00
t8y2 2b7264a531 feat: data grid search also matches column names 2026-06-11 11:08:51 +08:00
t8y2 bd66904c86 fix(grid): suppress drawer context menu 2026-06-11 11:04:06 +08:00
SuLea-IT 806d7c758b feat: add SQL library history query entry points 2026-06-11 10:53:54 +08:00
SuLea-IT 634e26e8e7 Merge PR #1024 2026-06-11 10:47:42 +08:00
t8y2 ddfbc2c3b5 fix(docs): disable landing page scroll-reveal animation 2026-06-11 10:38:12 +08:00
t8y2 4ca5fb4ae0 fix(ci): add concurrency to issue-claim workflow to prevent race condition 2026-06-11 10:30:47 +08:00
t8y2 8b58db30e8 fix(grid): remove redundant table data badge from toolbar 2026-06-11 01:44:16 +08:00
t8y2 d28c21f433 fix(tabs): use table icon for mongo and redis tabs 2026-06-11 01:39:25 +08:00
t8y2 c9203de1e7 feat(tabs): add duplicate tab feature in context menu 2026-06-11 01:37:58 +08:00
t8y2 c8fb749ef6 fix: improve web drop handler error handling and preventDefault placement 2026-06-11 01:27:16 +08:00
t8y2 7d2c17559f feat: support drag-and-drop .sql files into the app window 2026-06-11 01:24:26 +08:00
t8y2 922971fdd3 feat: add clear button to database selector in query editor 2026-06-11 01:10:05 +08:00
haipengno1 6265571182 feat(ssh): add ssh-agent authentication support (#1023)
Thanks for adding ssh-agent support, this is a great addition!
2026-06-11 00:39:30 +08:00
t8y2 0b8a213fc9 feat(ci): add /claim command to auto-assign issues 2026-06-11 00:31:37 +08:00
t8y2 01975cf1ba fix(ci): replace gh CLI with native fetch for GraphQL calls to avoid auth loss 2026-06-11 00:23:55 +08:00
t8y2 9504947702 fix(ci): use separate PROJECT_TOKEN for project operations, GITHUB_TOKEN for repo queries 2026-06-10 23:58:19 +08:00
t8y2 1adfa5d9f8 feat(ci): add Project Triage automation workflow and script 2026-06-10 23:54:43 +08:00
miracle 871fc57c52 [Enhance] add comments in SQL Server DDL output (#1017)
Thanks!
2026-06-10 22:49:42 +08:00
Scars 215b0cf7d4 fix(desktop): show horizontal data grid scrollbar (#1018) 2026-06-10 22:35:38 +08:00
t8y2 9793dc94b7 feat(driver): centralize database capabilities 2026-06-10 22:12:44 +08:00
t8y2 8f92eeb638 fix(core): guard BIT literal formatting behind MySQL-compatible db_type 2026-06-10 21:54:10 +08:00
echocde 4389de386d fix(core): properly format MySQL BIT type values as binary literals in export/transfer
Thanks for the fix!
2026-06-10 21:53:02 +08:00
t8y2 3f58526df8 fix(mcp): add back use std::env, use compile-time #[cfg] for locate_mcp_bin 2026-06-10 21:31:52 +08:00
Doracoin 7234d9ebd3 fix(desktop): Improve shell Node detection for MCP startup
Thanks for the detailed investigation and fix!
2026-06-10 21:30:44 +08:00
t8y2 9f0dae1754 fix(grid): preserve table filter builder state 2026-06-10 20:08:18 +08:00
t8y2 20622bc762 fix: resolve clippy warnings and missing redis_key_separator field 2026-06-10 20:05:20 +08:00
t8y2 a5e1a64247 refactor(sql): split dialect helpers 2026-06-10 19:53:36 +08:00