mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
* Add opt-in generated agent tab titles * Preserve generated titles in remote tab sync Co-authored-by: Orca <help@stably.ai> --------- Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com> Co-authored-by: Orca <help@stably.ai>
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { resolveTerminalTabTitle, resolveUnifiedTabLabel } from './tab-title-resolution'
|
|
|
|
describe('tab title resolution', () => {
|
|
it('uses live terminal titles when generated titles are disabled', () => {
|
|
expect(
|
|
resolveTerminalTabTitle(
|
|
{ customTitle: null, generatedTitle: 'Refactor auth', title: 'Claude working' },
|
|
false
|
|
)
|
|
).toBe('Claude working')
|
|
})
|
|
|
|
it('places generated titles between manual and live titles when enabled', () => {
|
|
expect(
|
|
resolveTerminalTabTitle(
|
|
{ customTitle: null, generatedTitle: 'Refactor auth', title: 'Claude working' },
|
|
true
|
|
)
|
|
).toBe('Refactor auth')
|
|
expect(
|
|
resolveTerminalTabTitle(
|
|
{ customTitle: 'Payments', generatedTitle: 'Refactor auth', title: 'Claude working' },
|
|
true
|
|
)
|
|
).toBe('Payments')
|
|
})
|
|
|
|
it('uses the same priority for unified tab labels', () => {
|
|
expect(
|
|
resolveUnifiedTabLabel(
|
|
{ customLabel: null, generatedLabel: 'Fix flaky tests', label: 'Codex working' },
|
|
true
|
|
)
|
|
).toBe('Fix flaky tests')
|
|
})
|
|
})
|