MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / normalizeOutput

Function normalizeOutput

packages/kosong/test/fixtures/simple-toolset.ts:47–51  ·  view source on GitHub ↗
(output: string | ContentPart | ContentPart[])

Source from the content-addressed store, hash-verified

45}
46
47function normalizeOutput(output: string | ContentPart | ContentPart[]): string | ContentPart[] {
48 if (typeof output === 'string') return output;
49 if (Array.isArray(output)) return output;
50 return [output];
51}
52
53export function toolOk(opts: {
54 output: string | ContentPart | ContentPart[];

Callers 2

toolOkFunction · 0.85
toolErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected