mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
fix(codex): wait for curated migration marketplace
This commit is contained in:
committed by
Peter Steinberger
parent
2e3c1bbd2f
commit
cb88c7d832
@@ -29,6 +29,7 @@ import {
|
||||
resolveCodexAppServerFallbackApiKeyCacheKey,
|
||||
} from "../app-server/auth-bridge.js";
|
||||
import {
|
||||
CODEX_PLUGINS_MARKETPLACE_NAME,
|
||||
isCodexPluginsMarketplaceName,
|
||||
readCodexPluginConfig,
|
||||
resolveCodexAppServerRuntimeOptions,
|
||||
@@ -359,7 +360,7 @@ function hasOpenAiCuratedMarketplace(response: unknown): boolean {
|
||||
return false;
|
||||
}
|
||||
const name = (marketplace as { name?: unknown }).name;
|
||||
return typeof name === "string" && isCodexPluginsMarketplaceName(name);
|
||||
return name === CODEX_PLUGINS_MARKETPLACE_NAME;
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1462,7 +1462,7 @@ describe("buildCodexMigrationProvider", () => {
|
||||
if (method === "plugin/list" && isTarget) {
|
||||
targetPluginListCalls += 1;
|
||||
if (targetPluginListCalls === 1) {
|
||||
return { marketplaces: [], marketplaceLoadErrors: [], featuredPluginIds: [] };
|
||||
return pluginList([], "openai-bundled");
|
||||
}
|
||||
return pluginList([pluginSummary("google-calendar", { installed: true, enabled: true })]);
|
||||
}
|
||||
@@ -2225,12 +2225,15 @@ function createConfigRuntime(
|
||||
} as unknown as MigrationProviderContext["runtime"];
|
||||
}
|
||||
|
||||
function pluginList(plugins: v2.PluginSummary[]): v2.PluginListResponse {
|
||||
function pluginList(
|
||||
plugins: v2.PluginSummary[],
|
||||
marketplaceName = CODEX_PLUGINS_MARKETPLACE_NAME,
|
||||
): v2.PluginListResponse {
|
||||
return {
|
||||
marketplaces: [
|
||||
{
|
||||
name: CODEX_PLUGINS_MARKETPLACE_NAME,
|
||||
path: "/marketplaces/openai-curated",
|
||||
name: marketplaceName,
|
||||
path: `/marketplaces/${marketplaceName}`,
|
||||
interface: null,
|
||||
plugins,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user