diff --git a/static/src/App.vue b/static/src/App.vue
index c2b34ec..753acfa 100644
--- a/static/src/App.vue
+++ b/static/src/App.vue
@@ -111,8 +111,71 @@
:format-rate="formatRate"
/>
-
+
+
+
{{ titleTypingText || currentConversationTitle }}
+
+
+
+
+
模型
+
+
+
+
+
运行模式
+
+
+
+
o.value === this.resolvedRunMode);
+ return current ? current.label : '快速模式';
+ },
+ currentModelLabel() {
+ const modelStore = useModelStore();
+ return modelStore.currentModel?.label || 'Kimi-k2.5';
+ },
policyUiBlocks() {
const store = usePolicyStore();
return store.uiBlocks || {};
@@ -502,13 +519,14 @@ const appOptions = {
}
},
- beforeUnmount() {
- document.removeEventListener('click', this.handleClickOutsideQuickMenu);
- document.removeEventListener('click', this.handleClickOutsidePanelMenu);
- document.removeEventListener('click', this.handleClickOutsideMobileMenu);
- window.removeEventListener('popstate', this.handlePopState);
- window.removeEventListener('keydown', this.handleMobileOverlayEscape);
- this.teardownMobileViewportWatcher();
+ beforeUnmount() {
+ document.removeEventListener('click', this.handleClickOutsideQuickMenu);
+ document.removeEventListener('click', this.handleClickOutsidePanelMenu);
+ document.removeEventListener('click', this.handleClickOutsideHeaderMenu);
+ document.removeEventListener('click', this.handleClickOutsideMobileMenu);
+ window.removeEventListener('popstate', this.handlePopState);
+ window.removeEventListener('keydown', this.handleMobileOverlayEscape);
+ this.teardownMobileViewportWatcher();
this.subAgentStopPolling();
this.resourceStopContainerStatsPolling();
this.resourceStopProjectStoragePolling();
@@ -2780,6 +2798,16 @@ const appOptions = {
}
},
+ toggleHeaderMenu() {
+ if (!this.isConnected) return;
+ this.headerMenuOpen = !this.headerMenuOpen;
+ if (this.headerMenuOpen) {
+ this.closeQuickMenu();
+ this.inputCloseMenus();
+ }
+ },
+
+
async handleModeSelect(mode) {
if (!this.isConnected || this.streamingMessage) {
return;
@@ -2787,6 +2815,11 @@ const appOptions = {
await this.setRunMode(mode);
},
+ async handleHeaderRunModeSelect(mode) {
+ await this.handleModeSelect(mode);
+ this.closeHeaderMenu();
+ },
+
async handleModelSelect(key) {
if (!this.isConnected || this.streamingMessage) {
return;
@@ -2863,6 +2896,12 @@ const appOptions = {
}
},
+ async handleHeaderModelSelect(key, disabled) {
+ if (disabled) return;
+ await this.handleModelSelect(key);
+ this.closeHeaderMenu();
+ },
+
async handleCycleRunMode() {
const modes: Array<'fast' | 'thinking' | 'deep'> = ['fast', 'thinking', 'deep'];
const currentMode = this.resolvedRunMode;
@@ -3024,6 +3063,10 @@ const appOptions = {
this.closeQuickMenu();
},
+ closeHeaderMenu() {
+ this.headerMenuOpen = false;
+ },
+
handleReviewSelect(id) {
if (id === this.currentConversationId) {
this.uiPushToast({
@@ -3207,6 +3250,16 @@ const appOptions = {
}
this.closeQuickMenu();
},
+
+ handleClickOutsideHeaderMenu(event) {
+ if (!this.headerMenuOpen) return;
+ const ribbon = this.$refs.titleRibbon as HTMLElement | undefined;
+ const menu = this.$refs.headerMenu as HTMLElement | undefined;
+ if ((ribbon && ribbon.contains(event.target)) || (menu && menu.contains(event.target))) {
+ return;
+ }
+ this.closeHeaderMenu();
+ },
handleClickOutsidePanelMenu(event) {
if (!this.panelMenuOpen) {
diff --git a/static/src/components/input/QuickMenu.vue b/static/src/components/input/QuickMenu.vue
index 83b0ea5..dd10ea0 100644
--- a/static/src/components/input/QuickMenu.vue
+++ b/static/src/components/input/QuickMenu.vue
@@ -26,24 +26,6 @@
>
发送图片
-
-
-
-
-
-
-
-
-