AX Agent 폴더 데이터 활용 사용자 옵션 제거 및 자동 정책 고정
Some checks failed
Release Gate / gate (push) Has been cancelled
Some checks failed
Release Gate / gate (push) Has been cancelled
- 코워크/코드의 폴더 내 문서 활용을 사용자 설정에서 제거하고 탭별 자동 정책으로 고정 - ChatWindow 하단 데이터 활용 버튼과 AX Agent 내부 설정 row, 메인 설정/구형 설정창의 관련 UI 제거 - Chat/Cowork/Code 탭별 자동 데이터 활용 정책을 none/passive/active로 고정하고 저장 경로에서 사용자 선택값 반영 제거 - README와 DEVELOPMENT 문서에 변경 이력 및 적용 기준 반영 - 검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\verify\ -p:IntermediateOutputPath=obj\verify\ (경고 0 / 오류 0)
This commit is contained in:
@@ -206,7 +206,7 @@ public partial class ChatWindow : Window
|
||||
|
||||
// 설정에서 초기값 로드 (Loaded 전에도 null 방지)
|
||||
_selectedMood = settings.Settings.Llm.DefaultMood ?? "modern";
|
||||
_folderDataUsage = settings.Settings.Llm.FolderDataUsage ?? "none";
|
||||
_folderDataUsage = "none";
|
||||
|
||||
_cursorTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(530) };
|
||||
_cursorTimer.Tick += CursorTimer_Tick;
|
||||
@@ -295,7 +295,7 @@ public partial class ChatWindow : Window
|
||||
// ── 즉시 필요한 UI 초기화만 동기 실행 ──
|
||||
SetupUserInfo();
|
||||
_selectedMood = _settings.Settings.Llm.DefaultMood ?? "modern";
|
||||
_folderDataUsage = _settings.Settings.Llm.FolderDataUsage ?? "none";
|
||||
_folderDataUsage = GetAutomaticFolderDataUsage();
|
||||
UpdateAnalyzerButtonVisibility();
|
||||
UpdateModelLabel();
|
||||
RefreshInlineSettingsPanel();
|
||||
@@ -1815,9 +1815,7 @@ public partial class ChatWindow : Window
|
||||
: fallbackPermission;
|
||||
_settings.Settings.Llm.FilePermission = conversationPermission;
|
||||
|
||||
_folderDataUsage = IsFolderDataAlwaysEnabledTab()
|
||||
? "active"
|
||||
: (conv?.DataUsage ?? llm.FolderDataUsage ?? "none");
|
||||
_folderDataUsage = GetAutomaticFolderDataUsage();
|
||||
_selectedMood = conv?.Mood ?? llm.DefaultMood ?? "modern";
|
||||
}
|
||||
|
||||
@@ -1853,7 +1851,7 @@ public partial class ChatWindow : Window
|
||||
try
|
||||
{
|
||||
var normalizedPermission = PermissionModeCatalog.NormalizeGlobalMode(_settings.Settings.Llm.FilePermission);
|
||||
var dataUsage = IsFolderDataAlwaysEnabledTab() ? "active" : (_folderDataUsage ?? "none");
|
||||
var dataUsage = GetAutomaticFolderDataUsage();
|
||||
var mood = _selectedMood ?? (_settings.Settings.Llm.DefaultMood ?? "modern");
|
||||
var outputFormat = conv.OutputFormat ?? "auto";
|
||||
|
||||
@@ -2259,114 +2257,21 @@ public partial class ChatWindow : Window
|
||||
|
||||
private void BtnDataUsage_Click(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
if (IsFolderDataAlwaysEnabledTab())
|
||||
return;
|
||||
if (DataUsagePopup == null) return;
|
||||
DataUsageItems.Children.Clear();
|
||||
|
||||
var options = new (string Key, string Sym, string Label, string Desc, string Color, string CheckColor)[]
|
||||
{
|
||||
("none", "\uE8D8", "활용하지 않음", "폴더 내 문서를 읽기만 포함해 참조하지 않습니다", "#6B7280", "#6B7280"),
|
||||
("passive", "\uE8FD", "소극 활용", "사용자가 요청할 때만 폴더 데이터를 참조합니다", "#D97706", "#D97706"),
|
||||
("active", "\uE9F5", "적극 활용", "폴더 내 문서를 자동 탐색하여 보고서 작성에 적극 활용합니다", "#107C10", "#107C10"),
|
||||
};
|
||||
|
||||
foreach (var (key, sym, label, desc, color, checkColor) in options)
|
||||
{
|
||||
var isActive = key.Equals(_folderDataUsage, StringComparison.OrdinalIgnoreCase);
|
||||
var row = new Border
|
||||
{
|
||||
Background = isActive ? BrushFromHex("#F8FAFC") : Brushes.Transparent,
|
||||
BorderBrush = isActive ? BrushFromHex("#C7D2FE") : BrushFromHex("#E5E7EB"),
|
||||
BorderThickness = new Thickness(isActive ? 2 : 0, 0, 0, 1),
|
||||
Cursor = Cursors.Hand,
|
||||
Padding = new Thickness(8, 9, 8, 9),
|
||||
Margin = new Thickness(0),
|
||||
};
|
||||
var sp = new StackPanel { Orientation = Orientation.Horizontal };
|
||||
var checkIcon = CreateCheckIcon(isActive);
|
||||
if (checkIcon is TextBlock checkText)
|
||||
checkText.Foreground = isActive ? BrushFromHex(checkColor) : Brushes.Transparent;
|
||||
sp.Children.Add(checkIcon);
|
||||
sp.Children.Add(new TextBlock
|
||||
{
|
||||
Text = sym, FontFamily = new FontFamily("Segoe MDL2 Assets"), FontSize = 14,
|
||||
Foreground = BrushFromHex(color),
|
||||
VerticalAlignment = VerticalAlignment.Center, Margin = new Thickness(0, 0, 10, 0),
|
||||
});
|
||||
var textStack = new StackPanel();
|
||||
textStack.Children.Add(new TextBlock
|
||||
{
|
||||
Text = label, FontSize = 11.5, FontWeight = FontWeights.SemiBold,
|
||||
Foreground = BrushFromHex(color),
|
||||
});
|
||||
textStack.Children.Add(new TextBlock
|
||||
{
|
||||
Text = desc, FontSize = 10.5,
|
||||
Foreground = TryFindResource("SecondaryText") as Brush ?? Brushes.Gray,
|
||||
TextWrapping = TextWrapping.Wrap,
|
||||
MaxWidth = 240,
|
||||
});
|
||||
sp.Children.Add(textStack);
|
||||
row.Child = sp;
|
||||
|
||||
var capturedKey = key;
|
||||
row.MouseEnter += (_, _) =>
|
||||
{
|
||||
row.Background = BrushFromHex("#F8FAFC");
|
||||
row.BorderBrush = isActive ? BrushFromHex("#C7D2FE") : BrushFromHex("#E2E8F0");
|
||||
};
|
||||
row.MouseLeave += (_, _) =>
|
||||
{
|
||||
row.Background = isActive ? BrushFromHex("#F8FAFC") : Brushes.Transparent;
|
||||
row.BorderBrush = isActive ? BrushFromHex("#C7D2FE") : BrushFromHex("#E5E7EB");
|
||||
};
|
||||
row.MouseLeftButtonDown += (_, _) =>
|
||||
{
|
||||
_folderDataUsage = capturedKey;
|
||||
UpdateDataUsageUI();
|
||||
SaveConversationSettings();
|
||||
RefreshOverlayModeButtons();
|
||||
DataUsagePopup.IsOpen = false;
|
||||
};
|
||||
DataUsageItems.Children.Add(row);
|
||||
}
|
||||
DataUsagePopup.IsOpen = true;
|
||||
_folderDataUsage = GetAutomaticFolderDataUsage();
|
||||
}
|
||||
|
||||
private void UpdateDataUsageUI()
|
||||
{
|
||||
if (DataUsageLabel == null || DataUsageIcon == null) return;
|
||||
if (IsFolderDataAlwaysEnabledTab())
|
||||
_folderDataUsage = "active";
|
||||
var (label, icon, color) = _folderDataUsage switch
|
||||
{
|
||||
"none" => ("데이터 미활용", "\uE8D8", "#6B7280"),
|
||||
"passive" => ("데이터 소극", "\uE8FD", "#D97706"),
|
||||
_ => ("데이터 적극", "\uE9F5", "#107C10"),
|
||||
};
|
||||
DataUsageLabel.Text = label;
|
||||
DataUsageIcon.Text = icon;
|
||||
DataUsageIcon.Foreground = BrushFromHex(color);
|
||||
if (BtnDataUsage != null)
|
||||
{
|
||||
BtnDataUsage.Visibility = IsFolderDataAlwaysEnabledTab() ? Visibility.Collapsed : Visibility.Visible;
|
||||
BtnDataUsage.Background = Brushes.Transparent;
|
||||
BtnDataUsage.BorderBrush = Brushes.Transparent;
|
||||
BtnDataUsage.BorderThickness = new Thickness(0);
|
||||
BtnDataUsage.ToolTip = _folderDataUsage switch
|
||||
{
|
||||
"none" => "폴더 문서와 파일을 읽지 않거나 참조하지 않습니다.",
|
||||
"passive" => "사용자가 요청할 때만 폴더 데이터를 참조합니다.",
|
||||
_ => "폴더 문서와 파일을 자동 탐색해 작업에 적극 활용합니다."
|
||||
};
|
||||
}
|
||||
if (IsFolderDataAlwaysEnabledTab() && DataUsagePopup != null)
|
||||
DataUsagePopup.IsOpen = false;
|
||||
_folderDataUsage = GetAutomaticFolderDataUsage();
|
||||
}
|
||||
|
||||
private bool IsFolderDataAlwaysEnabledTab()
|
||||
=> string.Equals(_activeTab, "Code", StringComparison.OrdinalIgnoreCase);
|
||||
private string GetAutomaticFolderDataUsage()
|
||||
=> _activeTab switch
|
||||
{
|
||||
"Code" => "active",
|
||||
"Cowork" => "passive",
|
||||
_ => "none",
|
||||
};
|
||||
|
||||
/// <summary>Cowork/Code 탭 진입 시 설정의 기본 권한을 적용.</summary>
|
||||
private void ApplyTabDefaultPermission()
|
||||
@@ -8652,8 +8557,8 @@ public partial class ChatWindow : Window
|
||||
sb.AppendLine($"File permission mode: {llm.FilePermission}");
|
||||
sb.Append(BuildSubAgentDelegationSection(false));
|
||||
|
||||
// 폴더 데이터 활용 지침
|
||||
switch (_folderDataUsage)
|
||||
// 폴더 데이터 활용 지침 (사용자 옵션이 아닌 탭별 자동 정책)
|
||||
switch (GetAutomaticFolderDataUsage())
|
||||
{
|
||||
case "active":
|
||||
sb.AppendLine("IMPORTANT: Folder Data Usage = ACTIVE. You have 'document_read' and 'folder_map' tools available.");
|
||||
@@ -13964,7 +13869,6 @@ public partial class ChatWindow : Window
|
||||
llm.WorkflowVisualizer = ChkOverlayWorkflowVisualizer?.IsChecked == true;
|
||||
llm.ShowTotalCallStats = ChkOverlayShowTotalCallStats?.IsChecked == true;
|
||||
llm.EnableAuditLog = ChkOverlayEnableAuditLog?.IsChecked == true;
|
||||
llm.FolderDataUsage = _folderDataUsage;
|
||||
|
||||
CommitOverlayEndpointInput(normalizeOnInvalid: true);
|
||||
CommitOverlayApiKeyInput();
|
||||
@@ -14884,12 +14788,6 @@ public partial class ChatWindow : Window
|
||||
OverlayModelEditorPanel.Visibility = showBasic ? Visibility.Visible : Visibility.Collapsed;
|
||||
if (OverlayAnchorPermission != null)
|
||||
OverlayAnchorPermission.Visibility = showBasic ? Visibility.Visible : Visibility.Collapsed;
|
||||
if (IsFolderDataAlwaysEnabledTab())
|
||||
_folderDataUsage = "active";
|
||||
if (OverlayFolderDataUsageRow != null)
|
||||
OverlayFolderDataUsageRow.Visibility = IsFolderDataAlwaysEnabledTab()
|
||||
? Visibility.Collapsed
|
||||
: (showShared || showCowork ? Visibility.Visible : Visibility.Collapsed);
|
||||
if (OverlayTlsRow != null)
|
||||
OverlayTlsRow.Visibility = showChat ? Visibility.Visible : Visibility.Collapsed;
|
||||
if (OverlayAnchorAdvanced != null)
|
||||
@@ -16257,7 +16155,6 @@ public partial class ChatWindow : Window
|
||||
{
|
||||
var llm = _settings.Settings.Llm;
|
||||
SelectComboTag(CmbOverlayOperationMode, OperationModePolicy.Normalize(_settings.Settings.OperationMode));
|
||||
SelectComboTag(CmbOverlayFolderDataUsage, _folderDataUsage);
|
||||
SelectComboTag(CmbOverlayPermission, PermissionModeCatalog.NormalizeGlobalMode(llm.FilePermission));
|
||||
SelectComboTag(CmbOverlayReasoning, llm.AgentDecisionLevel);
|
||||
SelectComboTag(CmbOverlayFastMode, llm.FreeTierMode ? "on" : "off");
|
||||
@@ -16713,19 +16610,7 @@ public partial class ChatWindow : Window
|
||||
|
||||
private void BtnOverlayFolderDataUsage_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (IsFolderDataAlwaysEnabledTab())
|
||||
{
|
||||
_folderDataUsage = "active";
|
||||
PersistOverlaySettingsState(refreshOverlayDeferredInputs: false);
|
||||
return;
|
||||
}
|
||||
_folderDataUsage = _folderDataUsage switch
|
||||
{
|
||||
"none" => "passive",
|
||||
"passive" => "active",
|
||||
_ => "none",
|
||||
};
|
||||
PersistOverlaySettingsState(refreshOverlayDeferredInputs: false);
|
||||
_folderDataUsage = GetAutomaticFolderDataUsage();
|
||||
}
|
||||
|
||||
private void CmbOverlayFastMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@@ -16800,11 +16685,7 @@ public partial class ChatWindow : Window
|
||||
|
||||
private void CmbOverlayFolderDataUsage_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (_isOverlaySettingsSyncing || CmbOverlayFolderDataUsage.SelectedItem is not ComboBoxItem selected || selected.Tag is not string tag)
|
||||
return;
|
||||
|
||||
_folderDataUsage = IsFolderDataAlwaysEnabledTab() ? "active" : tag;
|
||||
PersistOverlaySettingsState(refreshOverlayDeferredInputs: false);
|
||||
_folderDataUsage = GetAutomaticFolderDataUsage();
|
||||
}
|
||||
|
||||
private void CmbOverlayAgentLogLevel_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user