Skip to content

feat: add prompt input to send text directly to Claude Code sessions#13

Merged
K-dash merged 1 commit into
mainfrom
feat/send-prompt-from-details
Feb 7, 2026
Merged

feat: add prompt input to send text directly to Claude Code sessions#13
K-dash merged 1 commit into
mainfrom
feat/send-prompt-from-details

Conversation

@K-dash
Copy link
Copy Markdown
Owner

@K-dash K-dash commented Feb 7, 2026

Summary

  • Add prompt input feature to send text directly to Claude Code sessions from the details panel
  • Press i to enter input mode, Enter to send prompt and auto-focus the target pane
  • Multi-line input support (Ctrl+O for newline) with automatic text wrapping and scrolling
  • Vim-style cursor navigation (Ctrl+H/J/K/L)

Changes

  • src/cli/mod.rs: Add WeztermCli::send_text() method (bracketed paste + Enter key submission)
  • src/ui/app.rs: Input mode state management, keybind handling, send logic
  • src/ui/render.rs: Input field rendering (CJK character width support, auto-wrapping, scrolling)
  • Cargo.toml: Add unicode-width dependency
  • README.md: Document new keybindings

Keybindings (Input Mode)

Key Action
i Enter input mode
Enter Send prompt & focus session
Ctrl+O Insert newline
Ctrl+H/L Move cursor left/right
Ctrl+J/K Move cursor up/down
Ctrl+A/E Move to line start/end
Ctrl+U Clear input
Esc Cancel input

Test plan

  • make all passes (fmt + clippy + test)
  • Press i to enter input mode — input field appears at bottom of details panel
  • Text input works with cursor movement, Backspace, and Ctrl+U
  • Ctrl+O inserts newline — input field expands to multiple lines
  • Enter sends prompt — text is sent to Claude Code pane and auto-submitted, focus moves to pane
  • Escape cancels input mode
  • Cursor position is correct with CJK/Japanese characters
  • Long text auto-wraps within the input field
  • Scrolling works when input exceeds 5 visible lines

Press 'i' to enter input mode in the details panel, type a prompt,
and press Enter to send it to the selected Claude Code session via
wezterm cli send-text. Supports multi-line input (Ctrl+O), vim-style
cursor movement (Ctrl+hjkl), and auto-scrolling for long input.
@K-dash K-dash merged commit eb9a1e0 into main Feb 7, 2026
1 check passed
@K-dash K-dash deleted the feat/send-prompt-from-details branch February 7, 2026 17:19
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