Show the chat mode control as soon as the session names its mode
A created chat's reply carried no mode, and the chat destination kept the first row it opened for the whole visit, ignoring later list re-reads, so the mode control only appeared after closing and reopening the chat. The server now names the mode on a created row, and the destination adopts each listed row that a re-read changed (excluding the live running flag), so the open conversation follows new, refreshed and other-device mode changes in place.
This commit is contained in:
@@ -293,7 +293,9 @@ func (m *chatManager) CreateBackend(ctx context.Context, title, directory, backe
|
||||
m.mu.Lock()
|
||||
m.cache[session.ID] = backend
|
||||
m.mu.Unlock()
|
||||
return session, nil
|
||||
// The created row names its mode like a listed one, so the opened chat
|
||||
// shows the mode control at once rather than after the list re-reads.
|
||||
return m.withMode(ctx, session), nil
|
||||
}
|
||||
|
||||
func (m *chatManager) Create(ctx context.Context, title, directory string) (protocol.ChatSession, error) {
|
||||
|
||||
Reference in New Issue
Block a user