Files
ChatLab/apps/desktop/main/ai/tools/worker-sql-result.ts
T
digua 801e7fc66a fix(cli): harden agent query safeguards
Tighten agent-facing query validation, privacy guards, SQL result handling, config writes, and LIKE search semantics for the CLI query workflow.
2026-07-04 15:12:50 +08:00

12 lines
270 B
TypeScript

interface WorkerSqlResultLike {
limited?: boolean
truncated?: boolean
}
export function adaptWorkerSqlResult<T extends WorkerSqlResultLike>(result: T): T & { truncated?: boolean } {
return {
...result,
truncated: result.truncated ?? result.limited,
}
}