Commit 1573b3d
fix(ui): use CLI-persisted mode field instead of client-side assistant_mode mutation
- Read message.mode field from CLI-persisted JSON (already stored by opencode)
- Remove client-side assistant_mode mutation in core.lua (lines 145-154)
- Add message.mode to Message type definition, mark assistant_mode as deprecated
- Update session_formatter to prefer message.mode over message.assistant_mode
- Maintain backward compatibility with fallback chain: mode → assistant_mode → current_mode → ASSISTANT
- Eliminates need for client-side mode persistence since CLI handles it1 parent 35eedbe commit 1573b3d
1 file changed
Lines changed: 5 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
319 | 322 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | 323 | | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | 324 | | |
342 | 325 | | |
343 | 326 | | |
| |||
0 commit comments