- 코워크·코드 프롬프트, 도구 선택, 문서 생성/검증 흐름을 claude-code 동등 품질 기준으로 재정렬함 - OpenAI/vLLM 경로의 오래된 tool history를 평탄화하고 최근 이력만 구조화해 컨텍스트 직렬화를 경량화함 - AX Agent UI를 테마 기준으로 재구성하고 플랜 승인/오버레이/이벤트 렌더링/명령 입력 상호작용을 개선함 - 파일 후보 제안, 반복 경로 정체 복구, LSP 보강, 문서·PPT 처리 개선, 설정/서비스 인터페이스 정리를 함께 반영함 - README.md 및 docs/DEVELOPMENT.md를 작업 시점별로 갱신함 - 검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\ (경고 0, 오류 0)
122 lines
4.1 KiB
C#
122 lines
4.1 KiB
C#
using System;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Controls.Primitives;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
|
|
namespace AxCopilot.Views;
|
|
|
|
public partial class ChatWindow
|
|
{
|
|
private Border CreateSurfacePopupContainer(UIElement content, double minWidth = 180, Thickness? padding = null)
|
|
{
|
|
var bg = TryFindResource("LauncherBackground") as Brush ?? new SolidColorBrush(Color.FromRgb(0x1E, 0x1E, 0x2E));
|
|
var borderBrush = TryFindResource("BorderColor") as Brush ?? Brushes.Gray;
|
|
|
|
return new Border
|
|
{
|
|
Background = bg,
|
|
BorderBrush = borderBrush,
|
|
BorderThickness = new Thickness(1),
|
|
CornerRadius = new CornerRadius(12),
|
|
Padding = padding ?? new Thickness(6),
|
|
MinWidth = minWidth,
|
|
Effect = new System.Windows.Media.Effects.DropShadowEffect
|
|
{
|
|
BlurRadius = 16,
|
|
ShadowDepth = 4,
|
|
Opacity = 0.34,
|
|
Color = Colors.Black,
|
|
},
|
|
Child = content,
|
|
};
|
|
}
|
|
|
|
private Border CreateSurfacePopupMenuItem(string icon, Brush iconBrush, string label, Action onClick, Brush? labelBrush = null, double fontSize = 12.5)
|
|
{
|
|
var primaryText = TryFindResource("PrimaryText") as Brush ?? Brushes.White;
|
|
var hoverBg = TryFindResource("ItemHoverBackground") as Brush ?? new SolidColorBrush(Color.FromArgb(0x18, 0xFF, 0xFF, 0xFF));
|
|
|
|
var item = new Border
|
|
{
|
|
Background = Brushes.Transparent,
|
|
CornerRadius = new CornerRadius(8),
|
|
Padding = new Thickness(10, 8, 14, 8),
|
|
Margin = new Thickness(0, 1, 0, 1),
|
|
Cursor = Cursors.Hand,
|
|
};
|
|
|
|
var row = new StackPanel { Orientation = Orientation.Horizontal };
|
|
row.Children.Add(new TextBlock
|
|
{
|
|
Text = icon,
|
|
FontFamily = s_segoeIconFont,
|
|
FontSize = 13,
|
|
Foreground = iconBrush,
|
|
VerticalAlignment = VerticalAlignment.Center,
|
|
Margin = new Thickness(0, 0, 10, 0),
|
|
});
|
|
row.Children.Add(new TextBlock
|
|
{
|
|
Text = label,
|
|
FontSize = fontSize,
|
|
Foreground = labelBrush ?? primaryText,
|
|
VerticalAlignment = VerticalAlignment.Center,
|
|
});
|
|
item.Child = row;
|
|
|
|
item.MouseEnter += (s, _) => { if (s is Border b) b.Background = hoverBg; };
|
|
item.MouseLeave += (s, _) => { if (s is Border b) b.Background = Brushes.Transparent; };
|
|
item.MouseLeftButtonUp += (_, _) => onClick();
|
|
return item;
|
|
}
|
|
|
|
private Border CreateSurfacePopupSeparator()
|
|
{
|
|
var borderBrush = TryFindResource("BorderColor") as Brush ?? Brushes.Gray;
|
|
return new Border
|
|
{
|
|
Height = 1,
|
|
Margin = new Thickness(10, 4, 10, 4),
|
|
Background = borderBrush,
|
|
Opacity = 0.3,
|
|
};
|
|
}
|
|
|
|
private StackPanel CreateSurfaceFileTreeHeader(string icon, string name, string? sizeText)
|
|
{
|
|
var secondaryText = TryFindResource("SecondaryText") as Brush ?? Brushes.Gray;
|
|
|
|
var sp = new StackPanel { Orientation = Orientation.Horizontal };
|
|
sp.Children.Add(new TextBlock
|
|
{
|
|
Text = icon,
|
|
FontFamily = s_segoeIconFont,
|
|
FontSize = 11,
|
|
Foreground = secondaryText,
|
|
VerticalAlignment = VerticalAlignment.Center,
|
|
Margin = new Thickness(0, 0, 5, 0),
|
|
});
|
|
sp.Children.Add(new TextBlock
|
|
{
|
|
Text = name,
|
|
FontSize = 11.5,
|
|
Foreground = TryFindResource("PrimaryText") as Brush ?? Brushes.White,
|
|
VerticalAlignment = VerticalAlignment.Center,
|
|
});
|
|
if (!string.IsNullOrEmpty(sizeText))
|
|
{
|
|
sp.Children.Add(new TextBlock
|
|
{
|
|
Text = $" {sizeText}",
|
|
FontSize = 10,
|
|
Foreground = secondaryText,
|
|
VerticalAlignment = VerticalAlignment.Center,
|
|
});
|
|
}
|
|
|
|
return sp;
|
|
}
|
|
}
|