From 374d4db933cf9cb515a0200b640eec7f19518e4c Mon Sep 17 00:00:00 2001 From: Knotty Wyvern Date: Wed, 28 Oct 2026 01:33:09 -0700 Subject: [PATCH] Give the terminal and folder grant services to each plugin session Bind the native terminal service and the folder grant service of the plugin to its ExternalSession. Without this change, api.pty and api.files are absent. --- src/lib/plugins/external.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/plugins/external.ts b/src/lib/plugins/external.ts index bd097c7..9ced007 100644 --- a/src/lib/plugins/external.ts +++ b/src/lib/plugins/external.ts @@ -5,6 +5,7 @@ import { listen } from "@tauri-apps/api/event"; import { workspaceList, workspaceRead, workspaceReadBytes, workspaceWrite } from "../workspace/api"; import { gitApi } from "../git/service"; import { ExternalSession, deadline } from "./externalSession"; +import { filesTransport, ptyTransport } from "./nativeServices"; import { pluginAccess, type PluginTool } from "./access"; import { containsPane, splitPane, removePane, type SplitLayout } from "../workspace/splitLayout"; import type { PluginViewOpenOptions } from "./sdk"; @@ -253,6 +254,8 @@ async function activate(row: InstalledPlugin, builtin?: PluginModule) { const session = new ExternalSession(id, { completionTransport, git: gitApi, + pty: ptyTransport, + files: filesTransport(id), backgrounds: { chooseFolder: () => invoke('backgrounds_choose_folder', { id }), defaultFolder: () => invoke('backgrounds_default_folder', { id }),