mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
Tighten agent-facing query validation, privacy guards, SQL result handling, config writes, and LIKE search semantics for the CLI query workflow.
12 lines
270 B
TypeScript
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,
|
|
}
|
|
}
|