mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 06:04:05 +00:00
fix(coding-agent): add tool promptGuidelines support fixes #1720
This commit is contained in:
parent
bc2fa8d6d0
commit
8d4a49487a
9 changed files with 96 additions and 10 deletions
|
|
@ -41,6 +41,7 @@ describe("AgentSession dynamic tool registration", () => {
|
|||
label: "Dynamic Tool",
|
||||
description: "Tool registered from session_start",
|
||||
promptSnippet: "Run dynamic test behavior",
|
||||
promptGuidelines: ["Use dynamic_tool when the user asks for dynamic behavior tests."],
|
||||
parameters: Type.Object({}),
|
||||
execute: async () => ({
|
||||
content: [{ type: "text", text: "ok" }],
|
||||
|
|
@ -69,6 +70,7 @@ describe("AgentSession dynamic tool registration", () => {
|
|||
expect(session.getAllTools().map((tool) => tool.name)).toContain("dynamic_tool");
|
||||
expect(session.getActiveToolNames()).toContain("dynamic_tool");
|
||||
expect(session.systemPrompt).toContain("- dynamic_tool: Run dynamic test behavior");
|
||||
expect(session.systemPrompt).toContain("- Use dynamic_tool when the user asks for dynamic behavior tests.");
|
||||
|
||||
session.dispose();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue