Commit Graph
2007 Commits
Author SHA1 Message Date
t8y2 745f7f60b0 feat(postgres): add cascade table drop option 2026-07-06 15:45:47 +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 e84fb12fcc feat(sqlite): support SQLCipher encrypted databases 2026-07-06 14:24:28 +08:00
t8y2 564c5beeff fix(sqlite): decode text-affinity blobs 2026-07-06 13:56:05 +08:00
t8y2 dd8d1d3556 fix(export): preserve MySQL typed literals 2026-07-06 13:48:36 +08:00
t8y2 0c965eb836 fix(oceanbase): sync query timeout before execution 2026-07-06 13:40:20 +08:00
t8y2 5db35307d3 fix(influxdb): support InfluxDB 2 connections 2026-07-06 13:30:12 +08:00
wnyr dacd311490 fix(mysql): handle proxy database handshake fallback 2026-07-06 12:57:27 +08:00
t8y2 526540d570 fix(postgres): retry stale cached metadata queries 2026-07-06 12:46:44 +08:00
t8y2 38f9893425 feat(release): bump app to 0.5.47 2026-07-06 10:22:51 +08:00
t8y2 5c37c0ad0d fix(mysql): disable TLS by default 2026-07-06 10:10:30 +08:00
t8y2 8951be72a1 feat(release): bump app to 0.5.46 2026-07-06 02:12:10 +08:00
t8y2 2bfd03cca4 feat(database): add database creation and property editing 2026-07-06 02:00:01 +08:00
miracle 4afc3297e1 feat(duckdb): add worker concurrency setting 2026-07-06 00:13:11 +08:00
t8y2 4666f8a5f2 feat(import): add table import wizard 2026-07-06 00:01:41 +08:00
Guoyu Su 4b6a588354 fix(mysql): honor preferred TLS mode 2026-07-05 22:16:07 +08:00
t8y2 069dcc479d feat(redis): search hash fields and values 2026-07-05 22:02:24 +08:00
t8y2 dee5bb2fd8 fix(core): remove unused DuckDB isolation helper 2026-07-05 21:10:25 +08:00
zergmk2 f800d80f90 feat: add SSH config aliases and PostgreSQL extensions 2026-07-05 20:29:49 +08:00
lexmin0412 d502b4ce6c feat(redis): add hash field search 2026-07-05 19:37:49 +08:00
t8y2 2c33570351 fix(ci): fix rust CI failures 2026-07-05 13:18:03 +08:00
t8y2 3160c02b4e feat(export): escape MySQL export control characters 2026-07-05 12:32:24 +08:00
t8y2 e74782f651 feat(metadata): optimize agent metadata loading 2026-07-05 12:09:24 +08:00
t8y2 6b13564180 fix(desktop): persist UI state asynchronously 2026-07-05 02:22:13 +08:00
t8y2 693eb0dbb9 fix(core): guard mq registry cleanup 2026-07-05 01:55:27 +08:00
t8y2 68c446cd3e fix(sync): normalize webdav remote paths 2026-07-05 00:57:55 +08:00
zipgandstaff 5ec5b221dd Fix:修复 Oracle 大量对象时表名补全缺失 (#2565)
Co-authored-by: staff <staff@qimaos-MacBook-Pro.local>
2026-07-05 00:09:49 +08:00
Moe. 8a1a791927 feat(connection): add connection attempt cancellation 2026-07-04 23:47:53 +08:00
miracle 454457f191 fix(duckdb): add worker process isolation 2026-07-04 23:43:22 +08:00
t8y2 cec17844a9 feat(structure): disable Oracle-like integer length 2026-07-04 23:17:51 +08:00
大峰 3ba617fc74 fix(db2): include comments in table ddl 2026-07-04 23:06:21 +08:00
二丫讲梵andt8y2 842dcc6cab feat(api): 添加WebDAV同步秘密状态和偏好设置功能 (#2560)
- 新增获取WebDAV同步秘密状态的接口
- 新增保存WebDAV同步秘密偏好的接口
- 新增忘记WebDAV同步秘密密码的接口
- 更新相关的存储和加密逻辑以支持新的功能

Co-authored-by: t8y2 <1156263951@qq.com>
2026-07-04 22:58:09 +08:00
t8y2 223ecbec20 fix(oracle): skip rowid for view data queries 2026-07-04 17:07:43 +08:00
t8y2 4f8fb1068d fix(postgres): support legacy function metadata 2026-07-04 11:13:59 +08:00
t8y2 64d7892d58 feat(release): bump app to 0.5.45 2026-07-04 04:28:02 +08:00
miracle 30b9460442 fix(dbx-core): improve duckdb query cancellation 2026-07-04 02:31:32 +08:00
Fody Jute 2225343e8a fix(dbx-core): preserve mysql cross-database targets 2026-07-04 00:58:52 +08:00
t8y2 69f880fdf1 fix(transfer): preserve target table name case 2026-07-04 00:12:42 +08:00
t8y2 b80f3e8088 feat(connection): add HTTP tunnel 2026-07-03 22:11:03 +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
t8y2 06e653b0bb fix(export): stream postgres query result exports 2026-07-03 20:02:19 +08:00
c8efe06ddc fix(core): Oracle 复制 INSERT 按行生成语句
* fix(core): emit oracle copy inserts per row

* refactor(core): extract single-row insert dialect check into sql_dialect

---------

Co-authored-by: zero <zero@zeroMacmini.local>
Co-authored-by: t8y2 <1156263951@qq.com>
2026-07-03 19:33:18 +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
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 a8abb1c478 fix(import): use single-row inserts for Oracle 2026-07-03 18:04:23 +08:00
t8y2 54dc3c1c18 fix(sqlserver): use alter for routine source 2026-07-03 17:21:49 +08:00
t8y2 d65b0e5548 feat(mysql): append semicolon to table DDL 2026-07-03 16:46:03 +08:00
t8y2 0894334764 fix(firebird): use rows syntax for pagination 2026-07-03 16:22:31 +08:00
t8y2 d205f47a8f fix(grid): preserve high-precision numeric edits 2026-07-03 16:08:20 +08:00
LRcoding 21cec24e75 fix(mysql): support cleartext password auth option (#2499) 2026-07-03 13:47:47 +08:00