emit('reload', sql, searchText, whereInput, orderBy, limit, offset)"
@paginate="(offset: number, limit: number, whereInput?: string, orderBy?: string) => emit('paginate', offset, limit, whereInput, orderBy)"
@sort="(column: string, columnIndex: number, direction: 'asc' | 'desc' | null, whereInput?: string, mode?: DataGridSortMode) => emit('sort', column, columnIndex, direction, whereInput, mode)"
- />
+ >
+
+ emit('fixWithAi', message)" />
+
+
diff --git a/apps/desktop/src/lib/__tests__/sql/queryError.spec.ts b/apps/desktop/src/lib/__tests__/sql/queryError.spec.ts
index de7d24eb47..5015d9a5ac 100644
--- a/apps/desktop/src/lib/__tests__/sql/queryError.spec.ts
+++ b/apps/desktop/src/lib/__tests__/sql/queryError.spec.ts
@@ -23,6 +23,7 @@ describe("isQueryTimeoutErrorMessage", () => {
it("detects agent RPC client-side timeout", () => {
expect(isQueryTimeoutErrorMessage("Agent RPC call timed out (30s)")).toBe(true);
expect(isQueryTimeoutErrorMessage("Agent RPC call timed out (120s)")).toBe(true);
+ expect(isQueryTimeoutErrorMessage("Agent RPC error (-1): Agent RPC call timed out (120s)")).toBe(true);
});
it("does not classify unrelated errors as query timeouts", () => {
diff --git a/apps/desktop/src/lib/sql/queryError.ts b/apps/desktop/src/lib/sql/queryError.ts
index 6ceb0f2558..d8d8fcd1e2 100644
--- a/apps/desktop/src/lib/sql/queryError.ts
+++ b/apps/desktop/src/lib/sql/queryError.ts
@@ -5,7 +5,7 @@ export function isQueryTimeoutErrorMessage(message: string): boolean {
// fallback when JDBC setQueryTimeout never fires (unsupported/unresponsive driver), so the
// backend already treats it as a query timeout (is_agent_rpc_timeout_error in query.rs) —
// surface the same action here to stay consistent with the backend.
- if (lower.startsWith("agent rpc call timed out")) return true;
+ if (/\bagent rpc call timed out\b/.test(lower)) return true;
if (/\b(?:canceling|cancelling|canceled|cancelled)\b[\s\S]{0,80}\bstatement\b[\s\S]{0,80}\btimeout\b/.test(lower)) return true;
if (/\b(?:connection|connect|pool|checkout|metadata|loading|health check|cancel request|ssh|tunnel)\b/.test(lower)) return false;
return (