@@ -19,7 +19,7 @@ import type { Ref } from 'vue'
1919import { onMounted , onUnmounted , ref } from ' vue'
2020
2121import type { useTerminal } from ' @/composables/bottomPanelTabs/useTerminal'
22- import type { LogEntry , LogsWsMessage , TerminalSize } from ' @/schemas/apiSchema'
22+ import type { LogEntry , LogsWsMessage } from ' @/schemas/apiSchema'
2323import { api } from ' @/scripts/api'
2424import { useExecutionStore } from ' @/stores/executionStore'
2525
@@ -32,27 +32,22 @@ const terminalCreated = (
3232 { terminal , useAutoSize }: ReturnType <typeof useTerminal >,
3333 root : Ref <HTMLElement | undefined >
3434) => {
35- // `autoCols` is false because we don't want the progress bar in the terminal
36- // to render incorrectly as the progress bar is rendered based on the
37- // server's terminal size.
38- // Apply a min cols of 80 for colab environments
35+ // Auto-size terminal to fill container width.
36+ // minCols: 80 ensures minimum width for colab environments.
3937 // See https://github.com/comfyanonymous/ComfyUI/issues/6396
40- useAutoSize ({ root , autoRows: true , autoCols: false , minCols: 80 })
38+ useAutoSize ({ root , autoRows: true , autoCols: true , minCols: 80 })
4139
42- const update = (entries : Array <LogEntry >, size ? : TerminalSize ) => {
43- if (size ) {
44- terminal .resize (size .cols , terminal .rows )
45- }
40+ const update = (entries : Array <LogEntry >) => {
4641 terminal .write (entries .map ((e ) => e .m ).join (' ' ))
4742 }
4843
4944 const logReceived = (e : CustomEvent <LogsWsMessage >) => {
50- update (e .detail .entries , e . detail . size )
45+ update (e .detail .entries )
5146 }
5247
5348 const loadLogEntries = async () => {
5449 const logs = await api .getRawLogs ()
55- update (logs .entries , logs . size )
50+ update (logs .entries )
5651 }
5752
5853 const watchLogs = async () => {
0 commit comments