mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 16:02:32 +00:00
Validated and independently reviewed OMP integration fix. Co-authored-by: shahidbeig-a11y <258701601+shahidbeig-a11y@users.noreply.github.com>
19 lines
816 B
JavaScript
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`)
|
|
}
|
|
}
|