Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
daxian-dbw committed Oct 10, 2023
1 parent 10a087e commit 46e7fb5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions shell/ShellCopilot.Kernel/Render.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,9 @@ internal void Refresh(string newText)

_currentText = newText;

// Wait for 50ms before refreshing again for the in-coming payload.
// TODO: 50ms interval makes it a little flashing when rendering code blocks because we usually
// rewrite a whole line when rendering updates in code blocks. Need to think about how to reduce
// the flashing, maybe use a very small interval (or no interval at all) when rendering a whole
// line.
// Wait for a short interval before refreshing again for the in-coming payload.
// We use a smaller interval (20ms) when rendering code blocks, so as to reduce the flashing when
// rewriting the whole line. Otherwise, we use the 50ms interval.
Thread.Sleep(redoWholeLine ? 20 : 50);
}

Expand Down

0 comments on commit 46e7fb5

Please sign in to comment.