@nanhara/hara 0.108.0 → 0.108.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/tui/InputBox.js +11 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to `@nanhara/hara`.
|
|
|
5
5
|
> Versioning (pre-1.0, SemVer-style): the **minor** (middle) number bumps for a **new feature**; the
|
|
6
6
|
> **patch** (last) number bumps for **optimizations/fixes of existing features**.
|
|
7
7
|
|
|
8
|
+
## 0.108.1 — pasting no longer sends the message
|
|
9
|
+
|
|
10
|
+
- **A pasted newline is content, not "send".** Pasting multi-line text used to fire the message at
|
|
11
|
+
the first newline (any 1–2 line paste under 600 chars auto-submitted) — the classic "I pasted and
|
|
12
|
+
it sent before I could edit" bug. Now ANY paste containing a newline folds to a `[Paste #N +L lines]`
|
|
13
|
+
token and waits; only a real **Enter** sends it (the token expands to the full text on submit). This
|
|
14
|
+
is codex's paste-burst rule — Enter inside a paste is a newline, not a submit. A lone newline typed
|
|
15
|
+
at the prompt still sends, as before.
|
|
16
|
+
- (Slow paste *recognition* over a remote/SSH terminal is chunk-delivery latency — network-bound, not
|
|
17
|
+
something the client amplifies; local pastes arrive as one chunk and are instant.)
|
|
18
|
+
|
|
8
19
|
## 0.108.0 — cron grows up: chat-native scheduling, delivery, a deterministic lane
|
|
9
20
|
|
|
10
21
|
Distilled from a three-way study of openclaw (the production-grade scheduler running our company),
|
package/dist/tui/InputBox.js
CHANGED
|
@@ -404,15 +404,19 @@ export function InputBox({ status, cwd, model, route, width, onSubmit, onClipboa
|
|
|
404
404
|
return;
|
|
405
405
|
}
|
|
406
406
|
if (input && !key.ctrl && !key.meta) {
|
|
407
|
-
// A
|
|
408
|
-
//
|
|
409
|
-
if (
|
|
410
|
-
|
|
407
|
+
// A lone newline delivered through `input` (some terminals send Enter this way instead of
|
|
408
|
+
// setting key.return) = the user pressed Enter → submit.
|
|
409
|
+
if (/^[\r\n]+$/.test(input)) {
|
|
410
|
+
submit(value);
|
|
411
411
|
return;
|
|
412
412
|
}
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
413
|
+
// A PASTE — any multi-char chunk that CONTAINS a newline, or a large single chunk — folds to a
|
|
414
|
+
// `[Paste #N +L lines]` token and NEVER submits. A pasted newline is content, not "send" (codex's
|
|
415
|
+
// paste-burst rule: Enter inside a paste is a newline, not submit). This fixes "paste is sent
|
|
416
|
+
// immediately": the old code submitted at the first newline in a pasted chunk, so any 1–2 line
|
|
417
|
+
// paste under 600 chars fired the message. Now only a real Enter (above / key.return) sends.
|
|
418
|
+
if (/[\r\n]/.test(input) || input.length >= 600) {
|
|
419
|
+
addPaste(input);
|
|
416
420
|
return;
|
|
417
421
|
}
|
|
418
422
|
// a dragged-in / pasted image file path attaches instead of inserting literal text
|