Commit Graph

636 Commits

Author SHA1 Message Date
LSD fa5e55a376
feat(mongodb): improve GridFS manager filtering and sorting
* docs: add GridFS manager filter and sort design

* feat: improve GridFS manager filtering and sorting
2026-07-06 17:17:33 +08:00
Abeautifulsnow 8539011f25
feat(ai): split Ask/Agent action menus with task-oriented Agent actions
* feat(ai): add task-oriented Agent actions with per-action contract

Introduce three Agent-native actions — query, exploreSchema,
executeAndExplain — so Agent mode surfaces task-oriented operations
instead of reusing Ask's SQL-producing action set.

- ai.ts: extend AiAction with the new actions; add ASK_ACTIONS /
  AGENT_ACTIONS and defaultActionForMode / isValidActionForMode
  helpers; raise maxTokens for the explanatory task actions.
- aiSkills.ts: add skill definitions (zh/en) for the three actions.
- aiAgentPlan.ts: task actions no longer emit a misleading
  "unsupported_action" execute step; they execute via the
  execute_query tool events, not the legacy client-side path.
- agent_loop.rs: per-action task-contract rules in both the prompt
  augmentation and repair paths (query -> execute & answer from real
  data; exploreSchema -> list_tables/get_columns; executeAndExplain
  -> run current SQL & explain).
- i18n (en/zh-CN/zh-TW): new action labels, placeholders, a
  generateNoExec label for Agent mode, and a task-oriented agent
  modeHint.

es/it/ja/pt-BR have no `ai` section and fall back to `en`, matching
existing coverage.

* feat(ai): split Ask/Agent action menus with mode-aware defaults

Wire the new Agent task actions into the assistant UI so each mode
shows a distinct, intent-matching action set.

- actionButtons is now a computed returning Ask or Agent buttons
  based on assistantMode. Agent menu: query / exploreSchema /
  executeAndExplain / generate (labeled "生成但不执行" via
  generateNoExec). Ask menu is unchanged.
- Switching mode lands on that mode's default (Ask -> generate,
  Agent -> query); the shared `generate` is not carried across
  because its label/semantics differ per mode. Vector DBs stay on
  `generate` since their action menu is hidden and they lack SQL
  tools (no execute_query contract).
- External Ask-style triggers (Fix with AI, Explain history) switch
  to Ask mode when invoked from Agent mode so the action is valid
  and the menu reflects what runs.
- Reset the active action to the mode default after each send.

* test(ai): cover Agent task-action contract and mode/action mapping

Lock in the deterministic parts of the Ask/Agent split so only the
LLM-behavior criteria need manual verification.

Backend (agent_loop.rs):
- query contract instructs the LLM to call execute_query and is not
  treated as a SQL-producing action.
- exploreSchema contract points to list_tables/get_columns and says
  not to execute data queries.
- executeAndExplain contract tells the LLM to run the current SQL.
- task actions do not require a SQL deliverable (a conclusion without
  a fenced SQL block still satisfies the contract).
- query repair prompt also targets execute_query.

Frontend (aiActions.spec.ts):
- defaultActionForMode: Ask -> generate, Agent -> query (not generate).
- isValidActionForMode: generate valid in both; Ask-only actions
  rejected in Agent mode and vice versa.
- ASK_ACTIONS / AGENT_ACTIONS composition (Agent menu starts with
  query and still offers generate).

* fix(ai): correct action menu on mode-switched triggers and i18n gaps

Issues found during review of the Ask/Agent action split:

