Commit Graph
49 Commits
Author SHA1 Message Date
治安 19fe8d765c feat(plugin-cli): add standalone plugin development runtime 2026-09-13 01:10:06 +08:00
t8y2 7f2f65fad4 feat(plugins): add extensible plugin platform 2026-09-13 01:10:00 +08:00
二丫讲梵 bf4874906c feat(desktop): unify tab organization menu and adaptive collapsed rail 2026-09-12 21:46:05 +08:00
HolyeTyrone 538aeed99c feat(transfer): add rebuild structure and data mode 2026-09-08 16:46:39 +08:00
t8y2 72dcd8355a feat(etcd): rewrite agent in Go and add v2 API support 2026-09-02 18:04:25 +08:00
t8y2 8475c84d48 fix(duckdb): checkpoint wal on worker shutdown 2026-08-26 15:23:29 +08:00
Abeautifulsnow eeeb4e5011 feat(ai): run agent sessions as background tasks 2026-08-26 14:09:08 +08:00
t8y2 d29c2d85cb chore(github): add repository code ownership 2026-08-24 19:19:05 +08:00
jearhe b3acf1e558 fix(wry): recover from WebView2 process failures 2026-08-20 20:42:45 +08:00
Andrew 5741bc1256 feat(gaussdb): support M-mode index metadata and DDL 2026-08-20 18:50:22 +08:00
Guoyu Su 9dd00b9e85 chore(gitignore): ignore Python cache artifacts 2026-08-18 22:03:55 +08:00
t8y2 ad2b02d0e4 fix(repo): remove tracked node_modules symlink
Closes #6149
2026-08-13 09:50:07 +00:00
amwps290 154c460657 feat(postgres): list user-defined types with details and DDL for PG-family databases 2026-08-11 15:00:24 +08:00
zipg e82c1aedf0 fix(windows): restore Windows 7 startup compatibility 2026-08-05 00:07:41 +08:00
Andrew 1dd005db0f feat(jdbc): add GaussDB types and migrate plugin to Gradle 2026-08-03 21:29:24 +08:00
miracle bcafc4a474 fix(query): preserve structured backend errors 2026-08-02 16:37:46 +08:00
Abeautifulsnow 52d5c99a92 fix(ai): improve API retry handling 2026-07-29 16:16:39 +08:00
Abeautifulsnow cb9d0f7cbf fix(ai): harden write SQL confirmation flow 2026-07-28 11:56:23 +08:00
huijiangyuan 3a2dc4225a feat(ssh): support key+password combined authentication 2026-07-26 17:52:33 +08:00
JeaceLiu 782615586c feat(editor): add query editing utilities 2026-07-17 16:32:50 +08:00
t8y2 9cbe857a2a feat(update): 应用内更新提示支持英文 release notes 2026-07-07 00:26:56 +08:00
Moe. 51693bf296 fix(connection): allow immediate reconnect after canceling high-latency connection
* Fix: Scope Disconnects To Connection Attempts

- Allow reconnecting while a scoped disconnect is still pending
- Track successful local connection attempts for scoped backend disconnects
- Prevent older disconnect completions from clearing newer reconnect errors
- Update disconnect state immediately while preserving revision-safe cleanup
- Add regression tests for reconnect and pending disconnect race cases

* Fix: Clear Root Metadata Load On Connection Cancel

* Test: Mock Installed Agents In Connection Store Timeout Spec

* Test: Mock listInstalledAgents in connection store timeout tests
2026-07-06 18:06:05 +08:00
t8y2 25dcbeb7e4 feat(oscar): add OSCAR database support 2026-06-30 20:07:55 +08:00
t8y2 38253f2602 fix(gitignore): add CLAUDE.md to ignored files 2026-06-23 16:17:11 +08:00
John Jin 13108eb9bb fix: use tabular variant first to prevent canvas edit jitter 2026-06-16 11:13:52 +08:00
Abeautifulsnow c300336281 feat(ai): context window management and token usage tracking
* @
feat(ai): add conversation context management and token usage tracking (Phase 4)

## Background
Phase 4 of AI agent loop upgrade: token usage extraction from LLM responses,
cost estimation display, and automatic context window management (summarization
when approaching limits).

## Changes

### Backend (Rust)
- New token_usage::TokenUsage — cross-turn token accumulation
- New agent_loop::maybe_compact — proactive context compaction: token estimation
  → cut-point selection → LLM summarization → fallback summary
  → tool-pair integrity protection → drain/insert
- New agent_loop::context_window_for_model — auto-detect context window by model
- New agent_loop::is_context_length_error — detect upstream context-length errors
- New agent_loop::compact_tool_result_for_context — JSON/text sampling for large results
- Modified agent_loop::run_agent_loop — pre-turn compaction check, retry on context error
- Modified agent_events::AgentEnd — split total_tokens into input_tokens/output_tokens
- New agent_events::ContextCompacted — compaction event with metrics
- New AiConfig.context_window — user-configurable context window size
- New AiChatMessage.kind — context summary message marker
- Modified stream_with_tools & 3 provider stream functions — extract TokenUsage
  - Claude: message_start(input) + message_delta(output)
  - OpenAI: stream_options { include_usage } → final usage chunk
  - Gemini: usageMetadata per chunk, keep last

