MCPcopy Index your code
hub / github.com/codeaashu/claude-code / processText

Method processText

src/ink/termio/parser.ts:309–337  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

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

Callers 1

processTokenMethod · 0.95

Calls 2

segmentGraphemesFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected