mirror of
https://github.com/stablyai/orca.git
synced 2026-10-18 08:03:22 +00:00
test(native-chat): clarify that lifecycle field is optional
Add type assertion and comment documenting that lifecycle field is optional and can be omitted in truncation-gating test fixtures.
This commit is contained in:
@@ -8,9 +8,17 @@ const OVERSIZED = 'x'.repeat(5000)
|
||||
const cachedResult = vi.hoisted(() => ({
|
||||
value: {
|
||||
messages: [] as NativeChatMessage[],
|
||||
// Optional so truncation-gating fixtures can omit it; lifecycle tests set it explicitly.
|
||||
lifecycle: undefined as
|
||||
| { state: 'working' | 'completed' | 'interrupted'; turnId: string; timestamp: number | null }
|
||||
| undefined
|
||||
} as {
|
||||
messages: NativeChatMessage[]
|
||||
lifecycle?: {
|
||||
state: 'working' | 'completed' | 'interrupted'
|
||||
turnId: string
|
||||
timestamp: number | null
|
||||
}
|
||||
}
|
||||
}))
|
||||
const watcher = vi.hoisted(() => ({
|
||||
|
||||
Reference in New Issue
Block a user