Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/web-escape-dialog-no-interrupt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

web: Don't interrupt the running prompt when Escape closes an open dialog (such as the session search popup).
5 changes: 5 additions & 0 deletions apps/kimi-web/src/components/chat/ConversationPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Spinner from '../ui/Spinner.vue';
import Tooltip from '../ui/Tooltip.vue';
import { getVisibleWorkspaces } from '../../lib/workspacePicker';
import { safeRemove, STORAGE_KEYS } from '../../lib/storage';
import { openDialogCount } from '../../composables/dialogStack';

const { t, locale } = useI18n();

Expand Down Expand Up @@ -1026,6 +1027,10 @@ function handleInterrupt(): void {
}

function onKeyDown(event: KeyboardEvent): void {
// A modal dialog open on top of the conversation owns Escape (it closes
// itself); don't also interrupt the running prompt underneath. Mirrors the
// `anyOverlayOpen` guard in App.vue's global capture-phase Escape handler (#1538).
Comment on lines +1030 to +1032
if (openDialogCount.value > 0) return;
if (event.key === 'Escape' && (props.running || props.sending)) {
event.preventDefault();
handleInterrupt();
Expand Down