- [#I01] triggerAction (Fix with AI / Explain history) invoked from
  Agent mode switched to Ask and set the action, but the mode-switch
  watch then reset activeAction to the Ask default ("generate"),
  overwriting the action just set — so the menu showed "Generate SQL"
  during a fix. Add a suppressModeActionReset flag so programmatic
  mode switches don't clobber the explicitly-set action.
- [#C01] Remove dead `unsupported_action` reason: buildAiAgentPlan no
  longer produces it, so drop the type variant and the unreachable
  skippedTitleKey case.
- [#I02] es/it/ja/pt-BR were missing the new Agent action keys
  (query/exploreSchema/executeAndExplain/generateNoExec) and their
  placeholders, causing English fallback in the Agent menu. Add the
  translations to match each locale's existing style.

* test(ai): align app-tests with task-action split

- aiSkills: add query/exploreSchema/executeAndExplain to the expected
  action set; broaden the id check (new ids are not _sql-suffixed) and
  relax the userInstruction assertion (schema inspection need not mention SQL).
- aiAgentPlan: drop the unsupported_action skipped step for non-generate
  actions (#C01 removed it from the plan and the reason union); add coverage
  for task-oriented Agent actions not driving client-side execution.

* test(ai): pin locale in dialect prompt spec

buildSystemPrompt selects zh/en copy via currentLocale(), which reflects the
host navigator.language. The spec asserts English strings, so it failed on
zh-CN machines (e.g. Windows with a Chinese system locale) while passing on
CI's en-US runners. Pin the locale to en in beforeAll so the assertions are
deterministic regardless of the host OS locale.
2026-07-06 14:41:39 +08:00
t8y2 92ef1ac3cf feat(structure): open editor from field and index nodes 2026-07-06 14:16:43 +08:00
wuxiemian 987b0fd263
fix: improve SQL table and JOIN completion (#2629) 2026-07-06 13:19:37 +08:00
t8y2 764b479679 fix(sidebar): ignore repeated row clicks during double-click 2026-07-06 12:54:33 +08:00
t8y2 5c37c0ad0d fix(mysql): disable TLS by default 2026-07-06 10:10:30 +08:00
wuxiemian 3fdcc2d454
feat(sqlCompletion): support insert all-column completion 2026-07-06 01:29:23 +08:00
onenewcode 77cd835cda
[fix] fix Linux Alt+F4 exit handling (#2576) 2026-07-05 12:41:54 +08:00
t8y2 e74782f651 feat(metadata): optimize agent metadata loading 2026-07-05 12:09:24 +08:00
t8y2 91855de832 feat(data-generate): prefer column default values 2026-07-05 00:49:13 +08:00
二丫讲梵 fdaa949fb1
feat(sidebar): add local table search 2026-07-05 00:09:04 +08:00
t8y2 223ecbec20 fix(oracle): skip rowid for view data queries 2026-07-04 17:07:43 +08:00
t8y2 7e7c4944e9 refactor(desktop): organize lib modules by domain 2026-07-04 13:53:52 +08:00
t8y2 90f0594e93 feat(sql): add semantic SQL completion engine 2026-07-04 13:20:13 +08:00
二丫讲梵 90d2ede740
feat(sidebar): add connection copy paste shortcuts 2026-07-04 12:19:56 +08:00
github-actions[bot] fefb95b500 chore(packages): release 0.4.21 [skip node-packages-release] 2026-07-04 01:11:17 +00:00
Guoyu Su 3a2abf4a49
fix(desktop): scale multi-statement query timeout (#2544) 2026-07-04 02:19:10 +08:00
t8y2 614daa5b19 feat(sql-library): add move to folder action 2026-07-04 00:37:23 +08:00
onenewcode 91c77e53c4
feat(mongodb): support collection stats shell commands
Add db.coll.stats() / dataSize() / storageSize(scale) / totalIndexSize()
so these MongoDB shell commands return a result grid instead of the
"Use MongoDB shell-style commands" error (issue #2529).

- backend: collStats via mongo_driver.collection_stats, wired through
  mongo_ops, the dbx-web /mongo/collection-stats route, the tauri
  mongo_collection_stats command, and the MCP data bridge
- node-core: parseMongoCollectionStatsCommand + result formatter and
  executeQuery dispatch (web build + MCP path)
- desktop: mirror the parser/executor/autocomplete in mongoShellCommand.ts,
  queryStore.ts, api/tauri/http facade, and mongoCompletion.ts
- tests for the parser, result formatter, and completion entries

Close #2529
2026-07-03 21:32:29 +08:00
miracle a0e9acce95
fix(ui): kafka agent icon contrast in dark theme 2026-07-03 21:14:31 +08:00
gggdsg b60f8b2039
feat(mongodb): add TLS connection options in connection tab (#2515)
Add MongoDB TLS options (`tlsAllowInvalidCertificates`, `retryWrites`, `tlsCAFile`) to the connection form with backend URL normalization and DocumentDB/SSH tunnel guidance, while preserving legacy `tlsCAFile` in `url_params` for existing DocumentDB users, hardening auth failure hint matching, and clarifying TLS bypass security labels.
2026-07-03 19:25:01 +08:00
LSD f826cb5d38
feat(mongo): add GridFS manager for MongoDB
* feat(mongo): browse GridFS buckets and files

Refs #2342

* feat(mongo): add GridFS manager for MongoDB

* chore(i18n): autofill new translations

---------

Co-authored-by: dbx-i18n-bot <github-actions[bot]@users.noreply.github.com>
Co-authored-by: t8y2 <1156263951@qq.com>
2026-07-03 18:34:00 +08:00
t8y2 55aa0f8624 fix(mongodb): preserve int64 document filters 2026-07-03 17:39:48 +08:00
t8y2 5c79c26954 fix(iotdb): load databases without duplicate schema 2026-07-03 17:33:57 +08:00
t8y2 d205f47a8f fix(grid): preserve high-precision numeric edits 2026-07-03 16:08:20 +08:00
LRcoding 06231d512f
fix(jdbc): decode URL credentials for multi-at usernames
* fix(jdbc): decode URL credentials for multi-at usernames

* fix(jdbc): preserve url credential parsing semantics

---------

Co-authored-by: zero <zero@zeroMacmini.local>
2026-07-03 15:41:34 +08:00
t8y2 47238b689c feat(editor): add vim mode 2026-07-03 15:38:07 +08:00
t8y2 1ff3676531 fix(data): use saved row limit for table opens 2026-07-03 14:00:39 +08:00
t8y2 cabe89a19b fix(mongodb): support legacy count helpers 2026-07-03 13:25:36 +08:00
t8y2 6f2e4774f4 feat(updates): add AtomGit update download source 2026-07-03 11:01:27 +08:00
github-actions[bot] 9d2d1e3297 chore(packages): release 0.4.20 [skip node-packages-release] 2026-07-02 18:00:23 +00:00
t8y2 60abe59a80 fix(redis): copy displayed key name 2026-07-03 00:14:11 +08:00
t8y2 46c0309c39 fix(grid): cover horizontal wheel pagination 2026-07-03 00:02:11 +08:00
CSXFanMeng 82e9df1853
feat(export): add all-database export 2026-07-02 21:16:56 +08:00
t8y2 d249bd5ac8 feat(settings): add interface font selection 2026-07-02 19:55:43 +08:00
二丫讲梵 af9ad39ffb
feat(sidebar): 添加一键折叠所有节点功能
- 在侧边栏中添加了“折叠所有”按钮,用户可以一键折叠所有展开的节点。
- 更新了相关的国际化文本,支持多语言。
- 增加了 collapseAllGroups 和 collapseExpandedTreeNodes 函数以支持新功能。
2026-07-02 18:50:01 +08:00
Abeautifulsnow e7dffeca37
fix(ai): tool call status cards, table overflow, streaming TextDelta
* fix(ai): merge tool call status cards

* fix(ai): constrain markdown table overflow

* fix(ai): restore streaming of answer text via TextDelta events

The on_chunk closure was missing live AgentEvent::TextDelta emission for text content, causing the AI answer text to appear all at once after the turn completed. Reasoning deltas were unaffected.

Root cause: commit c30033628 rewrote the on_chunk closure and accidentally dropped the TextDelta emit line while keeping ReasoningDelta intact.

Fix: restore TextDelta emit in on_chunk for incremental streaming, and remove the post-turn full-TextDelta workaround which would duplicate content.

* test(ai): extract chunk_to_events and add streaming event tests

Extract the event-generation logic from the on_chunk closure into a pure function chunk_to_events() to make it testable, and add 6 unit tests covering all chunk content combinations: text-only, reasoning-only, mixed, empty, and edge cases.

This ensures a regression like the one fixed in the previous commit (where TextDelta emission was dropped while ReasoningDelta was kept) would be caught by tests.
2026-07-02 18:49:50 +08:00
zipg 4efff9a190
fix(editor): prompt before closing unsaved SQL tabs
Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>
2026-07-02 16:43:55 +08:00
Tony Tang 23b9228f82
feat(connection): add StarRocks TLS support 2026-07-02 16:37:20 +08:00
LRcoding 4fdfbf61c5
fix(app): 支持 GoldenDB 和 Vastbase 新建数据库入口 (#2361)
Co-authored-by: zero <zero@zeroMacmini.local>
2026-07-02 13:44:42 +08:00
onenewcode 71e618dd46
fix: support mysql install scripts without selected database (#2356) 2026-07-02 13:18:49 +08:00
zipg 47dc35ccb2
feat(settings): 启动时标签页恢复策略三选项 (all/pinned/none) (#2395)
* feat(settings): 添加启动标签页恢复策略

* i18n: 补齐启动标签页恢复策略 5 个 locale 译文

---------

Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>
Co-authored-by: t8y2 <1156263951@qq.com>
2026-07-02 12:23:24 +08:00
onenewcode 8747df53ef
fix(mongodb): support multi-command execution
* fix mongodb multi-command execution

* fix(connection): 复制连接时保持在同一组内

- 修改 `addConnection` 方法以支持指定目标组 ID
- 更新 `duplicateConnection` 函数以传递目标组 ID
- 添加测试用例以验证复制连接的功能

* fix: add MongoDB data transfer entry

* feat(editor): SQL 编辑器选区大小写转换

Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>

* fix(editor): 修复SQL快捷执行导致执行全量SQL的问题 (#2384)

- 将执行SQL语句的逻辑从直接请求改为通过事件发射
- 增强了代码的可扩展性和可维护性

* fix(sidebar): cache tooltip overflow measurement

* fix(dialog): allow dragging window from modal overlay

* fix(oracle): reuse shared pool for data tabs

* fix(sidebar): reduce comment text repaint cost

* fix(saved-sql): preserve folder on metadata save

* fix(agent): execute transaction control SQL as statements

* feat(vector): add Qdrant/Milvus collection dimension display (#2396)

* fix(oracle): 修复时间字段编辑和表结构修改报错

Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>

* fix(agents): limit common version bumps

---------

Co-authored-by: 二丫讲梵 <eryajf@163.com>
Co-authored-by: zipg <geeky@foxmail.com>
Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>
Co-authored-by: t8y2 <1156263951@qq.com>
Co-authored-by: lexmin0412 <zhangle_dev@outlook.com>
2026-07-02 12:19:38 +08:00
t8y2 b869bcd379 fix(agents): limit common version bumps 2026-07-02 12:11:35 +08:00
t8y2 18710ce2ab fix(saved-sql): preserve folder on metadata save 2026-07-02 11:55:26 +08:00
t8y2 d1684bc4d4 fix(oracle): reuse shared pool for data tabs 2026-07-02 11:48:02 +08:00
二丫讲梵 c2cc9f22cf
fix(connection): 复制连接时保持在同一组内
- 修改 `addConnection` 方法以支持指定目标组 ID
- 更新 `duplicateConnection` 函数以传递目标组 ID
- 添加测试用例以验证复制连接的功能
2026-07-02 10:34:48 +08:00
二丫讲梵 60f941aa27
feat(connection): 添加子组时支持定义组名称
- 在创建新子组时,自动展开其父组,支持自定义组名
2026-07-02 10:33:35 +08:00
github-actions[bot] dea6fe66ba chore(packages): release 0.4.19 [skip node-packages-release] 2026-07-01 18:59:34 +00:00
t8y2 58e2d983c2 fix(tabs): restore previous tab after data tab close 2026-07-02 00:48:30 +08:00