MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / isCompleteOscSequence

Function isCompleteOscSequence

packages/pi-tui/src/stdin-buffer.ts:132–143  ·  view source on GitHub ↗

* Check if OSC sequence is complete * OSC sequences: ESC ] ... ST (where ST is ESC \ or BEL)

(data: string)

Source from the content-addressed store, hash-verified

130 * OSC sequences: ESC ] ... ST (where ST is ESC \ or BEL)
131 */
132function isCompleteOscSequence(data: string): "complete" | "incomplete" {
133 if (!data.startsWith(`${ESC}]`)) {
134 return "complete";
135 }
136
137 // OSC sequences end with ST (ESC \) or BEL (\x07)
138 if (data.endsWith(`${ESC}\\`) || data.endsWith("\x07")) {
139 return "complete";
140 }
141
142 return "incomplete";
143}
144
145/**
146 * Check if DCS (Device Control String) sequence is complete

Callers 1

isCompleteSequenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected