From 4d1636b59b530c65802e474d328bb1ff1bc64456 Mon Sep 17 00:00:00 2001 From: isamu Date: Sat, 28 Dec 2024 20:16:43 +0900 Subject: [PATCH] fix after console --- packages/graphai/src/node.ts | 2 +- packages/graphai/tests/units/test_console.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/graphai/src/node.ts b/packages/graphai/src/node.ts index d2840e0f..71167b16 100644 --- a/packages/graphai/src/node.ts +++ b/packages/graphai/src/node.ts @@ -63,7 +63,7 @@ export class Node { } else if (this.console.after) { if (isObject(this.console.after)) { console.log( - JSON.stringify(resultsOf(this.console.after, { self: this as unknown as ComputedNode | StaticNode }, this.graph.propFunctions, true), null, 2), + JSON.stringify(resultsOf(this.console.after, { self: { result } as unknown as ComputedNode | StaticNode } , this.graph.propFunctions, true), null, 2), ); } else { console.log(this.console.after); diff --git a/packages/graphai/tests/units/test_console.ts b/packages/graphai/tests/units/test_console.ts index 6a5c4449..2d7e4a6c 100644 --- a/packages/graphai/tests/units/test_console.ts +++ b/packages/graphai/tests/units/test_console.ts @@ -15,7 +15,7 @@ const get_graph_data = () => { }, copy: { inputs: { data: ":data" }, - console: { after: { template: ":data" } }, + console: { after: { template: ".data" } }, agent: "copyAgent", isResult: true, },