Skip to content

Commit e143c4a

Browse files
committed
🐛(agent) pass extension env to skill script runtime
1 parent 60034f5 commit e143c4a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/app/service/sandbox/runtime.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,8 @@ export class Runtime {
424424
} as ScriptLoadInfo;
425425

426426
// 使用 BgExecScriptWarp 执行,它会自动构建 setTimeout/setInterval 等
427-
const exec = new BgExecScriptWarp(scriptLoadInfo, this.windowMessage);
427+
const extensionEnv = await this.extensionEnvAsync;
428+
const exec = new BgExecScriptWarp(scriptLoadInfo, this.windowMessage, extensionEnv);
428429
// 通过 sandboxContext 注入 args(BgExecScriptWarp 通过 globalInjection 注入了 setTimeout 等,
429430
// sandboxContext 已经包含了这些,再追加 args 即可)
430431
if ((exec as any).sandboxContext) {

0 commit comments

Comments
 (0)