Skip to content

feat: add embedded terminal panel#282

Open
musnows wants to merge 1 commit into
KunAgent:developfrom
musnows:codex/terminal-panel-tabs
Open

feat: add embedded terminal panel#282
musnows wants to merge 1 commit into
KunAgent:developfrom
musnows:codex/terminal-panel-tabs

Conversation

@musnows

@musnows musnows commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add an embedded bottom terminal panel with xterm rendering and persistent PTY sessions.
  • Add multi-tab terminal support with right-click tab actions for rename, close other tabs, and close all tabs.
  • Integrate terminal IPC through preload/main with payload validation and lazy node-pty loading.
  • Update packaging so node-pty assets are unpacked and helper binaries remain executable.

Details

The terminal panel is toggled from the workbench top bar and is rendered as a full-width bottom drawer under the chat composer. The terminal starts closed on app launch and clears the previous persisted open state, so a terminal session is only created after explicit user action.

Each tab owns a stable PTY session id. Switching tabs reattaches the renderer to the existing session, while close actions dispose of the backing PTY. The tab context menu is rendered through a body portal and supports secondary-click fallback handling so the menu is visible and not clipped by the terminal header.

Validation

  • npm run typecheck
  • npm run build
  • npm run dist:mac:arm64
  • npm run build && npx --yes electron-builder@26.8.1 --config electron-builder.config.cjs --config.npmRebuild=false --publish never --win nsis --x64
  • Installed the macOS arm64 build locally and verified terminal launch, tab context menu, close-all behavior, and startup with terminal closed.
  • Built Windows x64 NSIS installer: dist/Kun-0.1.0-win-x64.exe

#258

@musnows musnows force-pushed the codex/terminal-panel-tabs branch 3 times, most recently from 0654237 to de17d55 Compare June 14, 2026 04:13
@musnows musnows force-pushed the codex/terminal-panel-tabs branch from de17d55 to 3b427c0 Compare June 14, 2026 04:18
@musnows

musnows commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator Author

内置终端

mac
image

windows
image

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.

1 participant