Commit d21ff4e
committed
fix(core): guard session auto-title against empty names
A persist without uiMessages (turn finalize / compaction) hit the
"New Session" branch with an empty first-user-text, so the generated
title was "" and permanently overwrote the default name. Skip
empty/whitespace titles so the name stays "New Session" until a
persist with real messages regenerates it. Also move
resolveTextAdapter() inside the try/catch to avoid unhandled
rejections.1 parent d6cd5d3 commit d21ff4e
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | 87 | | |
| 88 | + | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
182 | 187 | | |
183 | 188 | | |
184 | 189 | | |
| |||
0 commit comments