재구성 AX Agent 설정과 채팅 UI를 Claude형 구조로
Some checks failed
Release Gate / gate (push) Has been cancelled
Some checks failed
Release Gate / gate (push) Has been cancelled
This commit is contained in:
@@ -94,18 +94,7 @@ public partial class App : System.Windows.Application
|
||||
LogService.Warn($"대화 보관 정리 중 오류: {ex.Message}");
|
||||
}
|
||||
|
||||
// 마이그레이션 알림 (UI가 준비된 후 표시)
|
||||
if (settings.MigrationSummary != null)
|
||||
{
|
||||
Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
CustomMessageBox.Show(
|
||||
settings.MigrationSummary,
|
||||
"AX Copilot — 설정 업데이트",
|
||||
System.Windows.MessageBoxButton.OK,
|
||||
System.Windows.MessageBoxImage.Information);
|
||||
}, System.Windows.Threading.DispatcherPriority.Loaded);
|
||||
}
|
||||
// 업데이트/마이그레이션 안내 메시지박스는 표시하지 않음.
|
||||
|
||||
// 언어 초기화
|
||||
L10n.SetLanguage(settings.Settings.Launcher.Language);
|
||||
@@ -482,7 +471,7 @@ public partial class App : System.Windows.Application
|
||||
.AddItem("\uE7C5", "AX Commander 호출하기", () =>
|
||||
Dispatcher.Invoke(() => _launcher?.Show()))
|
||||
.AddItem("\uE8BD", "AX Agent 대화하기", () =>
|
||||
Dispatcher.Invoke(() => OpenAiChat()), out var aiTrayItem)
|
||||
Dispatcher.Invoke(OpenAiChat), out var aiTrayItem)
|
||||
.AddItem("\uE8A7", "독 바 표시", () =>
|
||||
Dispatcher.Invoke(() => ToggleDockBar()))
|
||||
.AddSeparator()
|
||||
@@ -549,6 +538,16 @@ public partial class App : System.Windows.Application
|
||||
/// <summary>ChatWindow 등 외부에서 설정 창을 여는 공개 메서드.</summary>
|
||||
public void OpenSettingsFromChat() => Dispatcher.Invoke(OpenSettings);
|
||||
|
||||
/// <summary>AX Agent 창을 열고 전용 설정창을 바로 표시합니다.</summary>
|
||||
public void OpenAgentSettingsInChat()
|
||||
{
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
OpenAiChat();
|
||||
_chatWindow?.OpenAgentSettingsFromExternal();
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>AX Agent 창 열기 (트레이 메뉴 등에서 호출).</summary>
|
||||
private Views.ChatWindow? _chatWindow;
|
||||
|
||||
@@ -610,20 +609,22 @@ public partial class App : System.Windows.Application
|
||||
var launcher = _settings?.Settings.Launcher;
|
||||
var dockItems = launcher?.DockBarItems ?? new() { "launcher", "clipboard", "capture", "agent", "clock", "cpu" };
|
||||
_dockBar.BuildFromSettings(dockItems);
|
||||
_dockBar.OnPositionChanged = (left, top) =>
|
||||
_dockBar.OnPositionChanged = (deviceName, left, top) =>
|
||||
{
|
||||
if (_settings != null)
|
||||
if (_settings != null && !string.IsNullOrWhiteSpace(deviceName))
|
||||
{
|
||||
_settings.Settings.Launcher.DockBarLeft = left;
|
||||
_settings.Settings.Launcher.DockBarTop = top;
|
||||
_settings.Settings.Launcher.MonitorDockPositions[deviceName] = new List<double> { left, top };
|
||||
_settings.Save();
|
||||
}
|
||||
};
|
||||
_dockBar.Show();
|
||||
var (dockLeft, dockTop) = ResolveDockBarPosition(launcher);
|
||||
_dockBar.ApplySettings(
|
||||
launcher?.DockBarOpacity ?? 0.92,
|
||||
launcher?.DockBarLeft ?? -1,
|
||||
launcher?.DockBarTop ?? -1,
|
||||
dockLeft,
|
||||
dockTop,
|
||||
launcher?.DockBarRainbowGlow ?? false);
|
||||
}
|
||||
|
||||
@@ -634,13 +635,59 @@ public partial class App : System.Windows.Application
|
||||
var launcher = _settings?.Settings.Launcher;
|
||||
var dockItems = launcher?.DockBarItems ?? new() { "launcher", "clipboard", "capture", "agent", "clock", "cpu" };
|
||||
_dockBar.BuildFromSettings(dockItems);
|
||||
var (dockLeft, dockTop) = ResolveDockBarPosition(launcher);
|
||||
_dockBar.ApplySettings(
|
||||
launcher?.DockBarOpacity ?? 0.92,
|
||||
launcher?.DockBarLeft ?? -1,
|
||||
launcher?.DockBarTop ?? -1,
|
||||
dockLeft,
|
||||
dockTop,
|
||||
launcher?.DockBarRainbowGlow ?? false);
|
||||
}
|
||||
|
||||
private (double Left, double Top) ResolveDockBarPosition(AxCopilot.Models.LauncherSettings? launcher)
|
||||
{
|
||||
if (launcher == null)
|
||||
return (-1, -1);
|
||||
|
||||
var currentScreen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
|
||||
var currentDeviceName = currentScreen.DeviceName;
|
||||
if (launcher.MonitorDockPositions.TryGetValue(currentDeviceName, out var stored)
|
||||
&& stored is { Count: >= 2 }
|
||||
&& IsDockPositionValid(currentScreen, stored[0], stored[1]))
|
||||
{
|
||||
launcher.DockBarLeft = stored[0];
|
||||
launcher.DockBarTop = stored[1];
|
||||
return (stored[0], stored[1]);
|
||||
}
|
||||
|
||||
var left = launcher.DockBarLeft;
|
||||
var top = launcher.DockBarTop;
|
||||
if (left >= 0 && top >= 0)
|
||||
{
|
||||
var matchedScreen = Screen.AllScreens.FirstOrDefault(screen => IsDockPositionValid(screen, left, top));
|
||||
if (matchedScreen != null)
|
||||
return (left, top);
|
||||
}
|
||||
|
||||
launcher.DockBarLeft = -1;
|
||||
launcher.DockBarTop = -1;
|
||||
try { _settings?.Save(); } catch { }
|
||||
return (-1, -1);
|
||||
}
|
||||
|
||||
private bool IsDockPositionValid(Screen screen, double left, double top)
|
||||
{
|
||||
if (left < 0 || top < 0)
|
||||
return false;
|
||||
|
||||
var width = _dockBar?.ActualWidth > 0 ? _dockBar.ActualWidth : 420;
|
||||
var height = _dockBar?.ActualHeight > 0 ? _dockBar.ActualHeight : 56;
|
||||
var area = screen.WorkingArea;
|
||||
return left >= area.Left
|
||||
&& top >= area.Top
|
||||
&& left + width <= area.Right
|
||||
&& top + height <= area.Bottom;
|
||||
}
|
||||
|
||||
private void OpenSettings()
|
||||
{
|
||||
if (_settingsWindow != null && _settingsWindow.IsVisible)
|
||||
|
||||
Reference in New Issue
Block a user