diff options
| author | Paul Buetow <paul@buetow.org> | 2025-09-06 16:09:55 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-09-06 16:09:55 +0300 |
| commit | 29aefb0dd3b41eb137d2e0a217f8ec422970e619 (patch) | |
| tree | 60bcc31dc742c9a5a6d1596ff5a159416936d141 | |
| parent | c667c26f81588a6594c2a07bd3cba89edd653df4 (diff) | |
add action prompt
| -rwxr-xr-x | dotfiles/scripts/hx.hexai-action-prompt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dotfiles/scripts/hx.hexai-action-prompt b/dotfiles/scripts/hx.hexai-action-prompt new file mode 100755 index 0000000..cd1e233 --- /dev/null +++ b/dotfiles/scripts/hx.hexai-action-prompt @@ -0,0 +1,17 @@ +#!/usr/bin/env zsh + +declare -r INPUT_FILE=~/.hx-action-input +declare -r REPLY_FILE=~/.hx-action-reply +if [ -f "$REPLY_FILE" ]; then + rm "$REPLY_FILE" +fi + +cat > $INPUT_FILE + +tmux split-window -v "echo hello;set -x;touch $REPLY_FILE.tmp; hexai-action -infile $INPUT_FILE -outfile $REPLY_FILE.tmp; mv $REPLY_FILE.tmp $REPLY_FILE" + +while [ ! -f "$REPLY_FILE" ]; do + sleep 0.2 +done + +cat "$REPLY_FILE" |
