A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io
Rust ai-toolsclaude-codecodexdeepseek-harnessdesktop-appgrokgrokbuildhermeskimi-codemcpopen-sourceopencodepiprovider-managementrustskillsskills-managementtauriwsl-support
import { useTranslation } from "react-i18next";
import { qoderEdition, type QoderEdition } from "@/config/qoder";
import { useSettingsQuery } from "@/lib/query";
/**
* 设置里选的 Qoder 版本(后端也按它读写),查询键带上它,切换版本后重新读取。
* 设置读到之前返回 undefined:后端按已存的版本作答,先按界面语言猜会把另一版的数据缓存到这一版的键下。
*/
export function useQoderEdition(): QoderEdition | undefined {
const { i18n } = useTranslation();
const { data: settings, isError } = useSettingsQuery();
if (!settings && !isError) return undefined;
return qoderEdition(settings, i18n.language);
}