[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:
@@ -4866,5 +4866,31 @@ ThemeResourceHelper에 5개 정적 필드 추가:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
최종 업데이트: 2026-04-03 (Phase 22~52 + Phase 17-UI-A 구현 완료)
|
## Phase 17-UI-B — 헤더 바 모델·권한 칩 추가 (v1.8.0) ✅ 완료
|
||||||
|
|
||||||
|
> **목표**: 서브 헤더 바(Row 1)에 현재 모델과 권한 모드를 항상 노출.
|
||||||
|
> 클릭 시 각각 모델 선택기·권한 팝업을 인라인으로 열어 UX 일관성 강화.
|
||||||
|
|
||||||
|
### 변경 파일
|
||||||
|
|
||||||
|
| 파일 | 변경 내용 |
|
||||||
|
|------|----------|
|
||||||
|
| `ChatWindow.xaml` | 서브 바 우측에 `ModelHeaderChip` Button 추가: 브레인 아이콘 + `ModelHeaderLabel` TextBlock |
|
||||||
|
| `ChatWindow.xaml` | 서브 바 우측에 `PermissionHeaderChip` Button 추가: 잠금 아이콘(#4FC3F7) + `PermissionHeaderLabel` TextBlock |
|
||||||
|
| `ChatWindow.ModelSelector.cs` | `UpdateModelLabel()`: `ModelHeaderLabel` 동기 갱신 코드 추가 |
|
||||||
|
| `ChatWindow.PermissionMenu.cs` | `UpdatePermissionUI()`: `PermissionHeaderLabel` 동기 갱신 코드 추가 |
|
||||||
|
| `ChatWindow.PermissionMenu.cs` | `PermissionHeaderChip_Click()` 신규: 팝업 PlacementTarget을 헤더 칩으로 교체 후 기존 권한 팝업 호출 |
|
||||||
|
| `ChatWindow.xaml.cs` | `Loaded` 핸들러: `UpdatePermissionUI()` 초기 호출 추가 |
|
||||||
|
|
||||||
|
### 개선 효과
|
||||||
|
|
||||||
|
- 서브 헤더 바에서 현재 모델(예: "Claude · Sonnet 4.6")과 권한 모드(예: "Ask") 상시 확인 가능
|
||||||
|
- `ModelHeaderChip` 클릭 → 기존 모델 선택 팝업 즉시 열림
|
||||||
|
- `PermissionHeaderChip` 클릭 → 권한 팝업이 헤더 칩 기준 하단으로 올바르게 열림
|
||||||
|
- 탭 전환·설정 변경 시 양쪽 칩(폴더 바 + 헤더 바) 동시 갱신
|
||||||
|
- **빌드**: 경고 0, 오류 0
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
최종 업데이트: 2026-04-03 (Phase 22~52 + Phase 17-UI-A~B 구현 완료)
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,11 @@ public partial class ChatWindow
|
|||||||
"vllm" => "vLLM",
|
"vllm" => "vLLM",
|
||||||
_ => "Ollama",
|
_ => "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)
|
private void BtnModelSelector_Click(object sender, RoutedEventArgs e)
|
||||||
|
|||||||
@@ -101,11 +101,23 @@ public partial class ChatWindow
|
|||||||
AutoPermissionWarning.Visibility = Visibility.Collapsed;
|
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()
|
private void UpdatePermissionUI()
|
||||||
{
|
{
|
||||||
if (PermissionLabel == null || PermissionIcon == null) return;
|
if (PermissionLabel == null || PermissionIcon == null) return;
|
||||||
var perm = Llm.FilePermission;
|
var perm = Llm.FilePermission;
|
||||||
PermissionLabel.Text = perm;
|
PermissionLabel.Text = perm;
|
||||||
|
// Phase 17-UI-B: 헤더 칩 텍스트도 갱신
|
||||||
|
if (PermissionHeaderLabel != null) PermissionHeaderLabel.Text = perm;
|
||||||
PermissionIcon.Text = perm switch
|
PermissionIcon.Text = perm switch
|
||||||
{
|
{
|
||||||
"Auto" => "\uE73E",
|
"Auto" => "\uE73E",
|
||||||
|
|||||||
@@ -340,12 +340,25 @@
|
|||||||
KeyDown="ChatTitleEdit_KeyDown"/>
|
KeyDown="ChatTitleEdit_KeyDown"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<!-- 우: Plan 모드 + 프리뷰 토글 버튼 -->
|
<!-- 우: 모델 칩 + Plan 모드 + 권한 칩 + 프리뷰 토글 버튼 -->
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
|
<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="" 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단 순환 클릭) -->
|
<!-- Plan 모드 토글 (Off/Auto/Always 3단 순환 클릭) -->
|
||||||
<Border x:Name="BtnPlanMode" Cursor="Hand"
|
<Border x:Name="BtnPlanMode" Cursor="Hand"
|
||||||
CornerRadius="6" Padding="6,3"
|
CornerRadius="6" Padding="6,3"
|
||||||
Background="#1A4B5EFC" Margin="0,0,8,0"
|
Background="#1A4B5EFC" Margin="0,0,6,0"
|
||||||
MouseLeftButtonUp="BtnPlanMode_Click"
|
MouseLeftButtonUp="BtnPlanMode_Click"
|
||||||
ToolTip="Plan 모드: 에이전트가 실행 전 계획을 수립합니다">
|
ToolTip="Plan 모드: 에이전트가 실행 전 계획을 수립합니다">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
@@ -360,6 +373,19 @@
|
|||||||
VerticalAlignment="Center" Margin="4,0,0,0"/>
|
VerticalAlignment="Center" Margin="4,0,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</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="" 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}"
|
<Button x:Name="BtnPreviewToggle" Style="{StaticResource GhostBtn}"
|
||||||
Click="BtnPreviewToggle_Click" ToolTip="미리보기 패널" Visibility="Collapsed"
|
Click="BtnPreviewToggle_Click" ToolTip="미리보기 패널" Visibility="Collapsed"
|
||||||
Padding="8,4">
|
Padding="8,4">
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public partial class ChatWindow : Window
|
|||||||
UpdateAnalyzerButtonVisibility();
|
UpdateAnalyzerButtonVisibility();
|
||||||
UpdateModelLabel();
|
UpdateModelLabel();
|
||||||
UpdatePlanModeUI();
|
UpdatePlanModeUI();
|
||||||
|
UpdatePermissionUI(); // Phase 17-UI-B: 헤더 권한 칩 초기화
|
||||||
InputBox.Focus();
|
InputBox.Focus();
|
||||||
MessageScroll.ScrollChanged += MessageScroll_ScrollChanged;
|
MessageScroll.ScrollChanged += MessageScroll_ScrollChanged;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user