Apply min col on logs terminal for colab (#2260)

This commit is contained in:
Chenlei Hu
2025-01-15 17:16:33 -05:00
committed by GitHub
parent 84b652a281
commit ff445f5c95
2 changed files with 18 additions and 3 deletions

View File

@@ -29,7 +29,12 @@ const terminalCreated = (
{ terminal, useAutoSize }: ReturnType<typeof useTerminal>,
root: Ref<HTMLElement>
) => {
useAutoSize({ root, autoRows: true, autoCols: false })
// `autoCols` is false because we don't want the progress bar in the terminal
// to render incorrectly as the progress bar is rendered based on the
// server's terminal size.
// Apply a min cols of 80 for colab environments
// See https://github.com/comfyanonymous/ComfyUI/issues/6396
useAutoSize({ root, autoRows: true, autoCols: false, minCols: 80 })
const update = (entries: Array<LogEntry>, size?: TerminalSize) => {
if (size) {