Skip to content

Commit 8754dd2

Browse files
authored
fix: actor add response (#128)
fix undefined in actor add response
1 parent 302e582 commit 8754dd2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/tools/helpers.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { z } from 'zod';
33
import zodToJsonSchema from 'zod-to-json-schema';
44

55
import { HelperTools } from '../const.js';
6-
import type { ActorTool, InternalTool, ToolEntry } from '../types';
6+
import type { InternalTool, ToolEntry } from '../types';
77
import { getActorsAsTools } from './actor.js';
88
import { actorNameToToolName } from './utils.js';
99

@@ -86,7 +86,11 @@ export const addTool: ToolEntry = {
8686
return {
8787
content: [{
8888
type: 'text',
89-
text: `Actor added: ${toolsAdded.map((t) => `${(t.tool as ActorTool).actorFullName} (tool name: ${t.tool.name})`).join(', ')}`,
89+
text: `Actor ${parsed.actorName} has been added. Newly available tools: ${
90+
toolsAdded.map(
91+
(t) => `${t.tool.name}`,
92+
).join(', ')
93+
}.`,
9094
}],
9195
};
9296
},

0 commit comments

Comments
 (0)