From efdc8fcb939ec36c53d7c66bdf74ccc43e87e1f7 Mon Sep 17 00:00:00 2001 From: Ross Golder Date: Wed, 29 Oct 2025 06:51:55 +0700 Subject: [PATCH] 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 --- extensions/cli/README.md | 4 ++++ extensions/cli/src/systemMessage.ts | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/extensions/cli/README.md b/extensions/cli/README.md index 9f12eada0..324d3d7be 100644 --- a/extensions/cli/README.md +++ b/extensions/cli/README.md @@ -44,6 +44,10 @@ cn ls --json - `--resume`: Resume the last session for this terminal - ``: 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 diff --git a/extensions/cli/src/systemMessage.ts b/extensions/cli/src/systemMessage.ts index d5dee238f..1673914c4 100644 --- a/extensions/cli/src/systemMessage.ts +++ b/extensions/cli/src/systemMessage.ts @@ -173,12 +173,14 @@ export async function constructSystemMessage( systemMessage += '\nYou 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.\n'; } else { - // TODO - make including this coauthor commit configurable - systemMessage += `\nWhen 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 += `\nWhen creating commits using any CLI or tool, include the following in the commit message: Generated with [Continue](https://continue.dev) Co-Authored-By: Continue \n`; + } } // In headless mode, add instructions to be concise and only provide final answers