Merge pull request #3 from Askhz/fix/setup-dialogs
fix(interactive): stop early input capture before rendering dialogs
This commit is contained in:
commit
a9587e824d
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -8,12 +8,15 @@ coverage
|
|||
.vscode
|
||||
*.suo
|
||||
*.lock
|
||||
*.exe
|
||||
src/utils/vendor/
|
||||
|
||||
# AI tool runtime directories
|
||||
.agents/
|
||||
.codex/
|
||||
.omx/
|
||||
.claude/
|
||||
.costrict/
|
||||
|
||||
# Binary / screenshot files (root only)
|
||||
/*.png
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
"bun": ">=1.2.0"
|
||||
},
|
||||
"bin": {
|
||||
"ccb": "dist/cli.js",
|
||||
"csc": "dist/cli.js",
|
||||
"claude-code-best": "dist/cli.js"
|
||||
},
|
||||
"workspaces": [
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ import { updateGithubRepoPathMapping } from './utils/githubRepoPathMapping.js'
|
|||
import { applyConfigEnvironmentVariables } from './utils/managedEnv.js'
|
||||
import type { PermissionMode } from './utils/permissions/PermissionMode.js'
|
||||
import { getBaseRenderOptions } from './utils/renderOptions.js'
|
||||
import { stopCapturingEarlyInput } from './utils/earlyInput.js'
|
||||
import { getSettingsWithAllErrors } from './utils/settings/allErrors.js'
|
||||
import {
|
||||
hasAutoModeOptIn,
|
||||
|
|
@ -152,6 +153,14 @@ export async function showSetupScreens(
|
|||
claudeInChrome?: boolean,
|
||||
devChannels?: ChannelEntry[],
|
||||
): Promise<boolean> {
|
||||
// Stop early input capture before rendering any interactive dialog.
|
||||
// The early input listener registered in startCapturingEarlyInput() competes
|
||||
// with Ink's stdin listener — both are 'readable' handlers and whichever fires
|
||||
// first consumes the data. Since early input is registered first, it drains all
|
||||
// keypresses (including arrow keys / Enter) before Ink can see them, making
|
||||
// dialogs like TrustDialog completely unresponsive to keyboard input.
|
||||
stopCapturingEarlyInput()
|
||||
|
||||
if (
|
||||
process.env.NODE_ENV === 'test' ||
|
||||
isEnvTruthy(false) ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user