fix: MCP install command always visible in Cmd+K regardless of mcpStatus
The command was gated on `mcpStatus !== 'checking'` which meant it was hidden during the initial async status check. Changed enabled to always be true so users can find and run the command immediately on app start. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -215,18 +215,18 @@ describe('install-mcp command', () => {
|
||||
expect(cmd!.label).toBe('Restore MCP Server')
|
||||
})
|
||||
|
||||
it('is disabled when mcpStatus is checking', () => {
|
||||
it('is enabled even when mcpStatus is checking', () => {
|
||||
const config = makeConfig({ mcpStatus: 'checking', onInstallMcp: vi.fn() })
|
||||
const { result } = renderHook(() => useCommandRegistry(config))
|
||||
const cmd = findCommand(result.current, 'install-mcp')
|
||||
expect(cmd!.enabled).toBe(false)
|
||||
expect(cmd!.enabled).toBe(true)
|
||||
})
|
||||
|
||||
it('is disabled when no handler provided', () => {
|
||||
it('is enabled even when no handler provided', () => {
|
||||
const config = makeConfig({ mcpStatus: 'not_installed' })
|
||||
const { result } = renderHook(() => useCommandRegistry(config))
|
||||
const cmd = findCommand(result.current, 'install-mcp')
|
||||
expect(cmd!.enabled).toBe(false)
|
||||
expect(cmd!.enabled).toBe(true)
|
||||
})
|
||||
|
||||
it('has restore keyword for discoverability', () => {
|
||||
|
||||
Reference in New Issue
Block a user