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/add-session-list-exclude-empty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

Add an optional exclude_empty parameter to the session list API to omit sessions that have no messages.
5 changes: 5 additions & 0 deletions .changeset/web-hide-empty-sessions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

Hide unused "New Session" entries from the web session list by default.
5 changes: 5 additions & 0 deletions .changeset/web-remove-sessions-command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not mark a removed slash command as patch

Line 5 says the web /sessions slash command is removed, but this changeset bumps @moonshot-ai/kimi-code as patch. The repo-level AGENTS.md classifies renamed or removed commands/arguments as major criteria requiring explicit confirmation before writing a major changeset; releasing this as a patch mislabels a breaking UI command removal. Please restore the command or handle the changeset as a confirmed breaking change.

Useful? React with 👍 / 👎.

---

Remove the /sessions slash command from the web UI; the sidebar already covers session browsing.
17 changes: 0 additions & 17 deletions apps/kimi-web/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ 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 SessionsDialog from './components/dialogs/SessionsDialog.vue';
import AddWorkspaceDialog from './components/dialogs/AddWorkspaceDialog.vue';
import StatusPanel from './components/chat/StatusPanel.vue';
import WarningToasts from './components/WarningToasts.vue';
Expand Down Expand Up @@ -229,7 +228,6 @@ const showModelPicker = ref(false);
const showProviders = ref(false);
const showLogin = ref(false);
const showNewSession = ref(false);
const showSessions = ref(false);
const showAddWorkspace = ref(false);
const showStatusPanel = ref(false);
const showSettings = ref(false);
Expand All @@ -249,7 +247,6 @@ const anyOverlayOpen = computed<boolean>(() =>
showProviders.value ||
showLogin.value ||
showNewSession.value ||
showSessions.value ||
showAddWorkspace.value ||
showStatusPanel.value ||
showSettings.value ||
Expand Down Expand Up @@ -400,9 +397,6 @@ function handleCommand(cmd: string): void {
case '/clear':
handleCreateSession();
break;
case '/sessions':
showSessions.value = true;
break;
case '/fork':
void client.forkSession();
break;
Expand Down Expand Up @@ -868,17 +862,6 @@ function openPr(url: string): void {
@close="showNewSession = false"
/>

<!-- Sessions browser overlay (/sessions) — client-side list, click to switch -->
<SessionsDialog
v-if="showSessions"
:sessions="client.sessions.value"
:workspace-groups="client.workspaceGroups.value"
:attention-by-session="client.attentionBySession.value"
:active-id="client.activeSessionId.value"
@select="(id) => { void client.selectSession(id); showSessions = false; }"
@close="showSessions = false"
/>

<!-- Status panel overlay (/status) — renders current client state, no daemon call -->
<StatusPanel
v-if="showStatusPanel"
Expand Down
8 changes: 7 additions & 1 deletion apps/kimi-web/src/api/daemon/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,20 @@ export class DaemonKimiWebApi implements KimiWebApi {
// -------------------------------------------------------------------------

async listSessions(
input?: PageRequest & { status?: AppSessionStatus; workspaceId?: string; includeArchive?: boolean },
input?: PageRequest & {
status?: AppSessionStatus;
workspaceId?: string;
includeArchive?: boolean;
excludeEmpty?: boolean;
},
): Promise<Page<AppSession>> {
const query: Record<string, string | number | boolean | undefined> = {
before_id: input?.beforeId,
after_id: input?.afterId,
page_size: input?.pageSize,
status: input?.status ? toWireSessionStatus(input.status) : undefined,
include_archive: input?.includeArchive,
exclude_empty: input?.excludeEmpty,
// PRESUMED — daemon supports ?workspace_id= once the registry ships; it
// ignores unknown query params until then, so this is safe to always send.
workspace_id: input?.workspaceId,
Expand Down
2 changes: 1 addition & 1 deletion apps/kimi-web/src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ export interface AppSessionWarning {
export interface KimiWebApi {
getHealth(): Promise<{ status: 'ok'; uptimeSec: number }>;
getMeta(): Promise<{ serverVersion: string; serverId: string; startedAt: string; capabilities: Record<string, boolean>; openInApps: string[] }>;
listSessions(input?: PageRequest & { status?: AppSessionStatus; workspaceId?: string; includeArchive?: boolean }): Promise<Page<AppSession>>;
listSessions(input?: PageRequest & { status?: AppSessionStatus; workspaceId?: string; includeArchive?: boolean; excludeEmpty?: boolean }): Promise<Page<AppSession>>;
createSession(input: { title?: string; cwd?: string; model?: string; workspaceId?: string }): Promise<AppSession>;
/** Fetch one session by id (deep links beyond the first listSessions page). */
getSession(sessionId: string): Promise<AppSession>;
Expand Down
Loading
Loading