fix: 右侧面板拖拽与终端滚动
- 修复仅打开终端面板时右侧无法左右拖动的问题 - 修复切换终端会话后未自动滚动到最新输出的问题
This commit is contained in:
parent
56882f3169
commit
09af37055a
@ -199,7 +199,9 @@ function renderSessionLog() {
|
||||
console.log('[TerminalPanel] renderSessionLog:', activeSession.value, 'len:', log.length, 'ready:', _historyReady.value[activeSession.value], 'hydrated:', sessionHydrated.value[activeSession.value]);
|
||||
term.clear();
|
||||
if (log) {
|
||||
term.write(log);
|
||||
term.write(log, () => {
|
||||
term?.scrollToBottom();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ interface ResizeContext {
|
||||
isResizing?: boolean;
|
||||
resizingPanel?: PanelKey | null;
|
||||
rightCollapsed?: boolean;
|
||||
terminalPanelOpen?: boolean;
|
||||
gitChangesPanelOpen?: boolean;
|
||||
rightWidth?: number;
|
||||
minPanelWidth?: number;
|
||||
@ -19,8 +20,8 @@ function clamp(value: number, min: number, max: number) {
|
||||
}
|
||||
|
||||
export function startResize(ctx: ResizeContext, panel: PanelKey, event: MouseEvent) {
|
||||
// 如果右侧面板(审批面板)已折叠,禁用拖拽边缘展开
|
||||
if (panel === 'right' && ctx.rightCollapsed && !ctx.gitChangesPanelOpen) {
|
||||
// 右侧面板(终端 / Git)只有在至少一个打开时才允许拖拽调整宽度
|
||||
if (panel === 'right' && !ctx.terminalPanelOpen && !ctx.gitChangesPanelOpen) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user