fix: start a plugin's api calls at once again, not a tick later

This commit is contained in:
Linus Rath
2026-11-03 01:38:42 +01:00
parent e9e07ddb64
commit 553f7ee883
+5 -2
View File
@@ -2041,8 +2041,11 @@ export async function dispatchApiCall(
throw new Error(`Unknown API method "${method}"`);
}
const assistant = await dispatchAssistant(plugin, method, args);
if (assistant !== NOT_MINE) return assistant;
// The AI assistant's methods; every other call goes on without waiting a tick.
if (method in ASSISTANT_PERMS) {
const assistant = await dispatchAssistant(plugin, method, args);
if (assistant !== NOT_MINE) return assistant;
}
switch (method) {
case 'proxy.fetch': return proxyFetch(plugin, args, opts?.sink ?? null);