작업 폴더 선택 팝업을 검색과 요약 스트립 중심 구조에서 최근 폴더 목록 중심 구조로 재구성했다. 현재 선택 체크가 보이는 최근 폴더 목록과 다른 폴더 선택 액션만 남겨 캡처와 비슷한 빠른 선택 흐름으로 정리했다. 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:
@@ -1502,48 +1502,23 @@
|
||||
AllowsTransparency="True" PopupAnimation="Fade">
|
||||
<Border Background="{DynamicResource LauncherBackground}"
|
||||
BorderBrush="{DynamicResource BorderColor}"
|
||||
BorderThickness="1" CornerRadius="16">
|
||||
BorderThickness="1"
|
||||
CornerRadius="16"
|
||||
MinWidth="286"
|
||||
MaxWidth="332">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect BlurRadius="22" ShadowDepth="0" Opacity="0.14"/>
|
||||
</Border.Effect>
|
||||
<StackPanel Margin="0">
|
||||
<TextBlock Text="워크스페이스 선택"
|
||||
Margin="16,14,16,6"
|
||||
<TextBlock Text="최근"
|
||||
Margin="16,14,16,10"
|
||||
FontSize="12.5"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource PrimaryText}"/>
|
||||
<Border Margin="4,4,4,8"
|
||||
CornerRadius="10"
|
||||
BorderBrush="{DynamicResource BorderColor}"
|
||||
BorderThickness="1"
|
||||
Background="{DynamicResource ItemBackground}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text=""
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="11"
|
||||
Foreground="{DynamicResource SecondaryText}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="10,0,8,0"/>
|
||||
<TextBox x:Name="FolderMenuSearchBox"
|
||||
Grid.Column="1"
|
||||
BorderThickness="0"
|
||||
Background="Transparent"
|
||||
Foreground="{DynamicResource PrimaryText}"
|
||||
CaretBrush="{DynamicResource AccentColor}"
|
||||
FontSize="11.5"
|
||||
Padding="0,8,10,8"
|
||||
ToolTip="프로젝트 검색"
|
||||
TextChanged="FolderMenuSearchBox_TextChanged"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ScrollViewer MaxHeight="360"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
Padding="4,0,4,8">
|
||||
Padding="10,0,10,10">
|
||||
<StackPanel x:Name="FolderMenuItems" Margin="2"/>
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
|
||||
@@ -72,8 +72,6 @@ public partial class ChatWindow : Window
|
||||
private readonly HashSet<string> _sessionPermissionRules = new(StringComparer.OrdinalIgnoreCase);
|
||||
private readonly Dictionary<string, bool> _sessionMcpEnabledOverrides = new(StringComparer.OrdinalIgnoreCase);
|
||||
private readonly Dictionary<string, string> _sessionMcpAuthTokens = new(StringComparer.OrdinalIgnoreCase);
|
||||
private string _folderMenuSearchText = "";
|
||||
|
||||
// 경과 시간 표시
|
||||
private readonly DispatcherTimer _elapsedTimer;
|
||||
private DateTime _streamStartTime;
|
||||
@@ -1360,14 +1358,12 @@ public partial class ChatWindow : Window
|
||||
private void FolderPathLabel_Click(object sender, MouseButtonEventArgs e) => ShowFolderMenu();
|
||||
private void FolderMenuSearchBox_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
_folderMenuSearchText = FolderMenuSearchBox?.Text?.Trim() ?? "";
|
||||
RenderFolderMenuItems(_folderMenuSearchText);
|
||||
RenderFolderMenuItems(null);
|
||||
}
|
||||
|
||||
private void ShowFolderMenu()
|
||||
{
|
||||
_folderMenuSearchText = FolderMenuSearchBox?.Text?.Trim() ?? "";
|
||||
RenderFolderMenuItems(_folderMenuSearchText);
|
||||
RenderFolderMenuItems(null);
|
||||
FolderMenuPopup.IsOpen = true;
|
||||
}
|
||||
|
||||
@@ -1378,8 +1374,6 @@ public partial class ChatWindow : Window
|
||||
var accentBrush = TryFindResource("AccentColor") as Brush ?? Brushes.CornflowerBlue;
|
||||
var primaryText = TryFindResource("PrimaryText") as Brush ?? Brushes.White;
|
||||
var secondaryText = TryFindResource("SecondaryText") as Brush ?? Brushes.Gray;
|
||||
var query = (searchText ?? "").Trim();
|
||||
|
||||
var maxDisplay = Math.Clamp(_settings.Settings.Llm.MaxRecentFolders, 3, 30);
|
||||
var currentFolder = GetCurrentWorkFolder();
|
||||
var conversationFolders = _storage.LoadAllMeta()
|
||||
@@ -1394,31 +1388,13 @@ public partial class ChatWindow : Window
|
||||
.Concat(conversationFolders)
|
||||
.Concat(string.IsNullOrWhiteSpace(currentFolder) ? Enumerable.Empty<string>() : new[] { currentFolder })
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.Where(path =>
|
||||
string.IsNullOrWhiteSpace(query)
|
||||
|| path.Contains(query, StringComparison.OrdinalIgnoreCase)
|
||||
|| System.IO.Path.GetFileName(path).Contains(query, StringComparison.OrdinalIgnoreCase))
|
||||
.Take(maxDisplay * 3)
|
||||
.Take(maxDisplay * 2)
|
||||
.ToList();
|
||||
|
||||
var filteredRecent = recentFolders
|
||||
.Where(path =>
|
||||
string.IsNullOrWhiteSpace(query)
|
||||
|| path.Contains(query, StringComparison.OrdinalIgnoreCase)
|
||||
|| System.IO.Path.GetFileName(path).Contains(query, StringComparison.OrdinalIgnoreCase))
|
||||
.Take(maxDisplay)
|
||||
.ToList();
|
||||
|
||||
var currentWorkspaceName = string.IsNullOrWhiteSpace(currentFolder)
|
||||
? "없음"
|
||||
: System.IO.Path.GetFileName(currentFolder.TrimEnd('\\', '/'));
|
||||
FolderMenuItems.Children.Add(CreatePopupSummaryStrip(new[]
|
||||
{
|
||||
("현재", currentWorkspaceName, "#F8FAFC", "#E2E8F0", "#475569"),
|
||||
("최근", filteredRecent.Count.ToString(), "#EFF6FF", "#BFDBFE", "#1D4ED8"),
|
||||
("전체", workspaceFolders.Count.ToString(), "#F5F3FF", "#DDD6FE", "#6D28D9"),
|
||||
}));
|
||||
|
||||
void AddWorkspaceRows(IEnumerable<string> folders)
|
||||
{
|
||||
foreach (var folder in folders)
|
||||
@@ -1426,9 +1402,9 @@ public partial class ChatWindow : Window
|
||||
var isActive = folder.Equals(currentFolder, StringComparison.OrdinalIgnoreCase);
|
||||
var displayName = System.IO.Path.GetFileName(folder);
|
||||
if (string.IsNullOrEmpty(displayName)) displayName = folder;
|
||||
var detailText = isActive ? $"현재 선택 · {folder}" : folder;
|
||||
var detailText = folder;
|
||||
var itemBorder = CreatePopupMenuRow(
|
||||
isActive ? "\uE73E" : "\uE8B7",
|
||||
"\uE8B7",
|
||||
displayName,
|
||||
detailText,
|
||||
isActive,
|
||||
@@ -1454,7 +1430,6 @@ public partial class ChatWindow : Window
|
||||
|
||||
if (filteredRecent.Count > 0)
|
||||
{
|
||||
FolderMenuItems.Children.Add(CreatePopupSectionLabel($"최근 워크스페이스 · {filteredRecent.Count}", new Thickness(10, 6, 10, 4)));
|
||||
AddWorkspaceRows(filteredRecent);
|
||||
}
|
||||
|
||||
@@ -1464,46 +1439,51 @@ public partial class ChatWindow : Window
|
||||
|
||||
if (remainingFolders.Count > 0)
|
||||
{
|
||||
var workspaceLabel = filteredRecent.Count > 0
|
||||
? $"전체 워크스페이스 · {remainingFolders.Count}"
|
||||
: $"워크스페이스 · {remainingFolders.Count}";
|
||||
FolderMenuItems.Children.Add(CreatePopupSectionLabel(workspaceLabel, new Thickness(10, 6, 10, 4)));
|
||||
AddWorkspaceRows(remainingFolders);
|
||||
|
||||
FolderMenuItems.Children.Add(new Border
|
||||
{
|
||||
Height = 1,
|
||||
Background = TryFindResource("BorderColor") as Brush ?? Brushes.Gray,
|
||||
Margin = new Thickness(8, 4, 8, 4),
|
||||
Opacity = 0.5,
|
||||
Margin = new Thickness(8, 4, 8, 8),
|
||||
Opacity = 0.45,
|
||||
});
|
||||
AddWorkspaceRows(remainingFolders);
|
||||
}
|
||||
else if (filteredRecent.Count == 0)
|
||||
|
||||
if (filteredRecent.Count == 0 && remainingFolders.Count == 0)
|
||||
{
|
||||
FolderMenuItems.Children.Add(new TextBlock
|
||||
{
|
||||
Text = "검색 결과가 없습니다.",
|
||||
Text = "최근 작업 폴더가 없습니다.",
|
||||
FontSize = 11.5,
|
||||
Foreground = secondaryText,
|
||||
Margin = new Thickness(10, 8, 10, 10),
|
||||
Margin = new Thickness(10, 6, 10, 10),
|
||||
});
|
||||
}
|
||||
|
||||
// 폴더 찾아보기 버튼
|
||||
FolderMenuItems.Children.Add(new Border
|
||||
{
|
||||
Height = 1,
|
||||
Background = TryFindResource("BorderColor") as Brush ?? Brushes.Gray,
|
||||
Margin = new Thickness(8, 8, 8, 8),
|
||||
Opacity = 0.45,
|
||||
});
|
||||
|
||||
// 다른 폴더 선택 버튼
|
||||
var browseSp = new StackPanel { Orientation = Orientation.Horizontal };
|
||||
browseSp.Children.Add(new TextBlock
|
||||
{
|
||||
Text = "\uED25",
|
||||
Text = "\uE710",
|
||||
FontFamily = new FontFamily("Segoe MDL2 Assets"),
|
||||
FontSize = 14,
|
||||
FontSize = 13,
|
||||
Foreground = accentBrush,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
Margin = new Thickness(0, 0, 8, 0),
|
||||
});
|
||||
browseSp.Children.Add(new TextBlock
|
||||
{
|
||||
Text = "폴더 찾아보기...",
|
||||
FontSize = 14,
|
||||
Text = "다른 폴더 선택",
|
||||
FontSize = 13,
|
||||
FontWeight = FontWeights.SemiBold,
|
||||
Foreground = primaryText,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user