mirror of
https://github.com/stablyai/orca.git
synced 2026-11-02 18:17:36 +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>
41 lines
1.6 KiB
TypeScript
41 lines
1.6 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import {
|
|
stripLeadingAgentTitleDecoration,
|
|
stripLeadingAgentTitleDecorationOrEmpty
|
|
} from './agent-title-decoration'
|
|
|
|
describe('stripLeadingAgentTitleDecoration', () => {
|
|
it('strips Qoder permission decoration without stripping triangles inside a title', () => {
|
|
expect(stripLeadingAgentTitleDecoration('▲ Qoder CLI')).toBe('Qoder CLI')
|
|
expect(stripLeadingAgentTitleDecoration('deploy ▲ complete')).toBe('deploy ▲ complete')
|
|
})
|
|
|
|
it("strips Claude's ✳ idle glyph", () => {
|
|
expect(stripLeadingAgentTitleDecoration('✳ Claude Code')).toBe('Claude Code')
|
|
})
|
|
|
|
it("strips Claude's working/idle text prefixes", () => {
|
|
expect(stripLeadingAgentTitleDecoration('. working on the fix')).toBe('working on the fix')
|
|
expect(stripLeadingAgentTitleDecoration('* Claude Code')).toBe('Claude Code')
|
|
})
|
|
|
|
it('strips a leading braille spinner', () => {
|
|
expect(stripLeadingAgentTitleDecoration('⠋ Pi')).toBe('Pi')
|
|
})
|
|
|
|
it('leaves an undecorated title untouched', () => {
|
|
expect(stripLeadingAgentTitleDecoration('Dolphin-2')).toBe('Dolphin-2')
|
|
expect(stripLeadingAgentTitleDecoration('npm run dev')).toBe('npm run dev')
|
|
})
|
|
|
|
it('keeps the original when the title is only a status glyph', () => {
|
|
expect(stripLeadingAgentTitleDecoration('✳')).toBe('✳')
|
|
expect(stripLeadingAgentTitleDecoration('✳ ')).toBe('✳ ')
|
|
})
|
|
|
|
it('can strip to empty when the caller supplies its own fallback label', () => {
|
|
expect(stripLeadingAgentTitleDecorationOrEmpty('✳')).toBe('')
|
|
expect(stripLeadingAgentTitleDecorationOrEmpty('✳ ')).toBe('')
|
|
})
|
|
})
|