Skip to content

feat: support multiple line custom prompts in mycoder.config.js #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025

Conversation

bhouston
Copy link
Member

Description

This PR implements support for multiple line custom prompts in mycoder.config.js as requested in issue #249. Instead of only supporting a single line string, the customPrompt configuration option now accepts either a string (for backward compatibility) or an array of strings (for multiple line prompts).

Changes

  • Updated customPrompt type in packages/agent/src/core/types.ts to accept string | string[]
  • Updated customPrompt type in packages/cli/src/settings/config.ts to accept string | string[]
  • Modified system prompt generation in packages/agent/src/core/toolAgent/config.ts to handle both string and array formats
  • Updated examples in mycoder.config.js and README.md to demonstrate the new feature

Example Usage

Users can now define custom prompts in two ways:

// Single line (existing behavior)
customPrompt: 'Single line custom prompt',

// Multiple lines (new behavior)
customPrompt: [
  'First line of custom prompt',
  'Second line of custom prompt',
  'Third line of custom prompt',
],

Testing

All existing tests pass, confirming backward compatibility with the current string-based approach.

Closes #249

- Updated customPrompt type to accept string or string[] in types.ts and config.ts
- Modified system prompt generation to handle both string and array formats
- Updated examples in mycoder.config.js and README.md to demonstrate the new feature
- Ensures backward compatibility with existing string-based approach

Closes #249
Copy link

🎉 This PR is included in version mycoder-agent-v1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version mycoder-v1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow for multiple line custom prompts in mycoder.config.js
1 participant