Skip to content

Commit 61de941

Browse files
committed
Remove /connect from codebuff
1 parent 617e0f7 commit 61de941

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

cli/src/commands/__tests__/router-input.test.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -372,22 +372,16 @@ describe('command-registry', () => {
372372
}
373373
})
374374

375-
test('connect slash command presence matches feature flag', () => {
376-
const { CHATGPT_OAUTH_ENABLED } = require('@codebuff/common/constants/chatgpt-oauth')
375+
test('connect command is not available in codebuff (freebuff-only)', () => {
377376
const hasConnectSlashCommand = SLASH_COMMANDS.some(
378377
(cmd) => cmd.id === 'connect',
379378
)
380-
expect(hasConnectSlashCommand).toBe(CHATGPT_OAUTH_ENABLED)
379+
expect(hasConnectSlashCommand).toBe(false)
381380
})
382381

383-
test('connect:chatgpt command registry availability matches feature flag', () => {
384-
const { CHATGPT_OAUTH_ENABLED } = require('@codebuff/common/constants/chatgpt-oauth')
382+
test('connect:chatgpt command is not available in codebuff (freebuff-only)', () => {
385383
const command = findCommand('connect:chatgpt')
386-
if (CHATGPT_OAUTH_ENABLED) {
387-
expect(command).toBeDefined()
388-
} else {
389-
expect(command).toBeUndefined()
390-
}
384+
expect(command).toBeUndefined()
391385
})
392386
})
393387
})

cli/src/commands/command-registry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ const FREEBUFF_REMOVED_COMMANDS = new Set([
179179
])
180180

181181
const FREEBUFF_ONLY_COMMANDS = new Set([
182+
'connect',
182183
'plan',
183184
])
184185

cli/src/data/slash-commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const FREEBUFF_REMOVED_COMMAND_IDS = new Set([
4747
])
4848

4949
const FREEBUFF_ONLY_COMMAND_IDS = new Set([
50+
'connect',
5051
'plan',
5152
])
5253

0 commit comments

Comments
 (0)