fmt(js): npm run fix on merge (#70455)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
github-actions[bot]
parent
7b65073dc9
commit
a7a696ba59
@@ -527,6 +527,7 @@ export function useGatewayEventHandler(deps: GatewayEventDeps) {
|
||||
const header = idx && cnt ? `◇ Reference ${idx}/${cnt} — ${label}` : `◇ Reference — ${label}`
|
||||
const body = coerceThinkingText(payload?.text)
|
||||
const text = `${header}\n${body}\n\n`
|
||||
|
||||
if (idx === undefined || idx <= 1) {
|
||||
// First reference: clear any stale reasoning left over from
|
||||
// before this turn's references start, same as before.
|
||||
@@ -564,9 +565,11 @@ export function useGatewayEventHandler(deps: GatewayEventDeps) {
|
||||
// block, so the progress trail is self-cleaning.
|
||||
if (sessionId && typeof payload?.refs_done === 'number' && typeof payload?.refs_total === 'number') {
|
||||
const label = coerceGatewayText(payload?.label)
|
||||
|
||||
const line = label
|
||||
? `◇ MoA refs ${payload.refs_done}/${payload.refs_total} — ${label}\n`
|
||||
: `◇ MoA refs ${payload.refs_done}/${payload.refs_total}\n`
|
||||
|
||||
appendReasoningDelta(sessionId, line, payload.refs_done <= 1)
|
||||
flushQueuedDeltas(sessionId)
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ describe('useMessageStream moa.reference accumulation (#64658)', () => {
|
||||
emit('moa.reference', { count: 3, index: 3, label: 'model-c', text: 'advice-c' })
|
||||
|
||||
const text = reasoningText()
|
||||
|
||||
const orderOk =
|
||||
text.indexOf('advice-a') < text.indexOf('advice-b') && text.indexOf('advice-b') < text.indexOf('advice-c')
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ describe('shouldShowThinkingTrail', () => {
|
||||
thinking: '◇ Reference 1/2 — model-a\nadvice-a',
|
||||
isMoaReference: true
|
||||
} as const
|
||||
|
||||
expect(shouldShowThinkingTrail(msg, 'hidden', 'hidden', 'hidden')).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user