using System.Text.Json.Serialization; namespace AxCopilot.Models; // 기타 설정 모델 클래스 public class WorkspaceProfile { [JsonPropertyName("name")] public string Name { get; set; } = ""; [JsonPropertyName("windows")] public List 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; } = ""; // 확장될 전체 텍스트 } // ─── 퀵링크 ────────────────────────────────────────────────────────────────── /// /// 파라미터 퀵링크 항목. /// 예: keyword="maps", urlTemplate="https://map.naver.com/p/search/{0}" /// 사용: ql maps 강남역 → URL에 "강남역" 치환 후 브라우저 열기 /// 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 스니펫 템플릿 ───────────────────────────────────────────────────────── /// /// AI 스니펫 템플릿 항목. /// 예: keyword="email", prompt="다음 상황에 맞는 업무 이메일 작성: {0}" /// 사용: ai email 프로젝트 일정 변경 안내 → AI가 이메일 초안 생성 /// 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 ExcludePatterns { get; set; } = new() { @"^\d{4}[\s\-]?\d{4}[\s\-]?\d{4}[\s\-]?\d{4}$", // 카드번호 @"^(?:\d{1,3}\.){3}\d{1,3}$" // IP 주소 }; /// 이미지 클립보드 항목에서 OCR 텍스트를 자동 추출하여 검색에 활용 (Windows OCR, 로컬 처리) [JsonPropertyName("enableOcrSearch")] public bool EnableOcrSearch { get; set; } = true; } // ─── 시스템 명령 ────────────────────────────────────────────────────────────── 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; /// /// 시스템 명령 별칭. key = 기본 명령어(lock/sleep 등), value = 사용자 정의 별칭 목록. /// 예: { "lock": ["잠금", "l"] } → /잠금, /l 로도 실행 가능 /// [JsonPropertyName("commandAliases")] public Dictionary> CommandAliases { get; set; } = new(); } // ─── 스크린 캡처 설정 ────────────────────────────────────────────────────────── public class ScreenCaptureSettings { /// 캡처 명령어 프리픽스. 기본값 "cap". [JsonPropertyName("prefix")] public string Prefix { get; set; } = "cap"; /// 런처를 열지 않고 글로벌 단축키로 캡처하는 기능 활성화 여부. [JsonPropertyName("globalHotkeyEnabled")] public bool GlobalHotkeyEnabled { get; set; } = false; /// 글로벌 캡처 단축키 문자열. 기본값 "PrintScreen". [JsonPropertyName("globalHotkey")] public string GlobalHotkey { get; set; } = "PrintScreen"; /// 글로벌 캡처 단축키 실행 모드. screen|window|region. [JsonPropertyName("globalHotkeyMode")] public string GlobalHotkeyMode { get; set; } = "screen"; /// 스크롤 캡처 프레임 간 대기 시간(ms). 기본값 120. [JsonPropertyName("scrollDelayMs")] public int ScrollDelayMs { get; set; } = 120; } // ─── 잠금 해제 알림 설정 ─────────────────────────────────────────────────────── public class ReminderSettings { /// 기능 활성화 여부. 기본값 false. [JsonPropertyName("enabled")] public bool Enabled { get; set; } = false; /// 팝업 표시 위치. top-left | top-right | bottom-left | bottom-right [JsonPropertyName("corner")] public string Corner { get; set; } = "bottom-right"; /// 알림 간격(분). 30 | 60 | 120 | 180 | 240 [JsonPropertyName("intervalMinutes")] public int IntervalMinutes { get; set; } = 60; /// 팝업 자동 닫힘 시간(초). 기본값 15. (5/10/15/20/30/60/120/180) [JsonPropertyName("displaySeconds")] public int DisplaySeconds { get; set; } = 15; /// 알림 콘텐츠 카테고리 활성화 목록. [JsonPropertyName("enabledCategories")] public List EnabledCategories { get; set; } = new() { "motivational" }; }