feat(lanes): widen stage auto-detection, fix terminal UTF-8 decode
Add detect rules for plan/review/gate/tests/intake nodes (Agent subagent matches, TaskCreate, broader test-runner regex) so more of the pipeline lights up without an explicit ccam stage call, and fix a review/gate detect overlap where senior-gate-reviewer also matched the generic reviewer pattern. Also fix TerminalView's TextDecoder dropping the `stream: true` flag, which corrupted multi-byte UTF-8 chars split across WebSocket frames.
This commit is contained in:
@@ -76,7 +76,13 @@ export function TerminalView({ runId, wsBaseUrl }: TerminalViewProps) {
|
||||
};
|
||||
sock.onmessage = (event) => {
|
||||
const isArrayBuffer = Object.prototype.toString.call(event.data) === "[object ArrayBuffer]";
|
||||
const data = isArrayBuffer ? decoder.decode(event.data as ArrayBuffer) : event.data;
|
||||
// `stream: true` carries a UTF-8 multi-byte char's trailing bytes over
|
||||
// to the next decode() call when a PTY chunk splits mid-character —
|
||||
// without it, a Vietnamese/accented char split across two WS frames
|
||||
// decodes to garbage on both sides (U+FFFD or stray bytes).
|
||||
const data = isArrayBuffer
|
||||
? decoder.decode(event.data as ArrayBuffer, { stream: true })
|
||||
: event.data;
|
||||
if (typeof data === "string") {
|
||||
// A JSON control frame is the only thing that starts with `{"type"`.
|
||||
if (data.startsWith('{"type"')) {
|
||||
|
||||
Reference in New Issue
Block a user