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:
Jason
2026-02-24 15:31:02 +08:00
parent 8ea9638b9d
commit bb3130cbe0
3 changed files with 21 additions and 15 deletions
+6 -2
View File
@@ -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}`);