MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / reorderWorkspaces

Function reorderWorkspaces

apps/kimi-web/src/composables/useKimiWebClient.ts:2106–2115  ·  view source on GitHub ↗

* Replace the workspace display order (e.g. after a drag reorder in the * sidebar) and persist it. The id set is unchanged, so the reconciliation * watcher above will not fire — only the sort in `workspacesView` reacts.

(ids: string[])

Source from the content-addressed store, hash-verified

2104 * watcher above will not fire — only the sort in `workspacesView` reacts.
2105 */
2106function reorderWorkspaces(ids: string[]): void {
2107 workspaceOrder.value = ids;
2108 saveWorkspaceOrder(ids);
2109 // A drag is an explicit manual ordering, so drop out of `recent` mode — the
2110 // dragged order would otherwise be overwritten by the live recency sort.
2111 if (workspaceSortMode.value !== 'manual') {
2112 workspaceSortMode.value = 'manual';
2113 saveWorkspaceSort('manual');
2114 }
2115}
2116
2117/** Switch the sidebar workspace sort mode and persist the choice. */
2118function setWorkspaceSortMode(mode: WorkspaceSortMode): void {

Callers

nothing calls this directly

Calls 2

saveWorkspaceOrderFunction · 0.90
saveWorkspaceSortFunction · 0.90

Tested by

no test coverage detected