* Check if APC (Application Program Command) sequence is complete * APC sequences: ESC _ ... ST (where ST is ESC \) * Used for Kitty graphics responses like ESC _ G ... ESC \
(data: string)
| 166 | * Used for Kitty graphics responses like ESC _ G ... ESC \ |
| 167 | */ |
| 168 | function isCompleteApcSequence(data: string): "complete" | "incomplete" { |
| 169 | if (!data.startsWith(`${ESC}_`)) { |
| 170 | return "complete"; |
| 171 | } |
| 172 | |
| 173 | // APC sequences end with ST (ESC \) |
| 174 | if (data.endsWith(`${ESC}\\`)) { |
| 175 | return "complete"; |
| 176 | } |
| 177 | |
| 178 | return "incomplete"; |
| 179 | } |
| 180 | |
| 181 | /** |
| 182 | * Split accumulated buffer into complete sequences |
no outgoing calls
no test coverage detected