Skip to content

Commit

Permalink
feat(commit message): commit message out of experimental stage (#7166)
Browse files Browse the repository at this point in the history
CLOSE https://linear.app/sourcegraph/issue/CODY-5048

This commit removes the `experimentalCommitMessage` feature flag and
related code. This feature is no longer experimental and is now enabled
by default.

The following changes were made:

- Removed the `experimentalCommitMessage` flag from
`lib/shared/src/configuration.ts`, `vscode/src/commands/index.ts`,
`vscode/src/testutils/mocks.ts`, `vscode/src/configuration.ts`,
`vscode/test/e2e/command-commit.test.ts`,
`vscode/src/configuration.test.ts`, and `vscode/package.json`.
- Updated the `when` clause for the "Generate Commit Message" command in
`vscode/package.json` to remove the check for the
`experimentalCommitMessage` setting.


## Test plan

<!-- Required. See
https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles.
-->

Everything should work as it currently is, including the e2e test.
  • Loading branch information
abeatrix authored Feb 21, 2025
1 parent 250db73 commit 2082513
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 17 deletions.
1 change: 0 additions & 1 deletion lib/shared/src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ interface RawClientConfiguration {
experimentalAutoEditRendererTesting: boolean
experimentalAutoEditConfigOverride: AutoEditsModelConfig | undefined
experimentalAutoEditEnabled: boolean
experimentalCommitMessage: boolean
experimentalNoodle: boolean
experimentalMinionAnthropicKey: string | undefined
experimentalNoxideEnabled: boolean
Expand Down
12 changes: 3 additions & 9 deletions vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
"group": "Commit",
"title": "Generate Commit Message (Experimental)",
"icon": "$(cody-logo)",
"when": "cody.activated && config.cody.experimental.commitMessage && config.git.enabled && !cody.isGeneratingCommit"
"when": "cody.activated && config.git.enabled && !cody.isGeneratingCommit"
},
{
"command": "cody.command.abort-commit",
Expand Down Expand Up @@ -747,7 +747,7 @@
},
{
"command": "cody.command.generate-commit",
"when": "cody.activated && config.cody.experimental.commitMessage && config.git.enabled && !cody.isGeneratingCommit"
"when": "cody.activated && config.git.enabled && !cody.isGeneratingCommit"
},
{
"command": "cody.command.abort-commit",
Expand Down Expand Up @@ -897,7 +897,7 @@
"scm/title": [
{
"command": "cody.command.generate-commit",
"when": "cody.activated && config.cody.experimental.commitMessage && config.git.enabled && scmProvider == git && !cody.isGeneratingCommit",
"when": "cody.activated && config.git.enabled && scmProvider == git && !cody.isGeneratingCommit",
"group": "navigation@1"
},
{
Expand Down Expand Up @@ -1028,12 +1028,6 @@
"markdownDescription": "Enable OpenTelemetry tracing",
"default": false
},
"cody.experimental.commitMessage": {
"order": 99,
"type": "boolean",
"markdownDescription": "Enable commit message generation",
"default": false
},
"cody.experimental.minion.anthropicKey": {
"order": 99,
"type": "string",
Expand Down
1 change: 0 additions & 1 deletion vscode/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export const CodyCommandMenuItems: MenuCommandAccessor[] = [
icon: 'git-commit',
command: { command: 'cody.command.generate-commit' },
keybinding: '',
requires: { setting: 'cody.experimental.commitMessage' },
},
{
key: 'custom',
Expand Down
3 changes: 0 additions & 3 deletions vscode/src/configuration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ describe('getConfiguration', () => {
return true
case 'cody.experimental.tracing':
return true
case 'cody.experimental.commitMessage':
return true
case 'cody.debug.verbose':
return true
case 'cody.debug.filter':
Expand Down Expand Up @@ -177,7 +175,6 @@ describe('getConfiguration', () => {
experimentalAutoEditRendererTesting: false,
experimentalMinionAnthropicKey: undefined,
experimentalTracing: true,
experimentalCommitMessage: true,
experimentalNoodle: false,
experimentalNoxideEnabled: true,
codeActions: true,
Expand Down
1 change: 0 additions & 1 deletion vscode/src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ export function getConfiguration(
autocompleteExperimentalGraphContext: getHiddenSetting<
ClientConfiguration['autocompleteExperimentalGraphContext']
>('autocomplete.experimental.graphContext', null),
experimentalCommitMessage: getHiddenSetting('experimental.commitMessage', true),
experimentalNoodle: getHiddenSetting('experimental.noodle', false),

experimentalTracing: getHiddenSetting('experimental.tracing', false),
Expand Down
1 change: 0 additions & 1 deletion vscode/src/testutils/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,6 @@ export const DEFAULT_VSCODE_SETTINGS = {
experimentalAutoEditConfigOverride: undefined,
experimentalMinionAnthropicKey: undefined,
experimentalTracing: false,
experimentalCommitMessage: true,
experimentalNoodle: false,
experimentalNoxideEnabled: true,
codeActions: true,
Expand Down
1 change: 0 additions & 1 deletion vscode/test/e2e/command-commit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ test.beforeEach(() => {
testGitWorkspace.extend<ExtraWorkspaceSettings>({
extraWorkspaceSettings: {
'cody.internal.unstable': true, // Needed for Cody Ignore
'cody.experimental.commitMessage': true,
},
})('use terminal output as context', async ({ page, sidebar }) => {
await sidebarSignin(page, sidebar)
Expand Down

0 comments on commit 2082513

Please sign in to comment.