Add account UI and secure session storage
This commit is contained in:
@@ -423,6 +423,28 @@ class ChatCubit extends Cubit<ChatState> {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> reloadForAccountChange() async {
|
||||
if (state.isSending) return;
|
||||
emit(
|
||||
state.copyWith(
|
||||
messages: const [],
|
||||
conversations: const [],
|
||||
clearActiveConversation: true,
|
||||
isLoadingHistory: true,
|
||||
isWorkspaceMode: false,
|
||||
clearSelectedWorkspacePath: true,
|
||||
availableWorkspaceFiles: const [],
|
||||
selectedWorkspaceFiles: const [],
|
||||
clearSelectedSkill: true,
|
||||
requestStatus: RequestStatus.idle,
|
||||
clearAgentProgress: true,
|
||||
clearPendingFileChangeProposal: true,
|
||||
clearError: true,
|
||||
),
|
||||
);
|
||||
await Future.wait([_loadHistory(), _loadAgentSkills()]);
|
||||
}
|
||||
|
||||
Future<void> _saveCurrent(List<ChatMessage> messages) async {
|
||||
if (messages.isEmpty) return;
|
||||
final firstQuestion = messages.firstWhere(
|
||||
|
||||
Reference in New Issue
Block a user