refactor(desktop): reorganize workspace panels and navigation
This commit is contained in:
1 parent
826745b407
commit
1f73765745
92 files changed
+5811
-2650
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import 'package:cutdex/shared/widgets/error_notification_host.dart';
|
||||
|
||||
import '../../shared/layout/composer_layout.dart';
|
||||
import '../../shared/theme/composer_style.dart';
|
||||
|
||||
@@ -18,7 +20,7 @@ import 'package:cutdex_ui/theme.dart';
|
||||
import 'package:cutdex_ui/widgets.dart';
|
||||
|
||||
import '../../shared/widgets/drop_to_add_overlay.dart';
|
||||
import '../settings/settings_dialog.dart';
|
||||
import '../settings/settings_page.dart';
|
||||
import 'chat_controller.dart';
|
||||
import 'chat_state.dart';
|
||||
import '../../integrations/agent/conversation_repository.dart';
|
||||
@@ -360,8 +362,10 @@ class _AgentChatPanelState extends ConsumerState<AgentChatPanel> {
|
||||
if (saved) {
|
||||
setState(() => _usingDraftModel = true);
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(context.l10n.agentSaveSettingsFailed)),
|
||||
ErrorNotificationHost.of(context).show(
|
||||
ErrorNotification(
|
||||
content: Text(context.l10n.agentSaveSettingsFailed),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -374,7 +378,7 @@ class _AgentChatPanelState extends ConsumerState<AgentChatPanel> {
|
||||
return TextButton.icon(
|
||||
key: const Key('agent-configure-model'),
|
||||
style: compactButtonStyle,
|
||||
onPressed: () => showSettingsDialog(context, initialTab: 1),
|
||||
onPressed: () => showSettingsPage(context, initialTab: 1),
|
||||
icon: const Icon(Icons.tune, size: 16),
|
||||
label: Text(context.l10n.agentConfigureModel),
|
||||
);
|
||||
@@ -398,11 +402,11 @@ class _AgentChatPanelState extends ConsumerState<AgentChatPanel> {
|
||||
AppMenuItem(
|
||||
label: context.l10n.agentConfigureModel,
|
||||
selectOption: true,
|
||||
onPressed: () => showSettingsDialog(context, initialTab: 1),
|
||||
onPressed: () => showSettingsPage(context, initialTab: 1),
|
||||
),
|
||||
],
|
||||
builder: (context, toggle, focus) => TextButton(
|
||||
key: const Key('agent-model-picker'),
|
||||
builder: (context, toggle, focus) => AppToolbarDropdownButton(
|
||||
buttonKey: const Key('agent-model-picker'),
|
||||
focusNode: focus,
|
||||
onPressed: () {
|
||||
if (!state.busy && !_choosingModel) toggle?.call();
|
||||
|
||||
Reference in new issue
Block a user