MCPcopy Create free account
hub / github.com/experdot/pointer / truncateContent

Function truncateContent

src/renderer/src/services/titleService.ts:138–141  ·  view source on GitHub ↗

* 截断内容到指定长度

(content: string, maxLength: number = 500)

Source from the content-addressed store, hash-verified

136 * 截断内容到指定长度
137 */
138function truncateContent(content: string, maxLength: number = 500): string {
139 if (content.length <= maxLength) return content
140 return content.slice(0, maxLength) + '...'
141}
142
143/**
144 * 使用 AI 生成文本(简化的非流式调用)

Callers 8

generateMessageTitleFunction · 0.85
generateTopicTitleFunction · 0.85
suggestNewTopicFunction · 0.85
analyzeTopicSegmentsFunction · 0.85
generateSessionTitleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected