Commit Graph

678 Commits

Author SHA1 Message Date
github-actions[bot] 4b515c4c65 chore(packages): release 0.4.25 [skip node-packages-release] 2026-07-10 00:39:05 +00:00
t8y2 1e6ac0ccff fix(grid): batch row delete updates 2026-07-09 21:17:37 +08:00
t8y2 39d956f2e8 fix(redis): skip confirmation for regular writes 2026-07-09 18:59:12 +08:00
Guoyu Su 15d392bc44
fix(transfer): keep task active after table errors 2026-07-09 18:30:29 +08:00
t8y2 87efe469a4 fix(desktop): reduce grid scroll jank 2026-07-09 17:55:33 +08:00
t8y2 c015d95016 fix(grid): restore row actions and remove edit badge 2026-07-09 17:37:36 +08:00
t8y2 aa0abcd670 feat(query): support broader result editing 2026-07-09 14:35:59 +08:00
Guoyu Su ca9e11217e
fix(mongodb): support collection drop shell command 2026-07-09 14:16:32 +08:00
Guoyu Su 65a92afce8
fix(desktop): preserve sidebar groups on reload 2026-07-09 11:47:13 +08:00
zipg 1317301bcd
feat(kafka): improve topic management and Kerberos auth 2026-07-09 11:41:22 +08:00
二丫讲梵 a8a7d3e9ed
feat(temporal-editor): 支持手动输入 datetime 字段值
*  feat(temporal-editor): 数据库修改datatime字段时支持手动输入数据

* 🔧 fix(temporal-editor): 修复 picker 回到输入框时误提交的问题
2026-07-09 11:11:45 +08:00
gggaiitx 2f134585ea
feat(editor): add auto close brackets setting 2026-07-09 09:53:01 +08:00
二丫讲梵 28db8bc1b8
feat(support-info): add app support information 2026-07-09 09:52:45 +08:00
github-actions[bot] 649e9c2f9e chore(packages): release 0.4.24 [skip node-packages-release] 2026-07-08 23:40:36 +00:00
二丫讲梵 7748c13a1e
feat(data-grid): show column comments in lookup 2026-07-08 23:44:33 +08:00
二丫讲梵 ddf6b3ed6b
fix(sidebar): preserve Mongo collection children in search 2026-07-08 23:44:25 +08:00
二丫讲梵 843babf522
feat(connection): select new databases when visible 2026-07-08 22:51:45 +08:00
onenewcode 1b13d2176b
fix(metadata): unify enum column metadata 2026-07-08 21:02:53 +08:00
auth0 07482557e6
fix(sidebar): locate active table reliably 2026-07-08 20:21:13 +08:00
lexmin0412 ac4b98c97c
feat(ai): add general action mode 2026-07-08 19:31:19 +08:00
二丫讲梵 fb919efe0a
fix(mcp): require auth for web backend access 2026-07-08 19:23:34 +08:00
Abeautifulsnow 0901f176b0
fix(grid): preserve current page on data refresh instead of resetting to page 1
* @
fix(grid): preserve current page on data refresh instead of resetting to page 1

When refreshing table data (toolbar button, Ctrl+R, or auto-refresh), the
offset was hardcoded to 0, causing pagination to always jump back to the
first page. This was frustrating for users viewing later pages.

Use the current page offset (currentPage - 1) * pageSize so the user
stays on the same page after refresh. In infinite-scroll mode, the
offset still evaluates to 0 because resetInfiniteScrollState() sets
currentPage = 1, so behavior is unchanged.
@

* @
fix(grid): auto-redirect to last page when refreshed page no longer exists

Extends the refresh pagination fix with a safety net: when data is deleted
while viewing a later page (e.g. page 5 with only 2 pages remaining), the
grid auto-navigates to the last available page instead of showing an empty
page.

Uses a transient isRefreshingData flag to distinguish refresh/rollback
from normal pagination navigation, avoiding false triggers.
@

* Revert "@"

This reverts commit ff0bf0bb31ccfbbb6d4787d1d036794fd37acd5a.

