diff --git a/app/lib/ui/screens/chat_screen.dart b/app/lib/ui/screens/chat_screen.dart index f50bfbb..a8e8727 100644 --- a/app/lib/ui/screens/chat_screen.dart +++ b/app/lib/ui/screens/chat_screen.dart @@ -4,6 +4,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../ai/tools/tool_envelope.dart'; import '../../state/chat_providers.dart'; import '../../state/chat_warmup_provider.dart'; +import 'settings_screen.dart'; /// AI chat surface (#260). Multi-turn tool calling powered by Gemma 4 + /// in-process tool runtime. ConfirmGate modals appear on destructive @@ -179,7 +180,9 @@ class _ChatScreenState extends ConsumerState { } } -/// #311 AC5 / UX R5+R6: 실패 메시지는 상태만 기술, 행동은 [다시 시도] 버튼. +/// #311 AC5 / UX R5+R6: 실패 메시지는 상태만 기술, 행동은 버튼이 담당. +/// fileMissing 은 retry 로 회복 불가 — 설정 화면으로 유도해 재다운로드 경로를 연다. +/// runtime 은 일시적일 수 있으므로 [다시 시도] (in-place retry). class _WarmupErrorBanner extends ConsumerWidget { final ChatWarmupFailed warmup; const _WarmupErrorBanner({required this.warmup}); @@ -187,6 +190,8 @@ class _WarmupErrorBanner extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final theme = Theme.of(context); + final isFileMissing = + warmup.kind == ChatWarmupFailureKind.fileMissing; return Container( width: double.infinity, color: theme.colorScheme.errorContainer, @@ -203,9 +208,15 @@ class _WarmupErrorBanner extends ConsumerWidget { alignment: Alignment.centerRight, child: OutlinedButton( onPressed: () { - ref.read(chatWarmupProvider.notifier).retry(); + if (isFileMissing) { + Navigator.of(context).push(MaterialPageRoute( + builder: (_) => const SettingsScreen(), + )); + } else { + ref.read(chatWarmupProvider.notifier).retry(); + } }, - child: const Text('다시 시도'), + child: Text(isFileMissing ? '설정으로 가기' : '다시 시도'), ), ), ],