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-steer-capslock-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

web: Fix Ctrl+S steering not triggering when CapsLock is on.
5 changes: 5 additions & 0 deletions .changeset/web-steer-queued-messages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

web: Add "Steer now" buttons to the queued-message list to inject queued messages into the running turn — one message at a time or the whole queue from the queue header. Click the bolt button next to a queued message to steer it.
5 changes: 5 additions & 0 deletions .changeset/web-steer-telemetry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

web: Count steered messages sent from the web UI in usage telemetry, the same way steers from the TUI are counted.
1 change: 1 addition & 0 deletions apps/kimi-web/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@ function openPr(url: string): void {
@interrupt="client.abortCurrentPrompt()"
@unqueue="handleUnqueue"
@edit-queued="handleEditQueued"
@steer-queued="client.steerQueuedPrompt($event)"
@reorder-queue="handleReorderQueue"
@set-permission="client.setPermission($event)"
@set-thinking="client.setThinking($event)"
Expand Down
26 changes: 26 additions & 0 deletions apps/kimi-web/src/components/chat/ChatPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import AttachmentChip from './AttachmentChip.vue';
import MoonSpinner from '../ui/MoonSpinner.vue';
import Spinner from '../ui/Spinner.vue';
import Icon from '../ui/Icon.vue';
import Button from '../ui/Button.vue';
import Tooltip from '../ui/Tooltip.vue';
import { useConfirmDialog } from '../../composables/useConfirmDialog';
import { copyTextToClipboard } from '../../lib/clipboard';
Expand Down Expand Up @@ -213,6 +214,11 @@ const emit = defineEmits<{
unqueue: [index: number];
/** Load a queued message back into the composer for editing (and dequeue it). */
editQueued: [index: number];
/** Steer the whole queue into the running turn now (like Ctrl+S, but the
* live composer draft stays behind). */
steerQueue: [];
/** Steer one queued message (by index) into the running turn now. */
steerQueued: [index: number];
/** Drag-to-reorder a queued message within the active session's queue. */
reorderQueue: [payload: { from: number; to: number }];
}>();
Expand Down Expand Up @@ -689,6 +695,16 @@ function isStreamingRenderBlock(turn: ChatTurn, block: { sourceIndex: number }):
{{ t('composer.queueLabel') }} · <b>{{ queued.length }}</b>
</span>
<span class="q-hint">{{ t('composer.queueAutoDrain') }}</span>
<Button
variant="ghost"
size="sm"
:title="t('composer.queueSteerTitle')"
:aria-label="t('composer.queueSteerTitle')"
@click.stop="emit('steerQueue')"
>
<Icon name="bolt" size="sm" />
{{ t('composer.queueSteerNow') }}
</Button>
</div>
<div
v-for="(item, qi) in queued"
Expand Down Expand Up @@ -743,6 +759,16 @@ function isStreamingRenderBlock(turn: ChatTurn, block: { sourceIndex: number }):
</div>
<span v-if="qi === 0" class="q-tag q-tag-next">{{ t('composer.queueNext') }}</span>
<span v-else class="q-tag q-tag-idx">#{{ qi + 1 }}</span>
<Button
variant="ghost"
size="sm"
:title="t('composer.queueSteerOneTitle')"
:aria-label="t('composer.queueSteerOneTitle')"
@click.stop="emit('steerQueued', qi)"
>
<Icon name="bolt" size="sm" />
{{ t('composer.queueSteerNow') }}
</Button>
<button
type="button"
class="q-rm"
Expand Down
5 changes: 3 additions & 2 deletions apps/kimi-web/src/components/chat/Composer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,9 @@ function handleKeydown(e: KeyboardEvent): void {
}
}

// Ctrl+S / Cmd+S — steer into the running turn (TUI parity)
if (e.key === 's' && (e.ctrlKey || e.metaKey) && !e.shiftKey && !e.altKey) {
// Ctrl+S / Cmd+S — steer into the running turn (TUI parity). toLowerCase so
// CapsLock (key: 'S') doesn't defeat the match, same as the sidebar's Ctrl+K.
if (e.key.toLowerCase() === 's' && (e.ctrlKey || e.metaKey) && !e.shiftKey && !e.altKey) {
if (props.running) {
e.preventDefault();
handleSteer();
Expand Down
3 changes: 3 additions & 0 deletions apps/kimi-web/src/components/chat/ConversationPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const emit = defineEmits<{
interrupt: [];
unqueue: [index: number];
editQueued: [index: number];
steerQueued: [index: number];
reorderQueue: [payload: { from: number; to: number }];
setPermission: [mode: PermissionMode];
setThinking: [level: ThinkingLevel];
Expand Down Expand Up @@ -1436,6 +1437,8 @@ defineExpose({ loadComposerForEdit, focusComposer });
@unqueue="emit('unqueue', $event)"
@edit-queued="handleEditQueued"
@reorder-queue="handleReorderQueue"
@steer-queue="emit('steer', { text: '', attachments: [] })"
@steer-queued="emit('steerQueued', $event)"
/>
</template>
</div>
Expand Down
Loading