fix(frontend): refine streamed presentation and resolve stream edge cases

This commit is contained in:
Justin Visser 2026-08-10 21:38:14 +02:00
parent a3af8f45cc
commit 2cc33a721c
18 changed files with 450 additions and 46 deletions

View file

@ -7,7 +7,7 @@ import {
PRIOR_RECOMMENDATIONS_MAX_TRACKS,
QUERY_MAX_LENGTH,
} from '../lib/constants'
import { formatMessage, messages } from '../lib/messages'
import { messages } from '../lib/messages'
import type { AssistantTurn, ChatTurn, EventLogEntry, TransportFailure } from '../lib/models'
import { EMPTY_PLAYLIST_STATE } from '../lib/models'
import {
@ -101,9 +101,7 @@ function reduceEvent(turn: AssistantTurn, event: StreamEvent): AssistantTurn {
}
function playlistName(query: string): string {
return formatMessage('useChatStreamPlaylistName', { query })
.slice(0, PLAYLIST_NAME_MAX_LENGTH)
.trim()
return query.slice(0, PLAYLIST_NAME_MAX_LENGTH).trim()
}
function createTurnId(): string {