Skip to content

DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.

454 B
Raw Blame
import type { ModelsKey } from './locales.ts'

const PROTOCOL_LABEL_KEYS: Readonly<Record<string, ModelsKey>> = {
  'openai-completions': 'protocolOpenAiCompletions',
  'openai-responses': 'protocolOpenAiResponses',
  'anthropic-messages': 'protocolAnthropicMessages',
}

export function protocolLabel(t: (key: ModelsKey) => string, protocol: string): string {
  const key = PROTOCOL_LABEL_KEYS[protocol]
  return key === undefined ? protocol : t(key)
}