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

Function normalizeRequiredString

packages/node-sdk/src/session.ts:598–608  ·  view source on GitHub ↗
(
  value: string,
  message: string,
  code: KimiErrorCode,
)

Source from the content-addressed store, hash-verified

596}
597
598function normalizeRequiredString(
599 value: string,
600 message: string,
601 code: KimiErrorCode,
602): string {
603 const normalized = value.trim();
604 if (normalized.length === 0) {
605 throw new KimiError(code, message);
606 }
607 return normalized;
608}
609
610function normalizeOptionalString(value: string | undefined): string | undefined {
611 if (value === undefined) return undefined;

Callers 7

addAdditionalDirMethod · 0.85
setModelMethod · 0.85
setThinkingMethod · 0.85
stopBackgroundTaskMethod · 0.85
detachBackgroundTaskMethod · 0.85
activateSkillMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected