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

Function isCompleteDcsSequence

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

* Check if DCS (Device Control String) sequence is complete * DCS sequences: ESC P ... ST (where ST is ESC \) * Used for XTVersion responses like ESC P >| ... ESC \

(data: string)

Source from the content-addressed store, hash-verified

148 * Used for XTVersion responses like ESC P >| ... ESC \
149 */
150function isCompleteDcsSequence(data: string): "complete" | "incomplete" {
151 if (!data.startsWith(`${ESC}P`)) {
152 return "complete";
153 }
154
155 // DCS sequences end with ST (ESC \)
156 if (data.endsWith(`${ESC}\\`)) {
157 return "complete";
158 }
159
160 return "incomplete";
161}
162
163/**
164 * Check if APC (Application Program Command) sequence is complete

Callers 1

isCompleteSequenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected