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

Function normalizeQueueText

apps/cli/src/commands/cli/stdin-stream.ts:167–178  ·  view source on GitHub ↗
(text: string | undefined)

Source from the content-addressed store, hash-verified

165}
166
167function normalizeQueueText(text: string | undefined): string | undefined {
168 if (!text) {
169 return undefined
170 }
171
172 const compact = text.replace(/\s+/g, " ").trim()
173 if (!compact) {
174 return undefined
175 }
176
177 return compact.length <= 180 ? compact : `${compact.slice(0, 177)}...`
178}
179
180function parseQueueSnapshot(rawQueue: unknown): StreamQueueItem[] | undefined {
181 if (!Array.isArray(rawQueue)) {

Callers 1

parseQueueSnapshotFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected