mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-28 00:35:32 +08:00
fix(opencode): add missing omo-slim category checks across add/form/mutation paths
Several code paths only checked for "omo" category but missed "omo-slim", causing OMO Slim providers to be treated as regular OpenCode providers (triggering invalid write_live_snapshot, requiring manual provider key, and showing wrong form fields).
This commit is contained in:
@@ -19,8 +19,12 @@ export const useAddProviderMutation = (appId: AppId) => {
|
||||
let id: string;
|
||||
|
||||
if (appId === "opencode" || appId === "openclaw") {
|
||||
if (providerInput.category === "omo") {
|
||||
id = `omo-${generateUUID()}`;
|
||||
if (
|
||||
providerInput.category === "omo" ||
|
||||
providerInput.category === "omo-slim"
|
||||
) {
|
||||
const prefix = providerInput.category === "omo" ? "omo" : "omo-slim";
|
||||
id = `${prefix}-${generateUUID()}`;
|
||||
} else {
|
||||
if (!providerInput.providerKey) {
|
||||
throw new Error(`Provider key is required for ${appId}`);
|
||||
|
||||
Reference in New Issue
Block a user