tycono 0.3.19 → 0.3.20
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
CHANGED
|
@@ -329,8 +329,10 @@ export const CommandMode: React.FC<CommandModeProps> = ({
|
|
|
329
329
|
if (line) eventLines.push(line);
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
// Merge
|
|
333
|
-
const allLines = [...userInputs, ...systemMessages, ...eventLines]
|
|
332
|
+
// Merge all lines sorted by ID (chronological) — prevents user input from being sliced off
|
|
333
|
+
const allLines = [...userInputs, ...systemMessages, ...eventLines]
|
|
334
|
+
.sort((a, b) => a.id - b.id)
|
|
335
|
+
.slice(-60);
|
|
334
336
|
|
|
335
337
|
// Reset committedRef if it exceeds allLines (prevents unbounded growth)
|
|
336
338
|
if (committedRef.current > allLines.length) {
|