docs: align the cron, teammate-pane and TUI comments with the paste

- cron resolvePrompt(): give the reason the rest of the cron docs give (the
  submit check cannot recognise a multi-line paste; in paste mode the newlines
  reach the CLI as keys) instead of the old one about writeViaMux fusing lines.
- sendInputToPane(): it types with send-keys -l and strips line breaks, so it
  no longer uses "the same approach as sendInput()".
- TUI client: newlines become spaces (the docstring said stripped), and the
  test name no longer cites "multi-line breaks Ink".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claudia[bot]andClaude Opus 5.5 committed 2026-10-21 05:06:43 +02:00
1 parent cf999c1296
commit 225fdbf505
4 files changed
+12 -10

No files matched your search

+5 -5
View File
@@ -536,11 +536,11 @@ export class CronService {
}
/**
* Resolves the prompt text and enforces the single-line constraint: prompt
* delivery rides writeViaMux/PTY writes where a newline is Enter, so a
* multi-line prompt would be silently corrupted (typed mode fuses lines,
* paste mode submits the first line and dribbles the rest in as separate
* messages). Rather than mangle an unattended agent's instructions, fail the
* Resolves the prompt text and enforces the single-line constraint: a job
* fires unattended, and the submit check that re-presses an ignored Enter
* cannot recognise a multi-line paste in the composer (typed mode), so a
* stranded prompt would go unnoticed; in paste mode the newlines reach the
* CLI as keys. Rather than risk an unattended agent's instructions, fail the
* run with a clear error. A prompt FILE may end with trailing newline(s)
* (every editor writes one) — those are stripped before the check.
*/
+3 -1
View File
@@ -4019,7 +4019,9 @@ export class TmuxManager extends EventEmitter implements TerminalMultiplexer {
/**
* Send input to a specific pane within a tmux session.
* Uses the same literal text approach as sendInput() but targets a specific pane.
* Types the text literally with `send-keys -l`, line breaks stripped, then Enter
* when the input carried a `\r`. Unlike sendInput(), it neither pastes nor keeps
* the line breaks of multi-line text.
*/
sendInputToPane(muxName: string, paneTarget: string, input: string): boolean {
if (IS_TEST_MODE) return true;
+3 -3
View File
@@ -704,9 +704,9 @@ export class TuiClient {
*
* Two hard rules from CLAUDE.md, both enforced here so no caller can get them
* wrong: the payload must END with `\r` or the server never issues Enter and
* the text sits unsubmitted, and embedded newlines are stripped rather than
* sent (the server would paste them as one block, which its submit check
* cannot reliably recognise in the composer).
* the text sits unsubmitted, and embedded newlines become spaces rather than
* being sent (the server would paste them as one block, which its submit
* check cannot reliably recognise in the composer).
* The `clientId`/`seq` pair makes delivery exactly-once, so a retry after a
* dropped connection cannot type the prompt twice.
*/