fix(routing): harden originating reply routing
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { toToolDefinitions } from "./pi-tool-definition-adapter.js";
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ export function toToolDefinitions(tools: AnyAgentTool[]): ToolDefinition[] {
|
||||
: "";
|
||||
if (name === "AbortError") throw err;
|
||||
const message =
|
||||
err instanceof Error ? err.stack ?? err.message : String(err);
|
||||
err instanceof Error ? (err.stack ?? err.message) : String(err);
|
||||
logError(`[tools] ${tool.name} failed: ${message}`);
|
||||
return jsonResult({
|
||||
status: "error",
|
||||
|
||||
Reference in New Issue
Block a user