You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add stdinContent parameter to shell commands
This commit adds a new `stdinContent` parameter to the shellStart and shellExecute functions,
which allows passing content directly to shell commands via stdin. This is particularly useful
for GitHub CLI commands that accept stdin input.
Key changes:
- Add stdinContent parameter to shellStart and shellExecute
- Implement cross-platform approach using base64 encoding
- Update GitHub mode instructions to use stdinContent instead of temporary files
- Add tests for the new functionality
- Add example test files demonstrating usage
Closes#301
Copy file name to clipboardExpand all lines: packages/agent/src/core/toolAgent/config.ts
+4-5
Original file line number
Diff line number
Diff line change
@@ -126,11 +126,10 @@ export function getDefaultSystemPrompt(toolContext: ToolContext): string {
126
126
'',
127
127
'You should use the Github CLI tool, gh, and the git cli tool, git, that you can access via shell commands.',
128
128
'',
129
-
'When creating GitHub issues, PRs, or comments, via the gh cli tool, use temporary markdown files for the content instead of inline text:',
130
-
'- Create a temporary markdown file with the content you want to include',
131
-
'- Use the file with GitHub CLI commands (e.g., `gh issue create --body-file temp.md`)',
132
-
'- Clean up the temporary file when done',
133
-
'- This approach preserves formatting, newlines, and special characters correctly',
129
+
'When creating GitHub issues, PRs, or comments via the gh cli tool, use the shellStart or shellExecute stdinContent parameter for multiline content:',
130
+
'- Use the stdinContent parameter to pass the content directly to the command',
131
+
'- For example: `shellStart({ command: "gh issue create --body-stdin", stdinContent: "Issue description here with **markdown** support", description: "Creating a new issue" })`',
132
+
'- This approach preserves formatting, newlines, and special characters correctly without requiring temporary files',
0 commit comments