diff --git a/packages/agent/src/core/toolAgent/config.ts b/packages/agent/src/core/toolAgent/config.ts index e66737c..3c9cd0c 100644 --- a/packages/agent/src/core/toolAgent/config.ts +++ b/packages/agent/src/core/toolAgent/config.ts @@ -76,6 +76,12 @@ export function getDefaultSystemPrompt(toolContext: ToolContext): string { '- Create additional GitHub issues for follow-up tasks or ideas', '', 'You can use the GitHub CLI (`gh`) for all GitHub interactions.', + '', + 'When creating GitHub issues, PRs, or comments, use temporary markdown files for the content instead of inline text:', + '- Create a temporary markdown file with the content you want to include', + '- Use the file with GitHub CLI commands (e.g., `gh issue create --body-file temp.md`)', + '- Clean up the temporary file when done', + '- This approach preserves formatting, newlines, and special characters correctly', ].join('\n') : ''; diff --git a/packages/agent/src/tools/interaction/subAgent.ts b/packages/agent/src/tools/interaction/subAgent.ts index 25e80b3..4fc9456 100644 --- a/packages/agent/src/tools/interaction/subAgent.ts +++ b/packages/agent/src/tools/interaction/subAgent.ts @@ -1,8 +1,8 @@ import { z } from 'zod'; import { zodToJsonSchema } from 'zod-to-json-schema'; -import { getDefaultSystemPrompt } from '../../core/toolAgent/index.js'; import { getModel } from '../../core/toolAgent/config.js'; +import { getDefaultSystemPrompt } from '../../core/toolAgent/index.js'; import { toolAgent } from '../../core/toolAgent.js'; import { Tool, ToolContext } from '../../core/types.js'; import { getTools } from '../getTools.js';