feat(mode): enabled conditional transcript compaction logic
- Introduced conditional scrollback clearing during UI renders when transcript compaction is enabled. - Updated `CommandController` and `EventController` to respect the `display.collapseCompacted` setting. - Configured `SelectorController` to trigger a chat rebuild and UI reset when the compaction setting changes. - Updated `InteractiveMode` to dynamically toggle between collapsed and full inline history based on user settings.
This commit is contained in:
@@ -1200,7 +1200,15 @@ export class CommandController {
|
||||
this.ctx.rebuildChatFromMessages();
|
||||
|
||||
this.ctx.statusLine.invalidate();
|
||||
this.ctx.ui.requestRender();
|
||||
// Same as the auto-compaction rebuild: a collapsed transcript is an
|
||||
// intentional replacement, so drop the stale pre-compaction scrollback
|
||||
// instead of repainting the shrunken frame below it. With collapse
|
||||
// disabled the full history stays inline and scrollback is kept.
|
||||
if (this.ctx.settings.get("display.collapseCompacted")) {
|
||||
this.ctx.ui.requestRender(true, { clearScrollback: true });
|
||||
} else {
|
||||
this.ctx.ui.requestRender();
|
||||
}
|
||||
} catch (error) {
|
||||
if (error instanceof CompactionCancelledError) {
|
||||
outcome = "cancelled";
|
||||
|
||||
Reference in New Issue
Block a user