MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / formatSessionTitle

Function formatSessionTitle

apps/cli/src/commands/cli/list.ts:88–96  ·  view source on GitHub ↗
(task: string)

Source from the content-addressed store, hash-verified

86}
87
88function formatSessionTitle(task: string): string {
89 const compact = task.replace(/\s+/g, " ").trim()
90
91 if (!compact) {
92 return "(untitled)"
93 }
94
95 return compact.length <= 120 ? compact : `${compact.slice(0, 117)}...`
96}
97
98function outputSessionsText(sessions: SessionLike[]): void {
99 for (const session of sessions) {

Callers 1

outputSessionsTextFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected