From d126e7f6100f3c25e43b4708b7609d5e03bfd5a9 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 19 Jan 2026 05:57:29 +0000 Subject: [PATCH] fix: resolve cli-highlight types and runtime info --- src/agents/system-prompt.ts | 8 ++++++-- src/types/cli-highlight.d.ts | 10 ++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 src/types/cli-highlight.d.ts diff --git a/src/agents/system-prompt.ts b/src/agents/system-prompt.ts index 40ecd8607..16e12fe10 100644 --- a/src/agents/system-prompt.ts +++ b/src/agents/system-prompt.ts @@ -547,13 +547,17 @@ export function buildAgentSystemPrompt(params: { ); } - lines.push("## Runtime", buildRuntimeLine(runtimeInfo, runtimeChannel, runtimeCapabilities, params.defaultThinkLevel), `Reasoning: ${reasoningLevel} (hidden unless on/stream). Toggle /reasoning; /status shows Reasoning when enabled.`); + lines.push( + "## Runtime", + buildRuntimeLine(runtimeInfo, runtimeChannel, runtimeCapabilities, params.defaultThinkLevel), + `Reasoning: ${reasoningLevel} (hidden unless on/stream). Toggle /reasoning; /status shows Reasoning when enabled.`, + ); return lines.filter(Boolean).join("\n"); } export function buildRuntimeLine( - runtimeInfo: { + runtimeInfo?: { agentId?: string; host?: string; os?: string; diff --git a/src/types/cli-highlight.d.ts b/src/types/cli-highlight.d.ts new file mode 100644 index 000000000..ab4ad92fb --- /dev/null +++ b/src/types/cli-highlight.d.ts @@ -0,0 +1,10 @@ +declare module "cli-highlight" { + export type HighlightOptions = { + language?: string; + theme?: unknown; + ignoreIllegals?: boolean; + }; + + export function highlight(code: string, options?: HighlightOptions): string; + export function supportsLanguage(language: string): boolean; +}