mirror of
https://github.com/stablyai/orca.git
synced 2026-10-13 08:02:52 +00:00
* feat(agent-launch): let a caller reserve the chat session and carry session picks to a terminal launch * fix(agent-launch): keep a caller-minted session id named for its agent, and mint the fallback the same way * test(mobile): model the older host from the launch fields, not the refined schema * docs(agent-launch): describe the reserved session id as conversation identity, not placement The caller mints the session id so it knows which conversation it started; tab placement is not keyed on it. Also puts the terminal surface's doc comment back on createTerminalSurface. * docs(agent-launch): say a terminal launch reads the session picks on the wire contract The `sessionOptions` field doc still said a terminal launch ignores them, which this branch changed. * fix(agent-launch): check a reserved session id's token after the agent name, not the whole id A hyphenated agent name failed the one-token check, so any session id for such an agent was refused at the wire, while every other agent without a chat has its id ignored on the terminal.
21 lines
662 B
TypeScript
21 lines
662 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { toAgentLaunchPreferences } from './agent-launch-preferences'
|
|
|
|
describe('toAgentLaunchPreferences', () => {
|
|
it('keeps only supported string launch preferences', () => {
|
|
expect(
|
|
toAgentLaunchPreferences({
|
|
model: ' gpt-5 ',
|
|
effort: 'high',
|
|
mode: 'plan',
|
|
fastMode: true
|
|
})
|
|
).toEqual({ model: 'gpt-5', effort: 'high', mode: 'plan' })
|
|
})
|
|
|
|
it('answers nothing when no preference survives', () => {
|
|
expect(toAgentLaunchPreferences({ model: ' ', fastMode: true })).toBeUndefined()
|
|
expect(toAgentLaunchPreferences(undefined)).toBeUndefined()
|
|
})
|
|
})
|