A session with messages belongs to the profile it was created under. Switching profiles while a conversation is in progress should not retag that session or update its workspace/model in place — that would corrupt the session's context. New behavior: - Session has NO messages (empty): profile switch updates it in place (model, workspace). Works exactly as before — nothing was started yet. - Session HAS messages (in progress): profile switch calls newSession() to start a fresh session tagged to the new profile. The old session is left untouched. Toast: 'Switched to profile: X — new conversation started'. - Agent busy: blocked as before, no change. Also: S._profileDefaultWorkspace is now consumed (set to null) inside newSession() after the first use, so it doesn't keep forcing the same workspace on every subsequent new session after a switch.
43 KiB
43 KiB