MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / processText

Method processText

source code/ink/termio/parser.ts:311–339  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

309 }
310
311 private processText(text: string): Action[] {
312 // Handle BEL characters embedded in text
313 const actions: Action[] = []
314 let current = ''
315
316 for (const char of text) {
317 if (char.charCodeAt(0) === C0.BEL) {
318 if (current) {
319 const graphemes = [...segmentGraphemes(current)]
320 if (graphemes.length > 0) {
321 actions.push({ type: 'text', graphemes, style: { ...this.style } })
322 }
323 current = ''
324 }
325 actions.push({ type: 'bell' })
326 } else {
327 current += char
328 }
329 }
330
331 if (current) {
332 const graphemes = [...segmentGraphemes(current)]
333 if (graphemes.length > 0) {
334 actions.push({ type: 'text', graphemes, style: { ...this.style } })
335 }
336 }
337
338 return actions
339 }
340
341 private processSequence(seq: string): Action[] {
342 const seqType = identifySequence(seq)

Callers 1

processTokenMethod · 0.95

Calls 1

segmentGraphemesFunction · 0.85

Tested by

no test coverage detected