/**
 * 常量定义
 *
 * 快捷键映射、状态颜色、消息类型等全局常量。
 */

// ===== 布局尺寸 =====

export const LAYOUT = {
  HEADER_HEIGHT: 0, // 已移除顶部栏
  STATUS_BAR_HEIGHT: 36,
  SIDEBAR_WIDTH: 300,
  DETAIL_WIDTH: 360,
  CHAT_MAX_WIDTH: 768,
} as const;

// ===== Agent 状态颜色 =====

export const AGENT_STATUS_COLORS = {
  idle: 'var(--green)',
  thinking: 'var(--amber)',
  executing: 'var(--purple)',
  error: 'var(--red)',
} as const;

export const AGENT_STATUS_LABELS = {
  idle: 'Agent Ready',
  thinking: '思考中...',
  executing: '执行中...',
  error: '错误',
} as const;

// ===== Trace 步骤状态 =====

export const TRACE_STATE_COLORS: Record<string, string> = {
  INIT: 'var(--cyan)',
  THINKING: 'var(--amber)',
  PARSING: 'var(--orange)',
  EXECUTING: 'var(--purple)',
  OBSERVING: 'var(--cyan)',
  REFLECTING: 'var(--purple)',
  COMPRESSING: 'var(--amber)',
  TERMINATED: 'var(--green)',
};

export const TRACE_STATE_LABELS: Record<string, string> = {
  INIT: '初始化',
  THINKING: '思考',
  PARSING: '解析',
  EXECUTING: '执行',
  OBSERVING: '观察',
  REFLECTING: '反思',
  COMPRESSING: '压缩',
  TERMINATED: '终止',
};

// ===== 工具调用状态 =====

export const TOOL_CALL_STATUS_COLORS = {
  pending: 'var(--amber)',
  executing: 'var(--purple)',
  success: 'var(--green)',
  error: 'var(--red)',
  blocked: 'var(--orange)',
} as const;

// ===== 快捷键定义 =====

export const SHORTCUTS = {
  NEW_SESSION: { key: 'n', ctrl: true },
  QUICK_SEARCH: { key: 'k', ctrl: true },
  SEND_MESSAGE: { key: 'Enter', ctrl: false },
  NEW_LINE: { key: 'Enter', ctrl: true },
  ABORT: { key: '.', ctrl: true },
  // v0.3.0: 已实现的面板控制快捷键
  FOCUS_MODE: { key: 'f', ctrl: true, shift: true },
  TOGGLE_SIDEBAR: { key: 'b', ctrl: true },
  TOGGLE_DETAIL: { key: 'j', ctrl: true },
  OPEN_SETTINGS: { key: ',', ctrl: true },
  PREV_SESSION: { key: '[', ctrl: true },
  NEXT_SESSION: { key: ']', ctrl: true },
  CLOSE_POPUP: { key: 'Escape' },
  FOCUS_INPUT: { key: 'l', ctrl: true },
  COPY_LAST_REPLY: { key: 'c', ctrl: true, shift: true },
  TOGGLE_THEME: { key: 'd', ctrl: true },
} as const;

// ===== Provider 信息 =====

export const PROVIDER_LABELS: Record<string, string> = {
  deepseek: 'DeepSeek',
  agnes: 'Agnes AI',
  mimo: 'MiMo (小米)',
  ollama: 'Ollama',
};
