mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-19 04:39:33 +01:00
docs: tighten the comments and skill text around multi-line input
- sendInput's docstring said all text without `\r` is typed; that now holds for single-line text only. - The skill's big-input section still listed "the newline stripping" among the hazards a workspace file avoids; it is the unconfirmed multi-line paste now. Rewrapped, mirrored in plugins/codeman. - The mobile composer's hand-back comment said the prompt transport strips newlines. The hand-back writes to the terminal prompt, whose text reaches the PTY as typed input, where a newline is a key; the behaviour (a multi-line draft stays parked) is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f06635512a
commit
3392a69290
4 files changed
+20
-16
No files matched your search
@@ -590,7 +590,8 @@ allowlist in §4.
|
||||
|
||||
The composer is capped at 65536 characters, and a multi-line paste cannot be confirmed
|
||||
as submitted, which makes it a bad channel for a spec, a diff or a file list. The
|
||||
workspace is the good one, and for a local or docker case you are on the same filesystem as the worker.
|
||||
workspace is the good one, and for a local or docker case you are on the same
|
||||
filesystem as the worker.
|
||||
|
||||
1. Write `TASK.md` into the worker's workspace with your own file tools. The path is
|
||||
`.data.casePath` from `quick-start`, or the `workingDir` you passed to
|
||||
@@ -600,10 +601,10 @@ workspace is the good one, and for a local or docker case you are on the same fi
|
||||
3. Wait on `DONE_<token>` with `wait-output` ([§5.5](#55-markers-for-hook-less-workers)),
|
||||
then read `RESULT.json` back with your own tools.
|
||||
|
||||
This sidesteps the byte cap, the newline stripping and the quoting hazards in one
|
||||
move, and it makes the marker **split by construction**: the token lives in the file,
|
||||
never in the line you type, so the echo of your own keystrokes cannot match it. The
|
||||
worker also gets to re-read the task instead of holding it in one echoed line.
|
||||
This sidesteps the byte cap, the unconfirmed multi-line paste and the quoting hazards
|
||||
in one move, and it makes the marker **split by construction**: the token lives in the
|
||||
file, never in the line you type, so the echo of your own keystrokes cannot match it.
|
||||
The worker also gets to re-read the task instead of holding it in one echoed line.
|
||||
|
||||
⚠️ Two places it does not work: a **remote-SSH case** runs on another host whose
|
||||
filesystem you cannot see, and any worker **currently editing** the directory you are
|
||||
|
||||
@@ -590,7 +590,8 @@ allowlist in §4.
|
||||
|
||||
The composer is capped at 65536 characters, and a multi-line paste cannot be confirmed
|
||||
as submitted, which makes it a bad channel for a spec, a diff or a file list. The
|
||||
workspace is the good one, and for a local or docker case you are on the same filesystem as the worker.
|
||||
workspace is the good one, and for a local or docker case you are on the same
|
||||
filesystem as the worker.
|
||||
|
||||
1. Write `TASK.md` into the worker's workspace with your own file tools. The path is
|
||||
`.data.casePath` from `quick-start`, or the `workingDir` you passed to
|
||||
@@ -600,10 +601,10 @@ workspace is the good one, and for a local or docker case you are on the same fi
|
||||
3. Wait on `DONE_<token>` with `wait-output` ([§5.5](#55-markers-for-hook-less-workers)),
|
||||
then read `RESULT.json` back with your own tools.
|
||||
|
||||
This sidesteps the byte cap, the newline stripping and the quoting hazards in one
|
||||
move, and it makes the marker **split by construction**: the token lives in the file,
|
||||
never in the line you type, so the echo of your own keystrokes cannot match it. The
|
||||
worker also gets to re-read the task instead of holding it in one echoed line.
|
||||
This sidesteps the byte cap, the unconfirmed multi-line paste and the quoting hazards
|
||||
in one move, and it makes the marker **split by construction**: the token lives in the
|
||||
file, never in the line you type, so the echo of your own keystrokes cannot match it.
|
||||
The worker also gets to re-read the task instead of holding it in one echoed line.
|
||||
|
||||
⚠️ Two places it does not work: a **remote-SSH case** runs on another host whose
|
||||
filesystem you cannot see, and any worker **currently editing** the directory you are
|
||||
|
||||
+4
-3
@@ -3827,11 +3827,12 @@ export class TmuxManager extends EventEmitter implements TerminalMultiplexer {
|
||||
* - Text followed by `\r` goes in as ONE bracketed paste (buildPasteTextCommands),
|
||||
* so Codex cannot fold the Enter into a paste burst; a single character is typed
|
||||
* with `send-keys -l` instead, so a dialog answer selects (submitsAsKeys)
|
||||
* - Text without `\r` is typed literally with `send-keys -l` (no key interpretation)
|
||||
* - Single-line text without `\r` is typed literally with `send-keys -l` (no key
|
||||
* interpretation)
|
||||
* - A `\n` inside the text is kept (`\r\n` loses only its `\r`), and multi-line text
|
||||
* always goes in as ONE bracketed paste, with or without a following Enter: inside
|
||||
* the paste markers an agent CLI inserts the line breaks into its composer, where
|
||||
* typed as keys each one could submit a line on its own
|
||||
* the paste markers a CLI that enabled bracketed paste receives the line breaks as
|
||||
* pasted text, where typed as keys each one could submit a line on its own
|
||||
* - `Enter` key is sent as a SEPARATE tmux invocation after a small delay
|
||||
* - Ink (Claude CLI) needs text and Enter split to avoid treating Enter as a newline
|
||||
*/
|
||||
|
||||
@@ -1415,9 +1415,10 @@ const KeyboardAccessoryBar = {
|
||||
overlay.querySelector('.prompt-composer-terminal').addEventListener('click', () => {
|
||||
// Hand the text BACK to the terminal prompt so both surfaces hold the same
|
||||
// prompt, the mirror of the adoption composePrompt() does on open. Only a
|
||||
// single-line draft can make the trip: the prompt transport is single-line
|
||||
// and strips embedded newlines, so a multi-line draft would arrive mangled
|
||||
// and instead stays parked as a draft (the dot on the Compose key shows it).
|
||||
// single-line draft can make the trip: the terminal prompt is one line and
|
||||
// its text reaches the PTY as typed input, where an embedded newline is a
|
||||
// key, so a multi-line draft would arrive mangled and instead stays parked
|
||||
// as a draft (the dot on the Compose key shows it).
|
||||
const text = textarea.value;
|
||||
if (!text || text.includes('\n')) {
|
||||
close({ focusTerminal: true });
|
||||
|
||||
Reference in new issue
Block a user