Update run title inference logic to set title only when it is not already defined.

removes bug where the chat session name updates to the latest user message while generating, before switching back to the original name.
This commit is contained in:
tusharmagar 2026-04-02 09:43:03 +05:30
parent 48edd98fe0
commit bc929b6c1b

View file

@ -1863,7 +1863,7 @@ function App() {
const inferredTitle = inferRunTitleFromMessage(msg.content)
if (inferredTitle) {
setRuns(prev => prev.map(run => (
run.id === event.runId && run.title !== inferredTitle
run.id === event.runId && !run.title
? { ...run, title: inferredTitle }
: run
)))