Add CONTINUE_CLI_DISABLE_COMMIT_SIGNATURE env var to disable commit signature

- Add environment variable check in systemMessage.ts
- Update README.md with documentation
- Allows users to disable the Continue commit signature in generated commits
This commit is contained in:
Ross Golder 2025-10-29 06:51:55 +07:00
parent d055943a31
commit efdc8fcb93
No known key found for this signature in database
GPG key ID: 253A7E508D2D59CD
2 changed files with 8 additions and 2 deletions

View file

@ -44,6 +44,10 @@ cn ls --json
- `--resume`: Resume the last session for this terminal
- `<prompt>`: Optional prompt to start with
## Environment Variables
- `CONTINUE_CLI_DISABLE_COMMIT_SIGNATURE`: Disable adding the Continue commit signature to generated commit messages
## Commands
- `cn`: Start an interactive chat session

View file

@ -173,12 +173,14 @@ export async function constructSystemMessage(
systemMessage +=
'\n<context name="planMode">You are operating in _Plan Mode_, which means that your goal is to help the user investigate their ideas and develop a plan before taking action. You only have access to read-only tools and should not attempt to circumvent them to write / delete / create files. For example, it is not acceptable to use the Bash tool to write to files.</context>\n';
} else {
// TODO - make including this coauthor commit configurable
systemMessage += `\n<context name="commitSignature">When creating commits using any CLI or tool, include the following in the commit message:
// Check if commit signature is disabled via environment variable
if (!process.env.CONTINUE_CLI_DISABLE_COMMIT_SIGNATURE) {
systemMessage += `\n<context name="commitSignature">When creating commits using any CLI or tool, include the following in the commit message:
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
</context>\n`;
}
}
// In headless mode, add instructions to be concise and only provide final answers