Skip to content

fix(cli): keep Console terminals in TUI mode - #11050

Merged
catrielmuller merged 1 commit into
mainfrom
tattered-echinodon
Jun 10, 2026
Merged

fix(cli): keep Console terminals in TUI mode#11050
catrielmuller merged 1 commit into
mainfrom
tattered-echinodon

Conversation

@catrielmuller

Copy link
Copy Markdown
Contributor

Summary

  • recognize Bun's virtual bundled entrypoint when Kilo Console resolves its PTY self-command
  • launch packaged Kilo binaries without forwarding the embedded script path, allowing the default TUI command to stay active
  • preserve source-mode invocation behavior and cover packaged Unix, Windows, and development entrypoints

Context

Packaged macOS binaries expose /$bunfs/root/src/index.js as process.argv[1]. The PTY resolver treated that virtual path as a source entrypoint and passed it back to the CLI, which selected CLI/help behavior and exited instead of opening the TUI.

@kilo-code-bot

kilo-code-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • .changeset/keep-console-tui-open.md
  • packages/opencode/src/kilocode/pty/self-command.ts
  • packages/opencode/test/kilocode/pty-self-command.test.ts

The fix is well-targeted. command() now correctly identifies both Unix (/$bunfs/) and Windows ([A-Za-z]:[\/]~BUN[\/]) virtual bundled entrypoints and skips forwarding them as script args, so packaged binaries stay in TUI mode. The refactor from a module-level current() function to an injectable proc parameter is clean and makes the logic properly testable without mocks. Test coverage is solid — bundled paths (Unix + both Windows slash styles), source entrypoints, and the resolve() integration are all covered. lgtm.


Reviewed by claude-4.6-sonnet-20260217 · 337,270 tokens

Review guidance: REVIEW.md from base branch main

@catrielmuller
catrielmuller merged commit 45c4902 into main Jun 10, 2026
21 checks passed
@catrielmuller
catrielmuller deleted the tattered-echinodon branch June 10, 2026 11:38
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
fix(cli): keep Console terminals in TUI mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants