-
Notifications
You must be signed in to change notification settings - Fork 5.1k
perf(terminal): use RestoreBlocks stage in insert_restored_block #13112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: andy/long-convo-latency-exchange-lookup
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2739,7 +2739,7 @@ impl BlockList { | |
| pub fn insert_restored_block(&mut self, block: &SerializedBlock) { | ||
| let did_active_block_receive_precmd = self.active_block().has_received_precmd(); | ||
| let mut processor = Processor::new(); | ||
| self.restore_block(block, BootstrapStage::PostBootstrapPrecmd, &mut processor); | ||
| self.restore_block(block, BootstrapStage::RestoreBlocks, &mut processor); | ||
| // restore_block consumed the previous active block and made the restored | ||
| // block the new active (finished) block. Create a fresh active block so | ||
| // the terminal can continue accepting input. | ||
|
|
@@ -2958,7 +2958,6 @@ impl BlockList { | |
| self.active_block_mut().start_background(None); | ||
| } else { | ||
| self.active_block_mut().start(); | ||
| self.active_block_mut().disable_reset_grid_checks(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
|
|
||
| if let Some(serialized_ai_metadata) = block.ai_metadata.as_ref().and_then(|ai_metadata| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restore_blockcallers that still passBootstrapStage::PostBootstrapPrecmd(for example shared-session scrollback). On Windows debug builds those restored grids are created with reset checks enabled, but serialized restore bytes do not include the ConPTY reset OSC, so the first parsed input can hit the reset-grid debug assertion. Keep disabling checks for restoredPostBootstrapPrecmdblocks or move those callers to a non-done bootstrap stage too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't needed. Callers that pass
BootstrapStage::RestoreBlocksalready getPerformResetGridChecks::NofromBlock::new(becauseRestoreBlocks.is_done() == false), so there is no Windows ConPTY reset-grid assertion risk duringparse_bytes.