[Phase52] 7개 파일 추가 분리 — 14개 파일로 재구성

LlmService.Streaming:
- LlmService.Streaming.cs: 516 → 256줄 (Ollama/OpenAI 유지)
- LlmService.GeminiClaude.cs (신규): Gemini+Claude 스트리밍 (~260줄)

DocxSkill:
- DocxSkill.cs: 543 → 158줄 (ExecuteAsync 유지)
- DocxSkill.Builders.cs (신규): 11개 문서 빌더 헬퍼 (290줄)

ChartSkill:
- ChartSkill.cs: 537 → 174줄 (ExecuteAsync+RenderChart 유지)
- ChartSkill.Renderers.cs (신규): 7개 차트 렌더러+헬퍼+Dataset (280줄)

ScreenCaptureHandler:
- ScreenCaptureHandler.cs: 637 → 241줄 (기본 캡처 유지)
- ScreenCaptureHandler.Helpers.cs (신규): 스크롤/영역 캡처+헬퍼 (310줄)

SystemInfoHandler:
- SystemInfoHandler.cs: 509 → 352줄
- SystemInfoHandler.Helpers.cs (신규): 8개 헬퍼+StarInfoHandler (161줄)

AppSettings:
- AppSettings.cs: 564 → 309줄 (AppSettings/Launcher/CustomTheme 유지)
- AppSettings.Models.cs (신규): 14개 설정 모델 클래스 (233줄)

SkillEditorWindow:
- SkillEditorWindow.xaml.cs: 528 → 303줄
- SkillEditorWindow.PreviewSave.cs (신규): 미리보기+저장+로드 (226줄)

빌드: 경고 0, 오류 0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-03 21:40:56 +09:00
parent 55befebf34
commit b750849c9f
14 changed files with 2130 additions and 2051 deletions

View File

