mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 00:57:45 +00:00
fix(native-chat): a refused steer leaves its turn as the chat's latest request (#29907)
A steer Codex answered into a turn that then ended without taking it is rejected and moved to the thread, so the sidebar verdict and the completion feed treated it as a refused request of its own and reported it in place of the turn it joined.
This commit is contained in:
@@ -191,11 +191,15 @@ const ROWS: Row[] = [
|
||||
items: [
|
||||
userEntry('m1', 1),
|
||||
turn('t1', 2, { state: 'completed', outcome: 'success', completedAt: 50 }),
|
||||
userEntry('steer', 3, 't1')
|
||||
userEntry('steer', 3)
|
||||
],
|
||||
submissions: [
|
||||
sent('m1', { dispatchState: 'accepted' }),
|
||||
rejected('steer', 'no active turn to steer', 30)
|
||||
sent('steer', {
|
||||
dispatchState: 'rejected',
|
||||
reason: 'no active turn to steer',
|
||||
answeredInTurn: { turnItemId: 'codex:turn:t1', via: 'steer' }
|
||||
})
|
||||
],
|
||||
outcome: 'success',
|
||||
listed: true
|
||||
|
||||
@@ -82,7 +82,12 @@ export function latestStructuredAgentSessionRequest(
|
||||
}
|
||||
}
|
||||
const submission = rejected.get(item.itemId)
|
||||
if (submission && classifyDispatchRejection(submission).verdict === 'failure') {
|
||||
// Rejection relocates a refused steer to the thread, but its turn remains the request.
|
||||
if (
|
||||
submission &&
|
||||
submission.answeredInTurn?.via !== 'steer' &&
|
||||
classifyDispatchRejection(submission).verdict === 'failure'
|
||||
) {
|
||||
return {
|
||||
kind: 'refused-send',
|
||||
id: item.itemId,
|
||||
|
||||
Reference in New Issue
Block a user