fmt(js): npm run fix on merge (#71196)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
hermes-seaeye[bot] 2026-07-25 04:51:19 +00:00 committed by GitHub
parent 62e07223d6
commit 9823f15f6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 17 deletions

View file

@ -81,7 +81,10 @@ describe('useMessageStream agent-init error surfacing (#63078)', () => {
act(() =>
handleEvent!({
payload: { message: 'agent initialization timed out after 601s — your message was not sent; retry once the session is ready' },
payload: {
message:
'agent initialization timed out after 601s — your message was not sent; retry once the session is ready'
},
session_id: SID,
type: 'error'
})

View file

@ -437,12 +437,7 @@ export function useMessageStream({
)
const completeAssistantMessage = useCallback(
(
sessionId: string,
text: string,
responsePreviewed?: boolean,
failure?: { error: string; partial: boolean }
) => {
(sessionId: string, text: string, responsePreviewed?: boolean, failure?: { error: string; partial: boolean }) => {
let shouldHydrate = false
const completedState = updateSessionState(sessionId, state => {

View file

@ -565,9 +565,9 @@ describe('appendLiveSessionProjection', () => {
const userRows = restored.filter(message => message.role === 'user')
expect(userRows).toHaveLength(1)
expect(userRows[0].id).toBe('stored-user')
const userText = userRows[0].parts
.map(part => ('text' in part ? part.text : ''))
.join('')
const userText = userRows[0].parts.map(part => ('text' in part ? part.text : '')).join('')
expect(userText).toBe('current running prompt')
})

View file

@ -367,6 +367,7 @@ export function appendLiveSessionProjection(
// Only suppress the projection when the latest authoritative user row is the
// same turn — older identical prompts must not hide a newly accepted repeat.
const latestUser = [...messages].reverse().find(message => message.role === 'user')
const inflightUserAlreadyPersisted =
latestUser && textWithoutImageRefs(chatMessageText(latestUser)) === textWithoutImageRefs(inflightUser)

View file

@ -250,13 +250,7 @@ describe('toChatMessages', () => {
}
])
expect(messages.map(message => message.role)).toEqual([
'user',
'assistant',
'system',
'system',
'system'
])
expect(messages.map(message => message.role)).toEqual(['user', 'assistant', 'system', 'system', 'system'])
expect(messages.map(chatMessageText)).toEqual([
'real user turn',
'real assistant reply',