@@ -306,259 +306,3 @@ public class CustomThemeColors
public int ItemCornerRadius { get; set; } = 10;
}
public class WorkspaceProfile
{
[JsonPropertyName("name")]
public string Name { get; set; } = "";
[JsonPropertyName("windows")]
public List<WindowSnapshot> Windows { get; set; } = new();
[JsonPropertyName("createdAt")]
public DateTime CreatedAt { get; set; } = DateTime.Now;
}
public class WindowSnapshot
{
[JsonPropertyName("exe")]
public string Exe { get; set; } = "";
[JsonPropertyName("title")]
public string Title { get; set; } = "";
[JsonPropertyName("rect")]
public WindowRect Rect { get; set; } = new();
[JsonPropertyName("showCmd")]
public string ShowCmd { get; set; } = "Normal"; // Normal | Minimized | Maximized
[JsonPropertyName("monitor")]
public int Monitor { get; set; } = 0;
}
public class WindowRect
{
[JsonPropertyName("x")]
public int X { get; set; }
[JsonPropertyName("y")]
public int Y { get; set; }
[JsonPropertyName("width")]
public int Width { get; set; }
[JsonPropertyName("height")]
public int Height { get; set; }
}
public class AliasEntry
{
[JsonPropertyName("key")]
public string Key { get; set; } = "";
[JsonPropertyName("type")]
public string Type { get; set; } = "url"; // url | folder | app | batch | api | clipboard
[JsonPropertyName("target")]
public string Target { get; set; } = "";
[JsonPropertyName("description")]
public string? Description { get; set; }
[JsonPropertyName("showWindow")]
public bool ShowWindow { get; set; } = false;
[JsonPropertyName("adapter")]
public string? Adapter { get; set; }
[JsonPropertyName("query")]
public string? Query { get; set; }
}
public class ClipboardTransformer
{
[JsonPropertyName("key")]
public string Key { get; set; } = "";
[JsonPropertyName("type")]
public string Type { get; set; } = "regex"; // regex | script
[JsonPropertyName("pattern")]
public string? Pattern { get; set; }
[JsonPropertyName("replace")]
public string? Replace { get; set; }
[JsonPropertyName("command")]
public string? Command { get; set; }
[JsonPropertyName("timeout")]
public int Timeout { get; set; } = 5000;
[JsonPropertyName("description")]
public string? Description { get; set; }
}
public class ApiAdapter
{
[JsonPropertyName("id")]
public string Id { get; set; } = "";
[JsonPropertyName("baseUrl")]
public string BaseUrl { get; set; } = "";
[JsonPropertyName("credentialKey")]
public string CredentialKey { get; set; } = "";
}
public class PluginEntry
{
[JsonPropertyName("path")]
public string Path { get; set; } = "";
[JsonPropertyName("enabled")]
public bool Enabled { get; set; } = true;
}
// ─── 스니펫 ───────────────────────────────────────────────────────────────────
public class SnippetEntry
{
[JsonPropertyName("key")]
public string Key { get; set; } = ""; // 트리거 키워드 (예: addr, sig)
[JsonPropertyName("name")]
public string Name { get; set; } = ""; // 표시 이름
[JsonPropertyName("content")]
public string Content { get; set; } = ""; // 확장될 전체 텍스트
}
// ─── 퀵링크 ──────────────────────────────────────────────────────────────────
/// <summary>
/// 파라미터 퀵링크 항목.
/// 예: keyword="maps", urlTemplate="https://map.naver.com/p/search/{0}"
/// 사용: ql maps 강남역 → URL에 "강남역" 치환 후 브라우저 열기
/// </summary>
public class QuickLinkEntry
{
[JsonPropertyName("keyword")]
public string Keyword { get; set; } = ""; // 트리거 키워드
[JsonPropertyName("name")]
public string Name { get; set; } = ""; // 표시 이름
[JsonPropertyName("urlTemplate")]
public string UrlTemplate { get; set; } = ""; // {0}, {1} 또는 {query} 플레이스홀더
[JsonPropertyName("description")]
public string Description { get; set; } = ""; // 설명
}
// ─── AI 스니펫 템플릿 ─────────────────────────────────────────────────────────
/// <summary>
/// AI 스니펫 템플릿 항목.
/// 예: keyword="email", prompt="다음 상황에 맞는 업무 이메일 작성: {0}"
/// 사용: ai email 프로젝트 일정 변경 안내 → AI가 이메일 초안 생성
/// </summary>
public class AiSnippetTemplate
{
[JsonPropertyName("keyword")]
public string Keyword { get; set; } = "";
[JsonPropertyName("name")]
public string Name { get; set; } = "";
[JsonPropertyName("prompt")]
public string Prompt { get; set; } = ""; // {0}, {query} 플레이스홀더 지원
}
// ─── 클립보드 히스토리 ────────────────────────────────────────────────────────
public class ClipboardHistorySettings
{
[JsonPropertyName("enabled")]
public bool Enabled { get; set; } = true;
[JsonPropertyName("maxItems")]
public int MaxItems { get; set; } = 50;
[JsonPropertyName("excludePatterns")]
public List<string> ExcludePatterns { get; set; } = new()
{
@"^\d{4}[\s\-]?\d{4}[\s\-]?\d{4}[\s\-]?\d{4}$", // 카드번호
@"^(?:\d{1,3}\.){3}\d{1,3}$" // IP 주소
};
}
// ─── 시스템 명령 ──────────────────────────────────────────────────────────────
public class SystemCommandSettings
{
[JsonPropertyName("showLock")] public bool ShowLock { get; set; } = true;
[JsonPropertyName("showSleep")] public bool ShowSleep { get; set; } = true;
[JsonPropertyName("showRestart")] public bool ShowRestart { get; set; } = true;
[JsonPropertyName("showShutdown")] public bool ShowShutdown { get; set; } = true;
[JsonPropertyName("showHibernate")] public bool ShowHibernate { get; set; } = false;
[JsonPropertyName("showLogout")] public bool ShowLogout { get; set; } = true;
[JsonPropertyName("showRecycleBin")] public bool ShowRecycleBin { get; set; } = true;
/// <summary>
/// 시스템 명령 별칭. key = 기본 명령어(lock/sleep 등), value = 사용자 정의 별칭 목록.
/// 예: { "lock": ["잠금", "l"] } → /잠금, /l 로도 실행 가능
/// </summary>
[JsonPropertyName("commandAliases")]
public Dictionary<string, List<string>> CommandAliases { get; set; } = new();
}
// ─── 스크린 캡처 설정 ──────────────────────────────────────────────────────────
public class ScreenCaptureSettings
{
/// <summary>캡처 명령어 프리픽스. 기본값 "cap".</summary>
[JsonPropertyName("prefix")]
public string Prefix { get; set; } = "cap";
/// <summary>런처를 열지 않고 글로벌 단축키로 캡처하는 기능 활성화 여부.</summary>
[JsonPropertyName("globalHotkeyEnabled")]
public bool GlobalHotkeyEnabled { get; set; } = false;
/// <summary>글로벌 캡처 단축키 문자열. 기본값 "PrintScreen".</summary>
[JsonPropertyName("globalHotkey")]
public string GlobalHotkey { get; set; } = "PrintScreen";
/// <summary>글로벌 캡처 단축키 실행 모드. screen|window|region.</summary>
[JsonPropertyName("globalHotkeyMode")]
public string GlobalHotkeyMode { get; set; } = "screen";
/// <summary>스크롤 캡처 프레임 간 대기 시간(ms). 기본값 120.</summary>
[JsonPropertyName("scrollDelayMs")]
public int ScrollDelayMs { get; set; } = 120;
}
// ─── 잠금 해제 알림 설정 ───────────────────────────────────────────────────────
public class ReminderSettings
{
/// <summary>기능 활성화 여부. 기본값 false.</summary>
[JsonPropertyName("enabled")]
public bool Enabled { get; set; } = false;
/// <summary>팝업 표시 위치. top-left | top-right | bottom-left | bottom-right</summary>
[JsonPropertyName("corner")]
public string Corner { get; set; } = "bottom-right";
/// <summary>알림 간격(분). 30 | 60 | 120 | 180 | 240</summary>
[JsonPropertyName("intervalMinutes")]
public int IntervalMinutes { get; set; } = 60;
/// <summary>팝업 자동 닫힘 시간(초). 기본값 15. (5/10/15/20/30/60/120/180)</summary>
[JsonPropertyName("displaySeconds")]
public int DisplaySeconds { get; set; } = 15;
/// <summary>알림 콘텐츠 카테고리 활성화 목록.</summary>
[JsonPropertyName("enabledCategories")]
public List<string> EnabledCategories { get; set; } = new() { "motivational" };
}