@causyne/agent 1.20.71 → 1.20.73
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/assets/logo.png +0 -0
- package/src/auth/openrouterAuth.js +129 -69
- package/src/auth/openrouterAuth.ts +130 -70
- package/src/commands.js +25 -2
- package/src/dynamicCatalogue.js +9 -35
- package/src/dynamicCatalogue.ts +8 -35
- package/src/tui/consoleGuard.js +33 -0
- package/src/tui/consoleGuard.ts +34 -0
- package/src/tui/modelPicker.js +67 -33
- package/src/tui/modelPicker.ts +74 -35
- package/src/tui/stage.js +6 -1
- package/src/tui/stageSurface.js +13 -10
package/src/tui/stageSurface.js
CHANGED
|
@@ -392,9 +392,6 @@ export class StageSurface {
|
|
|
392
392
|
* the contract in transcript.js.
|
|
393
393
|
*/
|
|
394
394
|
commit(kind, produce, meta = null) {
|
|
395
|
-
if (kind === 'error' || kind === 'turn' || kind === 'approval') {
|
|
396
|
-
this.stage.invalidate();
|
|
397
|
-
}
|
|
398
395
|
return this.transcript.append({ kind, produce, meta });
|
|
399
396
|
}
|
|
400
397
|
|
|
@@ -441,17 +438,23 @@ export class StageSurface {
|
|
|
441
438
|
// entered from Home occupies the available height at every terminal width.
|
|
442
439
|
// Its short transcript is placed next to the input below.
|
|
443
440
|
const contentRows = this.transcript.height(contentWidth);
|
|
444
|
-
const
|
|
441
|
+
const minFloor = contentRows > 0 ? MIN_VIEWPORT_ROWS : 0;
|
|
442
|
+
const neededWithFloor = Math.min(this.stage.maxHeight, block.length + minFloor);
|
|
443
|
+
const desired = Math.max(
|
|
444
|
+
sessionStageHeight(this.stage.maxHeight, block.length, contentRows, this.fullSession || caret?.inline),
|
|
445
|
+
neededWithFloor
|
|
446
|
+
);
|
|
445
447
|
if (desired > this.stage.height) this.stage.grow(desired - this.stage.height);
|
|
446
448
|
|
|
447
449
|
const height = this.stage.height;
|
|
448
450
|
|
|
449
|
-
//
|
|
450
|
-
//
|
|
451
|
-
//
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
451
|
+
// The prompt may not eat the whole band — but only once there is a
|
|
452
|
+
// transcript for it to eat. Trim from the TOP when it would: the status
|
|
453
|
+
// footer and the caret row are the last rows and the ones worth keeping,
|
|
454
|
+
// and an input box that has scrolled its own oldest row off is a smaller lie
|
|
455
|
+
// than a transcript that has vanished.
|
|
456
|
+
const floor = contentRows > 0 ? MIN_VIEWPORT_ROWS : 0;
|
|
457
|
+
const maxBlock = Math.max(1, height - floor);
|
|
455
458
|
if (block.length > maxBlock) {
|
|
456
459
|
const cut = block.length - maxBlock;
|
|
457
460
|
block = block.slice(cut);
|