winter-super-cli 2026.6.15 → 2026.6.16
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/package.json +1 -1
- package/src/cli/repl.js +8 -3
package/package.json
CHANGED
package/src/cli/repl.js
CHANGED
|
@@ -662,8 +662,13 @@ export class WinterREPL {
|
|
|
662
662
|
const PASTE_DELAY = 80;
|
|
663
663
|
|
|
664
664
|
process.stdin.on('data', (chunk) => {
|
|
665
|
-
|
|
666
|
-
|
|
665
|
+
const text = chunk.toString('utf8');
|
|
666
|
+
const newlineCount = (text.match(/\r?\n/g) || []).length;
|
|
667
|
+
|
|
668
|
+
// A normal submitted line can arrive as one chunk like "hello\n".
|
|
669
|
+
// Treat only real multi-line chunks as paste, otherwise REPL input
|
|
670
|
+
// gets stuck in multiline mode and never reaches the AI.
|
|
671
|
+
if (newlineCount > 1) {
|
|
667
672
|
this._isPasteChunk = true;
|
|
668
673
|
if (this._pasteChunkTimer) clearTimeout(this._pasteChunkTimer);
|
|
669
674
|
this._pasteChunkTimer = setTimeout(() => {
|
|
@@ -676,7 +681,7 @@ export class WinterREPL {
|
|
|
676
681
|
this._pasteTimer = null;
|
|
677
682
|
if (this._pasteBuffer.length === 0) return;
|
|
678
683
|
|
|
679
|
-
const isSingleLineInput = this._pasteBuffer.length === 1 &&
|
|
684
|
+
const isSingleLineInput = this._pasteBuffer.length === 1 && this._multilineBuffer.length === 0;
|
|
680
685
|
const isJustEmptyEnter = this._pasteBuffer.length === 1 && this._pasteBuffer[0].trim() === '';
|
|
681
686
|
|
|
682
687
|
// Normal single-line submit
|