heyio 0.24.1 → 0.24.2
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/dist/tui/index.js +11 -2
- package/package.json +1 -1
package/dist/tui/index.js
CHANGED
|
@@ -252,9 +252,14 @@ export async function startTui() {
|
|
|
252
252
|
firstChunk = false;
|
|
253
253
|
}
|
|
254
254
|
if (done) {
|
|
255
|
+
// Finalize the current message as its own line, then reset state
|
|
256
|
+
// so the next message in a multi-turn response starts a fresh bubble.
|
|
255
257
|
clearLine();
|
|
256
|
-
|
|
257
|
-
|
|
258
|
+
if (accumulated) {
|
|
259
|
+
process.stdout.write(accumulated + "\n");
|
|
260
|
+
}
|
|
261
|
+
accumulated = "";
|
|
262
|
+
firstChunk = true;
|
|
258
263
|
}
|
|
259
264
|
else {
|
|
260
265
|
accumulated += text;
|
|
@@ -262,6 +267,10 @@ export async function startTui() {
|
|
|
262
267
|
process.stdout.write(accumulated);
|
|
263
268
|
}
|
|
264
269
|
});
|
|
270
|
+
// Restore the prompt once the handler promise fully resolves (i.e. after
|
|
271
|
+
// all turns are done), rather than inside the done callback so that
|
|
272
|
+
// multi-turn responses don't render a premature prompt between messages.
|
|
273
|
+
rl.prompt();
|
|
265
274
|
}
|
|
266
275
|
catch (err) {
|
|
267
276
|
clearLine();
|