[Feature]: wsh command to send input to a terminal block (expose controllerinput)

未关闭
#3,424 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
go
领域
api, cli

调研方向

Start by locating the existing wsh command implementations and the controllerinput RPC using CommandBlockInputData. Trace how wsh commands connect through wave.sock and authenticate, then add the proposed text, enter, signal, and stdin input modes. Done means input reaches the selected terminal block through the existing RPC without requiring a hand-rolled client.

由索引模型根据 Issue 内容生成。

描述

Use case

I run a small external dashboard that watches my terminal blocks (via wsh blocks list + wsh termscrollback) and I'd like to also send keystrokes to a block — e.g. answer an interactive prompt in a long-running session from another machine/phone.

What exists today

The controllerinput RPC (CommandBlockInputData: blockid, inputdata64, signame, termsize) already does exactly this — the frontend uses it for all typing. It works great when called directly over wave.sock with the WAVETERM_JWT auth handshake (tested on v0.14.5, Windows). But there's no wsh subcommand for it, so scripts have to hand-roll the domain-socket RPC.

Proposal
wsh sendinput -b <blockid> "text to type"     # raw bytes to the pty
wsh sendinput -b <blockid> --enter            # append \r
wsh sendinput -b <blockid> --signal SIGINT    # signame variant

Reading input from stdin (wsh sendinput -b <id> -) would also cover binary/control sequences.

Related: #3196 (wsh tab rename), #3285 (wsh tab create) — same theme of making existing RPCs scriptable.

🤖 Generated with Claude Code

主要语言
Go
星标
22.3k
派生
1.1k
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

wavetermdev/waveterm 的其他 Issue

查看 wavetermdev/waveterm 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。