mirror of
https://github.com/stablyai/orca.git
synced 2026-11-04 02:57:36 +00:00
* perf(orcad): keep the server bundle ASCII so V8 stores it one byte per character 129 non-ASCII characters in regex literals (and three in a String.raw plugin template) made V8 hold the whole ~11 MB orcad-server.js source as a two-byte string. Write them as \uXXXX escapes and fail the build if any return. Co-Authored-By: Claude <noreply@anthropic.com> * fix(orcad): keep license comments ASCII and name the module the guard trips on esbuild gathers legal comments at the end of the bundle; escape that comment so a dependency's license text cannot fail the ASCII guard, while licenses still ship with the code. The guard now reports the offset and, from an unminified rebuild, the module the character came from. A dark-switch build is covered. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
22 lines
811 B
TypeScript
22 lines
811 B
TypeScript
import { isDshTerminalTitle } from './dsh-terminal-title'
|
|
|
|
// Qoder 1.1.64: one space after the glyph, then a session title and a pipe-delimited status.
|
|
const QODER_DYNAMIC_TITLE_RE = /^[\u2726\u25C7\u25B2] (?! ).*\s\|\s[^|]+$/
|
|
const QODER_LABEL_RE = /^(?:[\u2726\u25C7\u25B2] )?Qoder CLI(?: CN)?(?: \(.*\))?$/
|
|
|
|
export function isQoderTerminalTitle(title: string): boolean {
|
|
if (isDshTerminalTitle(title)) {
|
|
return false
|
|
}
|
|
const trimmed = title.trim()
|
|
return QODER_DYNAMIC_TITLE_RE.test(trimmed) || QODER_LABEL_RE.test(trimmed)
|
|
}
|
|
|
|
export function qoderTitleStatus(title: string): 'working' | 'permission' | 'idle' | null {
|
|
if (!isQoderTerminalTitle(title)) {
|
|
return null
|
|
}
|
|
const glyph = title.trimStart()[0]
|
|
return glyph === '✦' ? 'working' : glyph === '▲' ? 'permission' : 'idle'
|
|
}
|