fix: update deps for opencode 2.0.4
CI / verify (pull_request) Successful in 10s

This commit is contained in:
2026-09-16 09:46:01 +02:00
parent 20f6087340
commit 1c48fab124
8 changed files with 146 additions and 111 deletions
+12 -9
View File
@@ -62,17 +62,20 @@ export default Plugin.define({
status: async ({ sessionID }) => (await quota.status(sessionID)) ?? null,
});
await quota.init();
// Subscribe before the first read: configuration can publish its catalog while
// Subscribe before the first read: configuration can publish its models while
// asynchronous setup is running.
const updates = (async () => {
for await (const event of context.event.subscribe({ signal: controller.signal })) {
if (
event.location &&
(event.location.directory !== context.location.directory ||
event.location.workspaceID !== context.location.workspaceID)
)
continue;
if (event.type === "catalog.updated") {
if (event.location) {
const workspaceID =
"workspaceID" in event.location ? event.location.workspaceID : undefined;
if (
event.location.directory !== context.location.directory ||
workspaceID !== context.location.workspaceID
)
continue;
}
if (event.type === "model.updated") {
models = await discover(context, selected.provider);
await context.agent.reload();
} else if (event.type === "agent.updated") {
@@ -105,7 +108,7 @@ export default Plugin.define({
}
})().catch((error) => {
if (!controller.signal.aborted)
console.error("stanp-opencode catalog update failed", error);
console.error("stanp-opencode model update failed", error);
});
models = await discover(context, selected.provider);
const { data: initialAgents } = await context.agent.list();
+2 -2
View File
@@ -21,8 +21,8 @@ function priority(model: ModelInfo) {
}
export async function discover(context: Plugin.Context, providerID: string) {
// Native lists already apply activation, integrations, configuration, and catalog transforms.
const { data } = await context.catalog.model.list();
// Native lists already apply activation, integrations, configuration, and model transforms.
const { data } = await context.model.list();
const models = new Map<string, { model: ModelInfo; serviceTier: string | undefined }>();
for (const model of data) {
if (model.providerID === providerID && model.enabled)