mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 02:29:33 +01:00
fix(skill): sendwait refuses an empty prompt; verbs.md says it joins lines
A prompt made only of blank lines joined to nothing, and sendwait then sent a bare Enter onto whatever sat on the worker's composer. It now refuses with "sendwait: empty prompt" (the test fails without the check). reference/verbs.md still said sendwait takes one line and a multi-line prompt can sit unsent; it now says sendwait joins the lines with a space, which loses their layout, so long multi-line content belongs in a file. Plugin mirror regenerated. Co-Authored-By: Christian Haberl <116439789+christianhaberl@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
b9b6ce57b7
commit
8c8ff383c2
7 files changed
+19
-8
No files matched your search
@@ -348,6 +348,7 @@ sendwait() {
|
||||
case "$p" in *$'\n'*|*$'\r'*)
|
||||
p=$(printf '%s\n' "$p" | tr '\r' '\n' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e '/^$/d' | paste -sd ' ' -) ;;
|
||||
esac
|
||||
[ -n "$p" ] || { echo "sendwait: empty prompt" >&2; return 1; }
|
||||
# `wait:"stop,exit"`, never the `wait:true` default set: that set also carries
|
||||
# `idle`, which is INFERRED from output stabilization and flaps mid-turn. On a
|
||||
# dsh worker whose TUI repaints rarely the session reads `idle` while the model
|
||||
|
||||
@@ -247,6 +247,7 @@ sendwait() {
|
||||
case "$p" in *$'\n'*|*$'\r'*)
|
||||
p=$(printf '%s\n' "$p" | tr '\r' '\n' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e '/^$/d' | paste -sd ' ' -) ;;
|
||||
esac
|
||||
[ -n "$p" ] || { echo "sendwait: empty prompt" >&2; return 1; }
|
||||
# `wait:"stop,exit"`, never the `wait:true` default set: that set also carries
|
||||
# `idle`, which is INFERRED from output stabilization and flaps mid-turn. On a
|
||||
# dsh worker whose TUI repaints rarely the session reads `idle` while the model
|
||||
|
||||
@@ -304,11 +304,12 @@ Codeman types the text and sends Enter **only when the input contains a carriage
|
||||
return**; without it your command sits unsubmitted on the worker's prompt and
|
||||
everything downstream times out. No response field catches this: `delivered:true`
|
||||
means "written to the pane", **not** "submitted". With `useMux`, newlines are kept: the
|
||||
text goes in as one paste, and the `\r` submits all of it. **`sendwait` takes one line,
|
||||
text goes in as one paste, and the `\r` submits all of it. **`sendwait` sends one line,
|
||||
though:** its Enter loop and the server's submit check cannot reliably recognise a
|
||||
multi-line paste, so a multi-line prompt to a freshly spawned worker can sit unsent in
|
||||
Claude Code's Enter-ignore window. Join the lines, or put long multi-line content in a
|
||||
file ([§5.9](#59-big-input-via-the-workspace)). Build the body with `jq -n`
|
||||
multi-line paste, so a multi-line prompt to a freshly spawned worker could sit unsent in
|
||||
Claude Code's Enter-ignore window. `sendwait` therefore joins the lines with a space,
|
||||
which loses their layout; put long multi-line content in a file
|
||||
([§5.9](#59-big-input-via-the-workspace)). Build the body with `jq -n`
|
||||
for any prompt you did not author as a literal, because the inline
|
||||
`-d '{"input":"'"$P"'\r"}'` pattern breaks on the first double quote, backslash or `$`
|
||||
in a real prompt:
|
||||
|
||||
Reference in new issue
Block a user