Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions vscode-extension/src/acpAgentActor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,21 @@ export class AcpAgentActor {
spawnArgs.push("--log", agentLogLevel);
}

const traceDir = vsConfig.get<string>("traceDir", "");
if (traceDir) {
spawnArgs.push("--trace-dir", traceDir);
}

if (resolved.isSymposiumBuiltin) {
// Symposium builtin (e.g., eliza) - run conductor with subcommand directly
spawnArgs.push(resolved.command, ...resolved.args);
// Symposium builtin (e.g., eliza) - wrap with conductor using the same binary
spawnArgs.push(
"--",
conductorCommand,
resolved.command,
...resolved.args,
);
} else {
// External agent - wrap with conductor
const traceDir = vsConfig.get<string>("traceDir", "");
if (traceDir) {
spawnArgs.push("--trace-dir", traceDir);
}

spawnArgs.push("--", resolved.command, ...resolved.args);
}

Expand Down
18 changes: 17 additions & 1 deletion vscode-extension/src/agentRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ export interface SymposiumDistribution {
args?: string[];
}

export interface LocalDistribution {
command: string;
args?: string[];
env?: Record<string, string>;
}

export interface Distribution {
local?: LocalDistribution; // explicit local binary path
npx?: NpxDistribution;
pipx?: PipxDistribution;
binary?: Record<string, BinaryDistribution>; // keyed by platform, e.g., "darwin-aarch64"
Expand Down Expand Up @@ -206,7 +213,16 @@ export async function resolveDistribution(
): Promise<ResolvedCommand> {
const dist = agent.distribution;

// Try symposium builtin first (e.g., eliza subcommand)
// Try local first (explicit path takes priority)
if (dist.local) {
return {
command: dist.local.command,
args: dist.local.args ?? [],
env: dist.local.env,
};
}

// Try symposium builtin (e.g., eliza subcommand)
if (dist.symposium) {
return {
command: dist.symposium.subcommand,
Expand Down
18 changes: 11 additions & 7 deletions vscode-extension/src/chatViewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -868,11 +868,17 @@ export class ChatViewProvider implements vscode.WebviewViewProvider {
// Generate unique approval ID
const approvalId = uuidv4();

// Find the tab for this session (we don't have sessionId in params, so we'll send to all tabs)
// For now, we'll use the first tab - TODO: improve this to target the right tab
const tabIds = Array.from(this.#tabToAgentSession.keys());
if (tabIds.length === 0) {
logger.error("approval", "No tabs available for approval request");
// Find the tab for this agent by looking up which tab has a config with matching agentId
let tabId: string | undefined;
for (const [tid, config] of this.#tabToConfig.entries()) {
if (config.agentId === agentId) {
tabId = tid;
break;
}
}

if (!tabId) {
logger.error("approval", "No tab found for agent", { agentId });
// Fallback: deny
const rejectOption = params.options.find(
(opt) => opt.kind === "reject_once",
Expand All @@ -885,8 +891,6 @@ export class ChatViewProvider implements vscode.WebviewViewProvider {
return { outcome: { outcome: "cancelled" } };
}

const tabId = tabIds[0]; // Use first tab for now

logger.debug("approval", "Requesting user approval", {
approvalId,
tabId,
Expand Down
4 changes: 3 additions & 1 deletion vscode-extension/src/test/conversation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ suite("Conversation Tests", () => {
response.toLowerCase().includes("hello") ||
response.toLowerCase().includes("hi") ||
response.toLowerCase().includes("how") ||
response.toLowerCase().includes("what"),
response.toLowerCase().includes("what") ||
response.toLowerCase().includes("you") ||
response.toLowerCase().includes("thank"),
"Response should be relevant to the prompt",
);

Expand Down