[Phase 17-UI-B] 헤더 바 모델·권한 칩 추가

ChatWindow.xaml:
- 서브 헤더 바(Row 1) 우측에 ModelHeaderChip 버튼 추가
  (Segoe MDL2 브레인 아이콘 + ModelHeaderLabel TextBlock)
- 서브 헤더 바 우측에 PermissionHeaderChip 버튼 추가
  (잠금 아이콘 #4FC3F7 + PermissionHeaderLabel TextBlock)

ChatWindow.ModelSelector.cs:
- UpdateModelLabel(): ModelHeaderLabel 동기 갱신 코드 추가

ChatWindow.PermissionMenu.cs:
- UpdatePermissionUI(): PermissionHeaderLabel 동기 갱신 코드 추가
- PermissionHeaderChip_Click() 신규: PlacementTarget을 헤더 칩으로
  교체 후 기존 BtnPermission_Click 호출

ChatWindow.xaml.cs:
- Loaded 핸들러에 UpdatePermissionUI() 초기 호출 추가

docs/NEXT_ROADMAP.md:
- Phase 17-UI-B 완료 항목 추가

빌드: 경고 0, 오류 0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-03 22:05:30 +09:00
parent e7aa107b16
commit 26c20cf3dc
5 changed files with 73 additions and 4 deletions

View File

@@ -139,7 +139,11 @@ public partial class ChatWindow
"vllm" => "vLLM",
_ => "Ollama",
};
ModelLabel.Text = $"{serviceLabel} · {GetCurrentModelDisplayName()}";
var modelName = GetCurrentModelDisplayName();
ModelLabel.Text = $"{serviceLabel} · {modelName}";
// Phase 17-UI-B: 헤더 바 모델 칩도 갱신
if (ModelHeaderLabel != null)
ModelHeaderLabel.Text = $"{serviceLabel} · {modelName}";
}
private void BtnModelSelector_Click(object sender, RoutedEventArgs e)

View File

@@ -101,11 +101,23 @@ public partial class ChatWindow
AutoPermissionWarning.Visibility = Visibility.Collapsed;
}
/// <summary>Phase 17-UI-B: 헤더 바 권한 칩 클릭 — 권한 팝업을 칩 위치에 표시.</summary>
private void PermissionHeaderChip_Click(object sender, RoutedEventArgs e)
{
if (PermissionPopup == null) return;
// 팝업 기준점을 헤더 칩으로 변경
PermissionPopup.PlacementTarget = PermissionHeaderChip;
PermissionPopup.Placement = System.Windows.Controls.Primitives.PlacementMode.Bottom;
BtnPermission_Click(sender, e);
}
private void UpdatePermissionUI()
{
if (PermissionLabel == null || PermissionIcon == null) return;
var perm = Llm.FilePermission;
PermissionLabel.Text = perm;
// Phase 17-UI-B: 헤더 칩 텍스트도 갱신
if (PermissionHeaderLabel != null) PermissionHeaderLabel.Text = perm;
PermissionIcon.Text = perm switch
{
"Auto" => "\uE73E",

View File

@@ -340,12 +340,25 @@
KeyDown="ChatTitleEdit_KeyDown"/>
</Grid>
</StackPanel>
<!-- 우: Plan 모드 + 프리뷰 토글 버튼 -->
<!-- 우: 모델 칩 + Plan 모드 + 권한 칩 + 프리뷰 토글 버튼 -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
<!-- Phase 17-UI-B: 모델 표시 칩 (클릭 → 모델 선택기) -->
<Button x:Name="ModelHeaderChip" Style="{StaticResource OutlineHoverBtn}"
Click="BtnModelSelector_Click"
ToolTip="모델 변경" Margin="0,0,4,0" Padding="7,3">
<StackPanel Orientation="Horizontal">
<TextBlock Text="&#xEA86;" FontFamily="Segoe MDL2 Assets" FontSize="10"
Foreground="{DynamicResource SecondaryText}"
VerticalAlignment="Center" Margin="0,0,4,0"/>
<TextBlock x:Name="ModelHeaderLabel" Text="" FontSize="11"
Foreground="{DynamicResource SecondaryText}"
VerticalAlignment="Center"/>
</StackPanel>
</Button>
<!-- Plan 모드 토글 (Off/Auto/Always 3단 순환 클릭) -->
<Border x:Name="BtnPlanMode" Cursor="Hand"
CornerRadius="6" Padding="6,3"
Background="#1A4B5EFC" Margin="0,0,8,0"
Background="#1A4B5EFC" Margin="0,0,6,0"
MouseLeftButtonUp="BtnPlanMode_Click"
ToolTip="Plan 모드: 에이전트가 실행 전 계획을 수립합니다">
<StackPanel Orientation="Horizontal">
@@ -360,6 +373,19 @@
VerticalAlignment="Center" Margin="4,0,0,0"/>
</StackPanel>
</Border>
<!-- Phase 17-UI-B: 권한 모드 표시 칩 (클릭 → 권한 팝업) -->
<Button x:Name="PermissionHeaderChip" Style="{StaticResource OutlineHoverBtn}"
Click="PermissionHeaderChip_Click"
ToolTip="파일 접근 권한 모드 변경" Margin="0,0,6,0" Padding="7,3">
<StackPanel Orientation="Horizontal">
<TextBlock Text="&#xE72E;" FontFamily="Segoe MDL2 Assets" FontSize="10"
Foreground="#4FC3F7"
VerticalAlignment="Center" Margin="0,0,4,0"/>
<TextBlock x:Name="PermissionHeaderLabel" Text="Ask" FontSize="11"
Foreground="{DynamicResource SecondaryText}"
VerticalAlignment="Center"/>
</StackPanel>
</Button>
<Button x:Name="BtnPreviewToggle" Style="{StaticResource GhostBtn}"
Click="BtnPreviewToggle_Click" ToolTip="미리보기 패널" Visibility="Collapsed"
Padding="8,4">

View File

@@ -127,6 +127,7 @@ public partial class ChatWindow : Window
UpdateAnalyzerButtonVisibility();
UpdateModelLabel();
UpdatePlanModeUI();
UpdatePermissionUI(); // Phase 17-UI-B: 헤더 권한 칩 초기화
InputBox.Focus();
MessageScroll.ScrollChanged += MessageScroll_ScrollChanged;