mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-19 16:16:45 +00:00
fix(ai): report ai sql action results and errors in pane
This commit is contained in:
@@ -169,6 +169,20 @@ Redis 连接改用只读命令工具,而不是 SQL。助手可以执行 DBX
|
||||
|
||||
<Callout type="info">AI Agent 不会获得“以后都可以写”的授权,也不会绕过 MCP 策略、连接只读保护或数据库权限。更多边界见 [生产环境安全](/cn/docs/production-safety)。</Callout>
|
||||
|
||||
## SQL 代码块操作
|
||||
|
||||
回复里的每个 SQL 代码块都提供 **临时运行**、**立即执行** 和 **应用到编辑器**。三者都作用于该对话**自己绑定**的连接、数据库和 Schema 对应的查询页签,而不是当前恰好在前台的那个编辑器。
|
||||
|
||||
该页签不存在时会在后台创建,动作本身也**不会移动你的工作区**:AI 动作不会自行切换、选中或打开任何页签。
|
||||
|
||||
正因为结果不总落在你眼前,代码块会自己报告结果:
|
||||
|
||||
* 块内显示 **执行中…**,结束后显示返回或影响的行数,失败则显示数据库返回的错误文本。
|
||||
* 目标页签不在屏幕上时,提示会写明是哪个页签并提供 **查看**;只有点击 **查看** 才会切过去。
|
||||
* 根本没跑起来的情况(没有可用连接、页签仍在处理上一个请求、没有可执行的 SQL)也会在块内说明原因。
|
||||
|
||||
危险 SQL、生产库、参数和只读解锁仍然使用各自的确认对话框,代码块和提示不会重复一遍。
|
||||
|
||||
## 推理强度和 Thinking
|
||||
|
||||
不同供应商使用不同机制:枚举 effort、reasoning level、布尔 thinking、整数预算或自定义文本。DBX 按当前模型能力展示可用选项,并记住每个配置/模型的选择。
|
||||
|
||||
@@ -171,6 +171,20 @@ Redis connections use a read-only command tool instead of SQL. The assistant can
|
||||
|
||||
<Callout type="info">AI Agent never receives “write from now on” permission and cannot bypass MCP policy, connection read-only protection, or database privileges. See [Production Safety](/en/docs/production-safety) for the complete boundary.</Callout>
|
||||
|
||||
## SQL Block Actions
|
||||
|
||||
Each SQL block in a reply offers **Temp run**, **Execute**, and **Apply to editor**. All three target the query tab that belongs to the conversation's own connection, database, and schema — the connection the conversation is bound to, never whichever editor happens to be in front.
|
||||
|
||||
That tab is created in the background when it does not exist yet, and the action never moves your workspace: an AI action does not switch, select, or open tabs on its own.
|
||||
|
||||
Because the result therefore does not always land where you are looking, the block reports its own outcome:
|
||||
|
||||
* The block shows **Executing…**, then the row count (returned or affected) or the database's error text.
|
||||
* When the target tab is not on screen, a notification names that tab and offers **View**; only clicking **View** brings it to the front.
|
||||
* Requests that never reached the database say why in the block instead: no available connection, an editor tab still busy with another request, or nothing to execute.
|
||||
|
||||
Dangerous-SQL, production, parameter, and read-only confirmations keep their own dialogs; those are not repeated in the block or as a notification.
|
||||
|
||||
## Reasoning Effort and Thinking
|
||||
|
||||
Providers expose different mechanisms: enumerated effort, reasoning levels, boolean thinking, integer budgets, or free-text options. DBX shows controls from the active model capability and remembers the selection per configuration and model.
|
||||
|
||||
Reference in New Issue
Block a user