* fix(ai): resolve Codex CLI from shell PATH on macOS
* fix(ai): hide Codex CLI subprocess windows on Windows
* feat(ai): allow to set environment variable for Codex CLI
* fix(ai): parse Codex MCP tool events
* fix(mcp): honor Postgres TLS settings in direct queries
* fix(ai): add quick proposal confirmation buttons (all locales)
When the assistant proposes an action, render Yes/No buttons below the
message so the user does not need to type a short reply — fixing the
issue where short replies caused the LLM to re-ask instead of executing.
- aiProposalDetect.ts: pure detectors for proposal sentences/short replies
- AiAssistant.vue: inline Yes/No buttons on last assistant proposal message
- ai.ts: system-prompt rule to skip re-confirmation on short affirmatives
- i18n: 3 keys added to all 7 locales (en/zh-CN/zh-TW/ja/es/it/pt-BR)
Tests: 55/55. TypeCheck: passed.
* fix(ai): add i18n keys and UI changes for proposal confirmation
* fix(i18n): add missing agent tool step translations for zh-TW, pt-BR, it, ja
* propagate explainData to agent step items for ExplainPlanViewer
* feat(ai): show safety check result for execute_query tool steps
- 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
AiAssistant.vue:
- Tool call steps now support click-to-expand/collapse for SQL args
and results (expandedSteps set); chevron rotates on open
- Remove fixed-open result display (was always visible, no toggle)
- Max result height raised to 48 (max-h-48) with scroll
ai.ts (buildModePromptLines agent branch):
- Replace vague "prioritize SQL" hint with explicit tool-use
instruction: must call execute_query, not just emit SQL text
- List available tools (list_tables, get_columns, execute_query,
get_sample_data) so LLM knows what it can call
- Clarify allowed statement types for execute_query
Move tool calling from non-streaming (complete) API calls to real
streaming SSE, so text, reasoning, and tool call arguments all arrive
incrementally — users see the AI think and act in real time.
- Extract ~370 lines of non-streaming tool-call functions from
agent_loop.rs (call_with_tools, call_openai_with_tools,
call_claude_with_tools, call_gemini_with_tools) and replace with
a single ai::stream_with_tools() dispatch call.
- Add streaming-with-tools infrastructure to ai.rs (~550 lines):
- StreamToolEvent enum: Chunk, ToolCallStart, ToolCallDelta,
ToolCallComplete — provider-agnostic, feeds into the
StreamingToolCallAccumulator
- stream_claude_with_tools(): parse SSE content_block_start/delta/
stop events, incremental input_json_delta for tool arguments
- stream_openai_with_tools(): parse SSE delta.tool_calls with
incremental function.arguments
- stream_gemini_with_tools(): parse SSE functionCall (Gemini
sends complete objects, not deltas — emit as one chunk)
- Cancellation support via tokio::select! in every streaming loop
- Extended timeout for reasoning models (600s vs 120s)
- StreamingToolCallAccumulator: collect partial tool call fragments
from streaming deltas, then deserialize into complete ToolCall
objects in index order once the stream ends.
Thinking models like DeepSeek V4 Flash can exceed the 120s stream
timeout during long reasoning, causing truncated output and missing
answers. Increase stream timeout to 600s when thinking is enabled,
raise max_tokens floor to 8192, and bump reasoning display max-height.
Closes#326