Files
orca/tests/tools/omp-native-title-capture.mjs
T
Neilandshahidbeig-a11y 3632311d0b fix(omp): preserve status after terminal title owner rewrite (#20610)
Validated and independently reviewed OMP integration fix.

Co-authored-by: shahidbeig-a11y <258701601+shahidbeig-a11y@users.noreply.github.com>
2026-09-14 13:56:18 -07:00

19 lines
816 B
JavaScript

// Run under Bun through capture-agent-pty-transcript.mjs; sourceRoot is read-only.
import { resolve } from 'node:path'
import { pathToFileURL } from 'node:url'
const sourceRoot = process.argv[2]
if (!sourceRoot) {
throw new Error('Expected path to the read-only oh-my-pi checkout')
}
const { buildTerminalTitleWithState } = await import(
pathToFileURL(resolve(sourceRoot, 'packages/coding-agent/src/utils/title-generator.ts')).href
)
for (const state of ['working', 'idle', 'attention']) {
for (const label of ['Run a long task', 'release | π : note | OMP ! action required ✦']) {
// Exercise upstream's explicit Windows argument, independently of the capture host OS.
const title = buildTerminalTitleWithState(label, state, 0, true, 'win32')
process.stdout.write(`\x1b]0;${title}\x07`)
}
}