* @
fix(grid): auto-redirect to last page when refreshed page no longer exists

When data is deleted while viewing a later page, the grid now auto-navigates
to the last available page instead of showing an empty page.

Uses a transient isRefreshingData flag to distinguish refresh/rollback
from normal pagination, and a loading-transition watcher (true->false)
placed after displayedTotalRowCount declaration to avoid TDZ errors.
@

* @
test(grid): add pagination offset-preservation and auto-redirect tests

Cover the two new behaviors added to DataGrid.vue:

1. dataGridPagination.test.ts — auto-redirect page calculation:
   - page beyond last page after data deletion → triggers redirect
   - page still valid → no redirect
   - fewer rows than one page → redirects to page 1
   - total=0 / total=undefined → guard prevents redirect

2. useDataGridActions.test.ts — offset preserved on reload:
   - onReloadData(offset=400) passes offset=400 to build-table-select-sql
   - resultPageOffset stored as 400 (not reset to 0)
@
2026-07-08 13:28:36 +08:00
t8y2 2929b1c035 feat(hive): add Kerberos connection options 2026-07-08 13:23:21 +08:00
t8y2 15d4dc6e2e fix(sqlserver): omit display width for integer types 2026-07-08 11:05:45 +08:00
t8y2 d2874bf1bb fix(grid): smooth canvas column interactions 2026-07-08 09:45:28 +08:00
github-actions[bot] 6e44e697e4 chore(packages): release 0.4.23 [skip node-packages-release] 2026-07-07 17:18:26 +00:00
onenewcode ba81fa4497
feat(redis): support multiple value formats in viewer (#2766)
* feat(redis): improve value decoding and viewer formats

* fix(redis): preserve stream field/value blobs

* Revert "fix(redis): preserve stream field/value blobs"

This reverts commit 168af0619a438dbba5cf17b3e0ec9202a3100d83.
2026-07-08 00:13:20 +08:00
二丫讲梵 7eff6e544b
feat(sqlCompletion): 优化表别名建议功能,避免使用 SQL 关键字 (#2805) 2026-07-08 00:01:24 +08:00
一颗红心 184e235999
feat: synchronize tab titles with saved SQL file renaming (#2739)
- Bidirectional sync between SQL library and tab titles
- Case-insensitive .sql extension via shared ensureSqlExtension
- Revert tab title when rename persistence fails

Close #2648

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 18:09:01 +08:00
zipg d90847bbba
feat(ai): support SQL library file references 2026-07-07 15:39:10 +08:00
jischeng c3893bf314
feat(spark): add Apache Spark database driver with catalog support
* feat(spark): add Apache Spark database driver

Spark Thrift Server speaks the HiveServer2 protocol, so the Spark driver
reuses the hive-jdbc agent runtime. Registers spark (agentKey=spark,
defaultPort=10015) across the manifest, DatabaseType enum, agent catalog,
SQL dialects, connection dialog, and a SparkAgent built on AbstractJdbcAgent.

* feat(spark): add catalog support and official logo

SparkAgent now supports Spark 3.4+ multi-catalog (Paimon, Lance, Iceberg)
via catalog=<name> in url_params, mirroring the StarRocks catalog flow:
- afterConnect switches to the configured catalog via USE <catalog>
- listDatabases returns the catalog name when SHOW DATABASES is empty
  (catalogs like Lance expose tables at the catalog root with no databases)
- listTables uses SHOW TABLES IN <catalog>[.<schema>] uniformly, working
  for both catalog-root tables (Lance) and catalog.schema tables (Paimon)
- setSchemaSQL qualifies USE with the catalog to prevent resetting to
  spark_catalog on schema switches
- buildJdbcUrl omits database from the URL path

Also replaces the placeholder lightning icon with the official Apache Spark
logo (spark-logo.png from spark.apache.org).

* fix(spark): use catalog-qualified DESCRIBE for column retrieval

getColumnsFromDescribe used USE <schema> + DESCRIBE <table>, which
generated USE `catalog`.`catalog` when the sidebar passed the catalog
name as the schema (Lance case where the catalog is the only node).
This failed and fell back to JDBC metadata which also returned nothing,
resulting in an empty DDL (CREATE TABLE ... ()).

Now uses DESCRIBE `catalog`.`table` directly when a catalog is
configured, bypassing USE entirely. Also fixes setSchemaSQL to treat
schema == catalog as catalog-only (no .schema suffix).

* fix(ci): add spark to metadata coverage matrix and BRIDGE_REQUIRED_TYPES

- agents/metadata-constraint-coverage.tsv: register spark as
  intentional-fallback (SHOW TABLES/SHOW DATABASES, like Hive/TDengine)
- packages/node-core/src/diagnostics.ts: add spark to
  BRIDGE_REQUIRED_TYPES (mcpMode=bridge, matches manifest)

* fix(ci): add spark to DBX_CONNECTION_TYPE_DESCRIPTION in mcp-server

The driver-manifest test asserts every manifest dbType appears in the
MCP server's connection type description string.
2026-07-07 14:36:22 +08:00
LSD a7be9eed13
fix(gridfs): support bulk download and paged browsing (#2743) 2026-07-07 12:43:07 +08:00
t8y2 65af804099 feat(editor): allow disabling SQL snippets 2026-07-07 12:36:51 +08:00
github-actions[bot] 001f7ece7b chore(packages): release 0.4.22 [skip node-packages-release] 2026-07-06 18:27:31 +00:00
t8y2 9cbe857a2a feat(update): 应用内更新提示支持英文 release notes 2026-07-07 00:26:56 +08:00
Guoyu Su d7e2eac307
fix(mongodb): honor current command execution mode (#2702) 2026-07-07 00:02:34 +08:00
二丫讲梵 ff8e53d47b
feat(query): 优化多条查询语句结果展示与语句匹配问题 (#2697) 2026-07-06 18:39:36 +08:00
LSD 095cb867a5
fix(mongodb): remove duplicate refresh button in document browser (#2696) 2026-07-06 18:28:42 +08:00
Hiep Le 78019c44e2
fix(mongo): support ISODate() and new Date() in MongoDB queries
* fix(mongo): hỗ trợ ISODate() và new Date() trong query MongoDB

Parser shell MongoDB ở frontend chỉ chuyển ObjectId(...) sang extended JSON,
nên filter chứa ISODate("...")/new Date("...") không parse được: câu lệnh rơi
xuống SQL executor và báo lỗi "Use MongoDB-specific commands".

Bổ sung rewrite ISODate(x)/new Date(x) -> {"$date":x} trong normalizeJsonArgument,
khớp với json_value_to_bson của backend (đã hiểu $date/$oid). Thêm test cho
filter dùng ISODate và new Date.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(mongo): decode $date extended JSON trong filter query

json_filter_value_to_bson chỉ chuyển {"$oid":...} nên filter chứa {"$date":...}
bị gửi thẳng lên server: { field: {"$date":...} } lỗi "unknown operator: $date",
còn { field: {"$gte": {"$date":...}} } so sánh với sub-document nên không khớp gì
(trả về rỗng).

Thêm nhánh parse_extended_json_date vào json_filter_value_to_bson, đồng bộ với
json_value_to_bson (vốn đã hiểu $date/$oid). Thêm test cho cả equality và $gte.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 18:21:15 +08:00
二丫讲梵 6d0a59a913
feat(editor): SQL editor execution button config toggle & optimization
- 在 SQL 编辑器的左侧添加每条语句的执行按钮
- 支持通过快捷键和右键菜单执行语句
- 增加多语言支持的相关文本描述
2026-07-06 18:01:31 +08:00
二丫讲梵 35d5e90378
feat(settings): improve sidebar search
- 新增设置选项以启用/禁用数据库内的表搜索
- 更新相关组件以支持表搜索功能
- 添加多语言支持的描述信息
2026-07-06 17:24:56 +08:00
zipg 7ccc632ce8
fix(sql): improve completion triggers
Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
2026-07-06 17:22:24 +08:00
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