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

Function normalizeOptionalString

packages/node-sdk/src/session.ts:610–614  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

608}
609
610function normalizeOptionalString(value: string | undefined): string | undefined {
611 if (value === undefined) return undefined;
612 const normalized = value.trim();
613 return normalized.length > 0 ? normalized : undefined;
614}
615
616function isPermissionMode(value: unknown): value is PermissionMode {
617 return value === 'yolo' || value === 'manual' || value === 'auto';

Callers 3

compactMethod · 0.70
activateSkillMethod · 0.70
activatePluginCommandMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected