Skip to content

Commit 98e8442

Browse files
authored
Merge pull request #88 from drivecore/fix-github-newlines-markdown-83
Fix GitHub newlines issue #83 using markdown files approach
2 parents 35cfaa4 + 5e3747b commit 98e8442

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/agent/src/core/toolAgent/config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ export function getDefaultSystemPrompt(toolContext: ToolContext): string {
7676
'- Create additional GitHub issues for follow-up tasks or ideas',
7777
'',
7878
'You can use the GitHub CLI (`gh`) for all GitHub interactions.',
79+
'',
80+
'When creating GitHub issues, PRs, or comments, use temporary markdown files for the content instead of inline text:',
81+
'- Create a temporary markdown file with the content you want to include',
82+
'- Use the file with GitHub CLI commands (e.g., `gh issue create --body-file temp.md`)',
83+
'- Clean up the temporary file when done',
84+
'- This approach preserves formatting, newlines, and special characters correctly',
7985
].join('\n')
8086
: '';
8187

packages/agent/src/tools/interaction/subAgent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { z } from 'zod';
22
import { zodToJsonSchema } from 'zod-to-json-schema';
33

4-
import { getDefaultSystemPrompt } from '../../core/toolAgent/index.js';
54
import { getModel } from '../../core/toolAgent/config.js';
5+
import { getDefaultSystemPrompt } from '../../core/toolAgent/index.js';
66
import { toolAgent } from '../../core/toolAgent.js';
77
import { Tool, ToolContext } from '../../core/types.js';
88
import { getTools } from '../getTools.js';

0 commit comments

Comments
 (0)