688 Commits
Author SHA1 Message Date
t8y2 9b8aa4292d feat(release): bump version to 0.5.33 2026-06-16 11:26:41 +08:00
t8y2 9a2a21c09a fix(test): avoid iris alias formatting assertion 2026-06-16 10:54:28 +08:00
t8y2 47915c243d fix(connection): avoid blocking disconnect cleanup 2026-06-16 10:45:14 +08:00
t8y2 000c236619 feat(connection): add keepalive interval 2026-06-16 10:23:49 +08:00
t8y2 9b4e16500e fix(postgres): show connection failure details 2026-06-16 01:05:48 +08:00
t8y2 c57e18bf3e fix: resolve clippy warnings and missing struct fields in tests 2026-06-16 00:55:32 +08:00
t8y2 3574113feb fix(iris): qualify selected schema tables 2026-06-15 23:16:29 +08:00
t8y2 9c478d1437 fix(connection): respect agent connect timeout 2026-06-15 22:43:05 +08:00
t8y2 7926da7c0c fix(postgres): disconnect sessions before drop database 2026-06-15 22:02:52 +08:00
t8y2 048549ec0e fix(elasticsearch): encode index path segments 2026-06-15 21:28:25 +08:00
t8y2 a18b076057 fix(xugu): qualify schema-aware table selects 2026-06-15 21:06:21 +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
t8y2 46ddcaba56 fix: normalize channel_binding=require to prefer for postgres 2026-06-15 17:44:00 +08:00
t8y2 3ee2514d07 fix(databend): enable editing and procedures 2026-06-15 17:43:44 +08:00
David Bottiau 921dff5ffe feat: allow password protection to be disabled (#1201)
Thanks @Odonno!
2026-06-15 17:01:01 +08:00
t8y2 e0d481cc2e fix(postgres): handle tsvector columns 2026-06-15 16:59:01 +08:00
t8y2 f2a0c65724 fix(ssh): support legacy kex algorithms 2026-06-15 16:15:44 +08:00
t8y2 026a0d2b12 fix(data): preserve unsafe int64 display 2026-06-15 15:14:38 +08:00
t8y2 ab5bd1dd25 fix(redis): batch SCAN server-side to reduce fetch-all latency 2026-06-15 15:01:13 +08:00
t8y2 08fb5bbf4d fix(query): avoid retrying local query timeouts 2026-06-15 14:42:03 +08:00
t8y2 8eb5f22069 fix(iris): clone table with valid false predicate 2026-06-15 14:23:40 +08:00
t8y2 a32ead56b9 fix(query): skip comment-only SQL execution 2026-06-15 14:18:40 +08:00
t8y2 7bb869d398 fix(mongodb): support legacy driver fallback 2026-06-15 14:07:31 +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
t8y2 aab30d7c44 fix(mysql): prefer text protocol for result sets 2026-06-15 12:07:58 +08:00
John Jin 6f480ca047 fix(influxdb): fix incompatible result sets with older versions
Thanks for the fix!
2026-06-15 11:50:15 +08:00
t8y2 941958a512 fix: skip non-JSON stdout lines during agent startup 2026-06-15 11:41:39 +08:00
t8y2 ef426a8218 feat(redis): add Pub/Sub publish and subscribe with WebSocket real-time push 2026-06-15 01:40:06 +08:00
John Jin 1afc271c18 feat: add QuestDB support
Thanks @ptma!
2026-06-14 22:58:05 +08:00
t8y2 8932b0a308 fix(mongo): align collection loading state 2026-06-14 17:04:56 +08:00
t8y2 7b2156446c fix(mongodb): use tls param for form connections 2026-06-14 16:06:37 +08:00
Vergil Lai f385386284 feat(manticore): add Manticore Search support
Add Manticore Search table data editing, structure editing, metadata handling, and SQL completion support.
2026-06-14 16:01:02 +08:00
t8y2 ea85e22ea0 fix: update gbase default agent key test to gbase8a 2026-06-14 12:22:08 +08:00
t8y2 41e4498c7b fix: add missing gbase_server field in ConnectionConfig tests 2026-06-14 12:09:35 +08:00
t8y2 babdd7f12f fix(oracle): reuse connection runtime for schemas 2026-06-14 11:40:48 +08:00
t8y2 cbc7f9b0db fix(gbase): support 8a and 8s profiles 2026-06-14 10:16:24 +08:00
t8y2 7c5021fa91 feat(turso): simplify connection form to URL + token 2026-06-13 20:33:32 +08:00
Vergil Lai 799d20a2cf 添加 Manticore Search 支持 (#1145)
* 添加 Manticore Search 支持

* 更新 Manticore Search 文档
2026-06-13 20:23:36 +08:00
LC 2d98b9fdd2 feat(sqlite): add database backup action
* feat(sqlite): add database backup action

* fix(sqlite): sanitize default backup file name
2026-06-13 18:39:12 +08:00
t8y2 0b9aef1ca8 feat(settings): split driver store paths 2026-06-13 17:27:58 +08:00
t8y2 74546fee5c fix(storage): persist driver store setting 2026-06-13 17:13:59 +08:00
John Jin b640cbd0ba fix: influxdb code removed on merge
Thanks for the fix!
2026-06-13 17:03:27 +08:00
t8y2 d974ad5533 feat(settings): add custom driver store path with migration 2026-06-13 16:54:04 +08:00
t8y2 d091b0db85 feat(sidebar): reveal local db file in OS file manager 2026-06-13 16:00:47 +08:00
t8y2 30afcb8e69 fix(sidebar): page large table groups 2026-06-13 13:40:36 +08:00
t8y2 2d1d40f6ab feat(highgo): geometry/geography map preview via agent column_types 2026-06-13 10:25:12 +08:00
t8y2 ef5b6eb654 fix(transfer): preserve MySQL AUTO_INCREMENT and column defaults in cross-instance copy 2026-06-13 08:24:47 +08:00
t8y2 6e57197072 fix(sqlite): recognize INTEGER PRIMARY KEY as autoincrement in data grid save 2026-06-13 02:30:30 +08:00
t8y2 0767062bdb fix(agent): retry and rename fallback when removing old JRE on Windows 2026-06-13 01:56:29 +08:00
t8y2 c6e50f80f2 fix(ai): accept thinking/reasoning deltas as first stream chunk in connection test 2026-06-12 20:40:40 +08:00