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

Function getContentPreview

src/renderer/src/services/messagesService.ts:417–420  ·  view source on GitHub ↗
(content: string, maxLen = 30)

Source from the content-addressed store, hash-verified

415
416 // 截取消息内容作为预览
417 const getContentPreview = (content: string, maxLen = 30): string => {
418 const text = content.replace(/\n/g, ' ').trim()
419 return text.length > maxLen ? text.slice(0, maxLen) + '...' : text
420 }
421
422 // 遍历当前路径
423 for (const msg of currentPath) {

Callers 1

computeOutlineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected