This commit is contained in:
+7
-1
@@ -65,6 +65,12 @@ export default Plugin.define({
|
||||
// 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") {
|
||||
models = await discover(context, selected.provider);
|
||||
await context.agent.reload();
|
||||
@@ -223,7 +229,7 @@ export default Plugin.define({
|
||||
)?.effect ?? "ask";
|
||||
if (effect !== "allow")
|
||||
throw new Error(
|
||||
`${action} requires an allow permission: OpenCode beta's public plugin API cannot request custom-tool permission approval (${effect}).`,
|
||||
`${action} requires an allow permission: OpenCode's public plugin API cannot request custom-tool permission approval (${effect}).`,
|
||||
);
|
||||
}
|
||||
await context.tool.transform((editor) => {
|
||||
|
||||
Reference in New Issue
Block a user