Files
Kilo-Org_kilocode/packages/llm/test/lib/tool-runtime.ts
2026-06-15 14:48:05 +02:00

9 lines
422 B
TypeScript

import { LLMClient } from "../../src/route"
import type { Tools } from "../../src/tool"
import type { RunOptions } from "../../src/tool-runtime"
type CompatRunOptions<T extends Tools> = RunOptions<T> & { readonly maxSteps?: number }
export const runTools = <T extends Tools>(options: CompatRunOptions<T>) =>
LLMClient.stream({ ...options, stopWhen: options.stopWhen ?? LLMClient.stepCountIs(options.maxSteps ?? 10) })