fix: inline bundled extension path parsing in subagent
The subagent extension imported parseBundledExtensionPaths via a relative path (../../../bundled-extension-paths.js) that resolves correctly in the source tree but breaks when extensions are synced to ~/.gsd/agent/extensions/ at runtime. Inline the trivial split logic so the extension is self-contained.
This commit is contained in:
parent
d5161fddb9
commit
a2a701b129
1 changed files with 1 additions and 2 deletions
|
|
@ -23,7 +23,6 @@ import { StringEnum } from "@gsd/pi-ai";
|
|||
import { type ExtensionAPI, getMarkdownTheme } from "@gsd/pi-coding-agent";
|
||||
import { Container, Markdown, Spacer, Text } from "@gsd/pi-tui";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
import { parseBundledExtensionPaths } from "../../../bundled-extension-paths.js";
|
||||
import { type AgentConfig, type AgentScope, discoverAgents } from "./agents.js";
|
||||
import {
|
||||
type IsolationEnvironment,
|
||||
|
|
@ -333,7 +332,7 @@ async function runSingleAgent(
|
|||
let wasAborted = false;
|
||||
|
||||
const exitCode = await new Promise<number>((resolve) => {
|
||||
const bundledPaths = parseBundledExtensionPaths(process.env.GSD_BUNDLED_EXTENSION_PATHS);
|
||||
const bundledPaths = (process.env.GSD_BUNDLED_EXTENSION_PATHS ?? "").split(path.delimiter).map(s => s.trim()).filter(Boolean);
|
||||
const extensionArgs = bundledPaths.flatMap(p => ["--extension", p]);
|
||||
const proc = spawn(
|
||||
process.execPath,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue