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

Function shorten

apps/kimi-code/src/tui/utils/export-markdown.ts:34–37  ·  view source on GitHub ↗
(text: string, width: number)

Source from the content-addressed store, hash-verified

32}
33
34function shorten(text: string, width: number): string {
35 if (text.length <= width) return text;
36 return `${text.slice(0, width)}…`;
37}
38
39export function formatContentPartMd(part: ContentPart): string {
40 switch (part.type) {

Callers 2

extractToolCallHintFunction · 0.85
buildOverviewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected