mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
fix: add null check for tool_graph depends_on field
Signed-off-by: James Loope <cronus@stolenshoe.com>
This commit is contained in:
@@ -22,7 +22,7 @@ import McpAppRenderer from './McpApps/McpAppRenderer';
|
||||
interface ToolGraphNode {
|
||||
tool: string;
|
||||
description: string;
|
||||
depends_on: number[];
|
||||
depends_on?: number[];
|
||||
}
|
||||
|
||||
type UiMeta = {
|
||||
@@ -737,7 +737,7 @@ function ToolGraphView({ toolGraph, code }: ToolGraphViewProps) {
|
||||
|
||||
toolGraph.forEach((node, index) => {
|
||||
const deps =
|
||||
node.depends_on.length > 0 ? ` (uses ${node.depends_on.map((d) => d + 1).join(', ')})` : '';
|
||||
node.depends_on && node.depends_on.length > 0 ? ` (uses ${node.depends_on.map((d) => d + 1).join(', ')})` : '';
|
||||
lines.push(`${index + 1}. ${node.tool}: ${node.description}${deps}`);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user