### Frontend (TypeScript/Vue)
- AiAssistant.vue: token + cost display row, estimateCost() with 7 model families,
  contextCompacted UI step, pendingCompaction deferred apply,
  messagesForAgentHistory post-compaction history reconstruction
- EditorSettingsDialog.vue: contextWindow input (min=1000, auto-detect)
- settingsStore.ts: AiConfig.contextWindow field
- tauri.ts: AgentEvent type updates, AiChatMessage.kind
- i18n: 6 new keys in en.ts and zh-CN.ts

## Fixed Issues
- messages[0] dropped from LLM context after compaction
- estimate_text_tokens hard threshold causing 2.8x estimate jump
- context_compacted event field semantics mismatch with frontend insert position
- validate_summary English-only keywords causing fallback on non-English LLMs
- Stale agentTokens after conversation switch
@

* remove cost computation logic
2026-06-15 18:55:22 +08:00
Abeautifulsnow d845a318c6 feat(ai-agent): Phase 3 — explain_query tool, parallel/sequential execution, DB gating (#1187)
- Add explain_query tool with structured EXPLAIN result, gated on supports_explain_plan()
- Add supports_sql_query() to gate execute_query/get_sample_data for non-SQL DBs (Redis, ES, MongoDB, etc.)
- Split agent loop tool dispatch: execute_query runs sequentially, all others run in parallel via join_all
- Wire explain_query result button to ExplainPlanViewer in AiAssistant + App.vue
- Fix O(n²) agentSteps rebuild: incremental O(1) push per event during streaming
- finally block falls back to full rebuild only when streaming push did not occur
2026-06-15 13:14:59 +08:00
runstone a440415e86 feat(readonly): add read-only mode for all database connections
## Background
Add a read-only toggle for database connections that blocks all write
operations (INSERT, UPDATE, DELETE, DROP, etc.) when enabled, allowing
only read queries (SELECT, SHOW, EXPLAIN, etc.). Closes #889.

## Changes

### Data Model
- Added `read_only: bool` field to ConnectionConfig (Rust struct, TS
  interfaces, and ConnectionConfigData deserialization layer)
- Used `#[serde(default, skip_serializing_if = "is_false")]` for
  backward/forward compatibility with existing configs

### Frontend UI
- Added "Read Only" checkbox in connection dialog
- 7-language i18n support (en/es/it/pt-BR/zh-CN/zh-TW)

### SQL Classification (query_execution_sql.rs)
- Added `is_write_sql()` with two-layer defense:
  - Layer 1: First-keyword check (must start with known read keyword)
  - Layer 2: Embedded dangerous keyword detection (catches CTE-wrapped
    writes like `WITH ... AS (DELETE FROM ...)`)
  - `FROM` keyword supported as DuckDB SELECT-less syntax indicator
- Added `check_read_only()` returning descriptive error with connection name
- Added 16 unit tests covering: pure reads/writes, CTE, case insensitivity,
  string literal masking, comment stripping, stored procedure calls, edge cases

### SQL Execution Guards (query.rs / transfer.rs)
- Added `check_read_only_for_connection()` and `_multi()` helper functions
  with lazy name clone (only allocates when read_only is true)
- 6 interception points: `do_execute`, MySQL batch, SQL Server batch,
  DuckDB batch, transaction execution, transfer execution

### Non-SQL Write Guards — Tauri Commands
- Added `ensure_connection_writable()` helper (connection.rs)
- Mongo: 6 write entry points (insert/update/delete, single + batch)
- Redis: 15 write entry points (SET, DEL, HSET, HDEL, LPUSH, LSET, LREM,
  SADD, SREM, ZADD, ZREM, EXPIRE, FLUSHDB, delete_keys, execute_command)
  - execute_command uses RedisCommandSafety classification to allow
    safe read commands through raw command interface
- etcd: 2 write entry points (put, delete)
- sql_file: SQL file execution guarded
- MCP Bridge: 4 write entry points (Insert/Update/Delete/SQL query)

### Non-SQL Write Guards — Web API
- Local `ensure_writable()` helper in each route module
- Redis: 12 write endpoints including classified execute_command
- Mongo: 6 write endpoints
- etcd: 2 write endpoints
- sql_file, table_import, transfer: early rejection

### Test Updates
- Updated ConnectionConfig construction in 7 test files with
  `read_only: false` initialization

## Defense-in-Depth
- Layer 1: Command/Route-level early rejection (saves resources)
- Layer 2: Core SQL classifier (`is_write_sql` — first keyword + embedded scan)
- Layer 3: Core execution-time interception (do_execute/transfer/transaction)
2026-06-10 10:58:52 +08:00
SuLea-IT 5138c1a702 Add configurable SQL formatter settings (#908)
Thanks!
2026-06-09 12:05:17 +08:00
polempandSam a067ee8d76 feat: custom theme system with PostgreSQL PL/pgSQL highlighting fix
- Fix PostgreSQL function highlighting by disabling doubleDollarQuotedStrings
  in extended PostgreSQL dialect, enabling PL/pgSQL syntax highlighting
  inside $ blocks
- Add complete custom editor theme system with multi-theme management
  (create, rename, duplicate, delete), visual color editor (12 colors),
  JSON import/export, real-time preview, and 12 preset color schemes
- Add background/foreground color customization with system theme defaults
- Optimize EditorSettingsDialog layout: 2-column grid with font selector
  taking available space and theme dropdown grouped with custom theme button
- Add i18n support for custom theme UI (en, zh-CN, zh-TW, es)
- Fix Tauri production build by adding custom-protocol feature
- Update .gitignore for temporary build artifacts

Closes t8y2#788

Co-authored-by: Sam <14344444@@qq.com>
2026-06-06 20:59:21 +08:00
t8y2 2a59304e02 fix: update .gitignore 2026-06-04 13:29:24 +08:00
t8y2 7c5740a400 refactor: extract Neo4j and TDengine SQL logic from data_grid_sql.rs 2026-05-25 23:21:47 +08:00
t8y2 7badf4060e fix(jdbc): stabilize plugin release versioning 2026-05-18 15:10:08 +08:00
t8y2 1d77bac694 chore: gitignore releases-*.json and remove from tracking 2026-05-16 18:46:26 +08:00
t8y2 1b934e72e0 feat(grid): add column formatters 2026-05-15 23:27:09 +08:00
t8y2 8305b9670f feat(ci): integrate Codecov for test coverage reporting 2026-05-14 20:33:26 +08:00
t8y2 e85f9df1fe feat(agent): pluggable database drivers via JDBC agent subprocess
Migrate domestic database support (DaMeng, KingBase, Vastbase, GoldenDB) from
built-in ODBC/protocol drivers to standalone Java agent processes communicating
via stdin/stdout JSON-RPC 2.0. Agents are distributed as fat JARs with embedded
JDBC drivers, downloaded on-demand from GitHub Releases with proxy fallback.

- Add AgentDriverClient for subprocess lifecycle + JSON-RPC communication
- Add AgentManager for JRE/JAR install state management
- Add Tauri commands for driver install/uninstall/list
- Add DriverManager UI panel in settings dialog
- Extend DatabaseType with Kingbase, Vastbase, Goldendb variants
- Migrate Dameng from ODBC (dm_driver.rs) to JDBC agent
- Delete dm_driver.rs (343 lines)
- Add GitHub proxy fallback for downloads (update.hwdns.net, gh-proxy.org)

Agent code lives at https://github.com/t8y2/dbx-agents
2026-05-13 04:44:52 +08:00
t8y2 bf58045a28 Revert "feat(cli): add dbx-cli runtime and agent integration (#229)"
This reverts commit 58c47adef5, reversing
changes made to 3bcec8ef7f.
2026-05-12 17:31:54 +08:00
Illuminated2020 b0d4575455 chore: ignore worktree directory 2026-05-12 16:43:46 +08:00
rarnu e8ab15140a add: 将AI大模型的设置移至设置页 2026-05-11 23:25:27 +08:00
t8y2 2d83fbb1ed chore: ignore local agent files 2026-05-11 11:06:16 +08:00
t8y2 10bfede1c7 feat(jdbc): add optional JDBC plugin support 2026-05-10 12:57:38 +08:00
t8y2 4973912666 fix: bundle libodbc into macOS app and improve update UX
- Bundle libodbc.2.dylib into .app/Contents/Frameworks/ via Tauri's
  macOS frameworks config to fix "app can't be opened" on macOS
- Replace relaunch() with exit(0) to avoid Tauri restart bug (#11392)
- Lock update dialog during download and after install
- Render release notes as markdown
2026-05-07 17:36:44 +08:00
t8y2 6a5a380fdd docs: migrate from VitePress to Fumadocs (Next.js)
- Replace VitePress with Fumadocs + Next.js for documentation site
- Configure i18n (English + 简体中文) with language switcher
- Migrate all 17 guide documents to MDX format with updated content
- Add ocean theme, GitHub/Discord/QQ social links
- Update GitHub Actions workflow for Next.js static export
- Update .gitignore for .next, out, .source directories
2026-05-06 10:17:17 +08:00
t8y2 cf4f25fd52 feat: extract dbx-core crate for web deployment support
Refactor all database drivers, query execution, schema operations, and
business logic into a shared `dbx-core` crate. The Tauri desktop app
becomes a thin shell delegating to dbx-core, enabling future web and
CLI frontends to reuse the same core.
2026-05-05 03:16:24 +08:00
t8y2 68a8b382b2 chore: remove .mcp.json from tracking and add to gitignore 2026-05-03 14:46:45 +08:00
t8y2 5b342d7e16 添加对 .claude 文件的忽略 2026-05-02 16:46:26 +08:00
t8y2 3e1ab0b3a4 feat: add SSH password authentication support 2026-04-29 20:36:07 +08:00
t8y2 b2e6dfad7e feat: initial release
Multi-database management tool built with Tauri + Vue 3.
Supports MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, ClickHouse, SQL Server.
2026-04-29 18:09:23 +08:00