fix: keep quick menu open while interacting

This commit is contained in:
JOJO 2025-11-22 13:17:05 +08:00
parent e25384d342
commit 57f218d57c
2 changed files with 33 additions and 4 deletions

View File

@ -2581,12 +2581,41 @@ async function bootstrapApp() {
handleInputFocus() {
this.inputIsFocused = true;
this.closeQuickMenu();
},
handleInputBlur() {
this.inputIsFocused = false;
},
handleRealtimeTerminalClick() {
if (!this.isConnected) {
return;
}
this.openRealtimeTerminal();
},
handleFocusPanelToggleClick() {
if (!this.isConnected) {
return;
}
this.toggleFocusPanel();
},
handleTokenPanelToggleClick() {
if (!this.currentConversationId) {
return;
}
this.toggleTokenPanel();
},
handleCompressConversationClick() {
if (this.compressing || this.streamingMessage || !this.isConnected) {
return;
}
this.compressConversation();
},
autoResizeInput() {
this.$nextTick(() => {
const textarea = this.$refs.stadiumInput;

View File

@ -746,25 +746,25 @@
<div class="submenu-list">
<button type="button"
class="menu-entry submenu-entry"
@click="openRealtimeTerminal"
@click="handleRealtimeTerminalClick"
:disabled="!isConnected">
实时终端
</button>
<button type="button"
class="menu-entry submenu-entry"
@click="toggleFocusPanel"
@click="handleFocusPanelToggleClick"
:disabled="!isConnected">
聚焦面板
</button>
<button type="button"
class="menu-entry submenu-entry"
@click="toggleTokenPanel"
@click="handleTokenPanelToggleClick"
:disabled="!currentConversationId">
用量统计
</button>
<button type="button"
class="menu-entry submenu-entry"
@click="compressConversation"
@click="handleCompressConversationClick"
:disabled="compressing || streamingMessage || !isConnected">
{{ compressing ? '压缩中...' : '压缩对话' }}
</button>