mirror of
https://github.com/stablyai/orca.git
synced 2026-10-13 00:02:54 +00:00
feat: add first-class Qoder CLI support Integrate Qoder launch, identity, canonical hook status, trust and resume. Verify with captured Qoder 1.1.64 transcripts and hidden Electron sidebar checks. Builds on and cross-reviews #7502, #8611, #9655, #12910, #13311 and #15291. Co-authored-by: dalveytech-vincent <vincent@dalveytech.com> Co-authored-by: Eridanus117 <45489268+Eridanus117@users.noreply.github.com> Co-authored-by: xingqingzzp-gif <xingqingzzp-gif@users.noreply.github.com> Co-authored-by: jyang2004 <jyang2004@users.noreply.github.com> Co-authored-by: yunqian <yunqian@alibaba-inc.com> Co-authored-by: huzhening.hzn <huzhening.hzn@alibaba-inc.com>
22 lines
793 B
TypeScript
22 lines
793 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 = /^[✦◇▲] (?! ).*\s\|\s[^|]+$/
|
|
const QODER_LABEL_RE = /^(?:[✦◇▲] )?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'
|
|
}
|