fix: resolve cli-highlight types and runtime info
This commit is contained in:
@@ -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");
|
return lines.filter(Boolean).join("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
export function buildRuntimeLine(
|
export function buildRuntimeLine(
|
||||||
runtimeInfo: {
|
runtimeInfo?: {
|
||||||
agentId?: string;
|
agentId?: string;
|
||||||
host?: string;
|
host?: string;
|
||||||
os?: string;
|
os?: string;
|
||||||
|
|||||||
10
src/types/cli-highlight.d.ts
vendored
Normal file
10
src/types/cli-highlight.d.ts
vendored
Normal file
@@ -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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user