ruidoBlanco
9 月 27 日
没点开看也知道自己是根本不会去用的,点进去看见那个侧边栏,脑子里蹦出来的是「 amateur 」。侧边栏无端的增加了 context switching 开销,敲命令能避免就避免。
下面的是我 kitty 里配的,任意命令行,不论是否过 ssh ,直接写自己的需求,cmd+g 就生成命令。
```
map kitty_mod+g remote_control_script kitty_generate_cmd
# /usr/bin/zsh -l
# Capture screen text before modifying the command line
screen=$(kitty @ get-text --extent=screen -m state:focused)
# Show placeholder while generating
kitty @ send-text -m state:focused "\x15🤖 thinking ..."
cmd=$(echo "$screen" \
| omp -p "Based on the terminal output above, the last line is my request. Output ONLY the shell command to run. No explanation, no markdown fence.")
# Replace placeholder with generated command
kitty @ send-text -m state:focused "\x15${cmd}"
```