mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 08:03:20 +00:00
* fix(terminal): separate composer drafts from read output Rendered screen reads treated cursor-line suggestion overlays as PTY output. Detect composer-owned text from cell attributes and cursor context, remove it from tail, and expose it as structured draft metadata. * fix(terminal): handle wrapped composer overlays * fix(terminal): preserve draft wrapping and tail alignment * fix(terminal): preserve composer wrap boundaries * fix(terminal): preserve draft continuations with middle dots * fix(terminal): recognize configurable Codex status lines
22 lines
635 B
TypeScript
22 lines
635 B
TypeScript
import { describe, expect, it } from 'vitest'
|
||
import { formatTerminalRead } from './terminal-format'
|
||
|
||
describe('formatTerminalRead draft separation', () => {
|
||
it('labels composer drafts outside terminal output', () => {
|
||
const output = formatTerminalRead({
|
||
terminal: {
|
||
handle: 'term_1',
|
||
status: 'running',
|
||
tail: ['Build passed', '❯'],
|
||
truncated: false,
|
||
nextCursor: null,
|
||
source: 'screen',
|
||
draft: 'proceed with the release'
|
||
}
|
||
})
|
||
|
||
expect(output).toContain('draft: "proceed with the release"')
|
||
expect(output).toContain('\n\nBuild passed\n❯')
|
||
})
|
||
})
|