mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 08:03:39 +00:00
fix(agent-status): require spinner for working labels
This commit is contained in:
@@ -195,6 +195,14 @@ describe('collectAgentTitleEvidence', () => {
|
||||
expect(reasonFor(title)).toBe('anchored')
|
||||
})
|
||||
|
||||
it.each(['Droid', 'Hermes', 'Devin'])(
|
||||
'does not treat a bare working label as synthetic identity: %s',
|
||||
(title) => {
|
||||
expect(agentFor(title)).toBeNull()
|
||||
expect(reasonFor(title)).toBe('free-text-only')
|
||||
}
|
||||
)
|
||||
|
||||
it.each([
|
||||
'Claude Code ready',
|
||||
'Claude thinking',
|
||||
@@ -221,7 +229,10 @@ describe('collectAgentTitleEvidence', () => {
|
||||
it.each([
|
||||
['⠋ Cursor Agent', 'cursor'],
|
||||
['⠋ Pi idle', 'pi'],
|
||||
['⠋ OMP done', 'omp']
|
||||
['⠋ OMP done', 'omp'],
|
||||
['⠋ Droid', 'droid'],
|
||||
['⠋ Hermes', 'hermes'],
|
||||
['⠋ Devin', 'devin']
|
||||
] as const)('recognizes the decorated identity frame %s', (title, agent) => {
|
||||
expect(agentFor(title)).toBe(agent)
|
||||
expect(reasonFor(title)).toBe('anchored')
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
GEMINI_SILENT_WORKING,
|
||||
GEMINI_WORKING,
|
||||
HERMES_AGENT_NAME_RE,
|
||||
containsAgentSpinnerGlyph,
|
||||
isClaudeIdentityFrameSegment,
|
||||
isClaudeManagementTitle,
|
||||
isCursorNativeAgentTitle,
|
||||
@@ -196,7 +197,10 @@ function agentForSyntheticTitle(text: string): TuiAgent | null {
|
||||
const profile = SYNTHETIC_AGENT_TITLE_PROFILES[agent]
|
||||
const emittedLabels = [profile.permissionLabel, profile.idleLabel]
|
||||
if (profile.synthesizeWorkingTitle !== false) {
|
||||
emittedLabels.push(profile.workingLabel)
|
||||
// Working labels are emitted only as spinner frames; a bare name is free text.
|
||||
if (containsAgentSpinnerGlyph(trimmed) && normalized === profile.workingLabel.toLowerCase()) {
|
||||
return agent
|
||||
}
|
||||
}
|
||||
if (
|
||||
profile.synthesizeTerminalTitle !== false &&
|
||||
|
||||
Reference in New Issue
Block a user