提交记录修改ui/src/views.jsx+2 −1看文件
| @@ -416,7 +416,7 @@ export function TerminalView({ session, visible, focused = true, onStatus, onCon | ||
| 416 | 416 | void enqueue(async () => { |
| 417 | 417 | const { value, error } = await ready; |
| 418 | 418 | if (error) throw error; |
| 419 | 删除: if (disposed || !visibleRef.current || !focusedRef.current) throw new Error("终端已切换或断开,请重新粘贴"); | |
| 419 | 新增: if (disposed || !visibleRef.current || !focusedRef.current || ws.readyState !== WebSocket.OPEN) throw new Error("终端已切换或断开,请重新粘贴"); | |
| 420 | 420 | let text = value.text || ""; |
| 421 | 421 | if (value.files || value.fileSelection) { |
| 422 | 422 | const result = await sendFiles(value, "terminal", session.id, { valid: () => !disposed && visibleRef.current && focusedRef.current && ws.readyState === WebSocket.OPEN }); |
| @@ -580,6 +580,7 @@ export function TerminalView({ session, visible, focused = true, onStatus, onCon | ||
| 580 | 580 | if (!instance.current) return; |
| 581 | 581 | instance.current.options.theme = terminalTheme(theme, variant); |
| 582 | 582 | instance.current.options.fontFamily = theme.fonts.code || systemCodeFont; |
| 583 | 新增: instance.current.options.fontSize = appearance.codeFontSize; | |
| 583 | 584 | if (visibleRef.current) fit.current?.fit(); |
| 584 | 585 | }, [theme, variant, appearance.codeFontSize]); |
| 585 | 586 | return ( |

