Skip to content
Merged
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-delayed-new-session.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

In the bundled web UI, a new session is now created only when the first message is sent, so + New without a workspace opens the composer instead of making an empty session.
19 changes: 4 additions & 15 deletions apps/kimi-web/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import DiffView from './components/chat/DiffView.vue';
import ModelPicker from './components/settings/ModelPicker.vue';
import ProviderManager from './components/settings/ProviderManager.vue';
import LoginDialog from './components/dialogs/LoginDialog.vue';
import NewSessionDialog from './components/dialogs/NewSessionDialog.vue';
import SettingsDialog from './components/settings/SettingsDialog.vue';
import AddWorkspaceDialog from './components/dialogs/AddWorkspaceDialog.vue';
import StatusPanel from './components/chat/StatusPanel.vue';
Expand Down Expand Up @@ -227,7 +226,6 @@ function handleSelectWorkspaces(ids: string[]): void {
const showModelPicker = ref(false);
const showProviders = ref(false);
const showLogin = ref(false);
const showNewSession = ref(false);
const showAddWorkspace = ref(false);
const showStatusPanel = ref(false);
const showSettings = ref(false);
Expand All @@ -246,7 +244,6 @@ const anyOverlayOpen = computed<boolean>(() =>
showModelPicker.value ||
showProviders.value ||
showLogin.value ||
showNewSession.value ||
showAddWorkspace.value ||
showStatusPanel.value ||
showSettings.value ||
Expand Down Expand Up @@ -391,8 +388,8 @@ function handleCommand(cmd: string): void {
return;
}
switch (cmd) {
// `/new` and `/clear` are aliases: both open the onboarding composer (or
// the new-session dialog when no workspace is active).
// `/new` and `/clear` are aliases: both open the onboarding composer. The
// session is only created when the user sends the first message.
case '/new':
case '/clear':
handleCreateSession();
Expand Down Expand Up @@ -505,10 +502,10 @@ function handleCreateSession(): void {
const wsId = client.activeWorkspaceId.value;
if (wsId) {
client.openWorkspaceDraft(wsId);
focusComposerAfterDraft();
} else {
showNewSession.value = true;
client.clearActiveSession();
}
focusComposerAfterDraft();
}

// Workspace-level "+ New" (sidebar group or mobile switcher): enter the draft
Expand Down Expand Up @@ -854,14 +851,6 @@ function openPr(url: string): void {
@close="showProviders = false"
/>

<!-- New Session Dialog overlay (fallback cwd-typing path) -->
<NewSessionDialog
v-if="showNewSession"
:recent-cwds="client.recentCwds.value"
@create="({ cwd, title }) => { showNewSession = false; void client.createSession(cwd, { title }); }"
@close="showNewSession = false"
/>

<!-- Status panel overlay (/status) — renders current client state, no daemon call -->
<StatusPanel
v-if="showStatusPanel"
Expand Down
Loading
Loading