配置: 初始化 ISOS Agent Teams 软件研发模板
CI / lint (push) Successful in 6s

This commit is contained in:
2026-04-19 21:47:08 +08:00
parent 3ab6fe6504
commit 34346be862
202 changed files with 23544 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
---
name: tmux send-keys 回车问题
description: tmux send-keys 发送长文本到 cc 时 Enter 可能未生效,已创建 tmux-send-prompt.sh 脚本解决
type: feedback
originSessionId: 1f32ccfc-9806-4b86-91a1-367a9a07f713
---
## 问题
`tmux send-keys -t %1 '长中文文本...' Enter` 在 cc 输入框中,Enter 可能未被正确接收。
## 根因
1. **文本和 Enter 同时发送**: `tmux send-keys 'text' Enter` 在长文本场景下,Enter 可能在 cc 还未准备好接收时就被发送
2. **前一个命令未完成**: `/effort max` 执行后 sleep 时间不够(只等 5s),cc 的 prompt(❯)还没出现
3. **无法确认提交状态**: 没有验证 Enter 是否生效
## 解决方案
使用 `/workspace/scripts/tmux-send-prompt.sh` 脚本:
```bash
/workspace/scripts/tmux-send-prompt.sh <pane_id> '文本内容'
/workspace/scripts/tmux-send-prompt.sh <pane_id> /path/to/prompt.md
```
脚本做了 4 件事:
1. 等待 prompt 就绪(检测 ❯ 字符,最多 30s)
2. 文本和 Enter 分开发送(先文本→sleep 1s→Enter
3. 验证提交状态(检查输入框是否清空)
4. 自动重试(最多 3 次)
## 手动发送注意事项
```bash
# 1. 发送文本(不带 Enter
tmux send-keys -t %1 '长文本内容'
sleep 1
# 2. 单独发送 Enter
tmux send-keys -t %1 Enter
sleep 2
# 3. 验证
tmux capture-pane -t %1 -p | tail -5
```
**Why:** pane-1/pane-2 发送评审任务后 Enter 未生效,内容停留在输入框中
**How to apply:** 向 cc 发送长文本时用 tmux-send-prompt.sh 脚本;手动发送时分两步(文本→sleep→Enter→验证)