mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 08:03:39 +00:00
fix(tests): type the escape-inference helper from the snapshot row
The helper declared a hand-written structural shape for its baseline, but the snapshot payload's fields are optional, so TS2345 rejected every call site.
This commit is contained in:
@@ -52,14 +52,13 @@ function ingestWorking(
|
||||
return server.getStatusSnapshot()[0]!
|
||||
}
|
||||
|
||||
// Why: take the snapshot row type itself rather than a hand-written structural
|
||||
// shape - the payload's fields are optional, so a narrower literal type does not
|
||||
// accept it and typecheck fails (tests are excluded from the mobile tsconfig but
|
||||
// not from this one).
|
||||
function inferEscape(
|
||||
server: AgentHookServer,
|
||||
baseline: {
|
||||
receivedAt: number
|
||||
stateStartedAt: number
|
||||
prompt: string
|
||||
agentType: string | undefined
|
||||
}
|
||||
baseline: ReturnType<AgentHookServer['getStatusSnapshot']>[0]
|
||||
) {
|
||||
return server.inferInterrupt({
|
||||
paneKey: PANE,
|
||||
|
||||
Reference in New Issue
Block a user