export type ProviderMode = 'remote' | 'local';

export type TaskProfile =
  | 'interactiveChat'
  | 'analysis'
  | 'summarization'
  | 'toolUse';

export interface AgentTaskRoute {
  providerMode: ProviderMode;
  model: string;
}

export interface AgentConfigStatus {
  configured: boolean;
  remoteConfigured: boolean;
  localConfigured: boolean;
  remoteEnabled: boolean;
  localEnabled: boolean;
  hasRemoteApiKey: boolean;
  remoteBaseUrl: string;
  localBaseUrl: string;
  defaultRemoteModel: string;
  localAvailableModels: string[];
  taskDefaults: Record<TaskProfile, AgentTaskRoute>;
}

export interface SaveAgentRuntimeConfigRequest {
  remoteEnabled: boolean;
  remoteBaseUrl: string;
  defaultRemoteModel: string;
  localEnabled: boolean;
  localBaseUrl: string;
  localAvailableModels: string[];
  taskDefaults: Record<TaskProfile, AgentTaskRoute>;
}

export interface UpdateRemoteApiKeyRequest {
  apiKey: string;
}

export interface LocalModelList {
  reachable: boolean;
  models: string[];
}

export interface LocalProviderHealthStatus {
  reachable: boolean;
  message: string;
}

export const TASK_PROFILES: TaskProfile[] = [
  'interactiveChat',
  'analysis',
  'summarization',
  'toolUse',
];

export const TASK_LABELS: Record<TaskProfile, string> = {
  interactiveChat: 'Interactive Chat',
  analysis: 'Analysis',
  summarization: 'Summarization',
  toolUse: 'Tool Use',
};
