diff --git a/.changeset/web-drop-workspace-git-badges.md b/.changeset/web-drop-workspace-git-badges.md new file mode 100644 index 0000000000..49c42059d6 --- /dev/null +++ b/.changeset/web-drop-workspace-git-badges.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Remove per-workspace git repo badges and branch labels; branch, PR, and diff status remain shown for the active session. diff --git a/apps/kimi-web/src/api/daemon/client.ts b/apps/kimi-web/src/api/daemon/client.ts index 82763717f6..d8b1833edf 100644 --- a/apps/kimi-web/src/api/daemon/client.ts +++ b/apps/kimi-web/src/api/daemon/client.ts @@ -1175,8 +1175,6 @@ export class DaemonKimiWebApi implements KimiWebApi { name: e.name, path: e.path, isDir: e.is_dir, - isGitRepo: e.is_git_repo, - branch: e.branch, })), }; } catch { diff --git a/apps/kimi-web/src/api/daemon/mappers.ts b/apps/kimi-web/src/api/daemon/mappers.ts index 761b84bda2..5eeda29e08 100644 --- a/apps/kimi-web/src/api/daemon/mappers.ts +++ b/apps/kimi-web/src/api/daemon/mappers.ts @@ -117,8 +117,6 @@ export function toAppWorkspace(wire: WireWorkspace): AppWorkspace { id: wire.id, root: wire.root, name: wire.name, - isGitRepo: wire.is_git_repo, - branch: wire.branch ?? undefined, lastOpenedAt: wire.last_opened_at, sessionCount: wire.session_count, }; diff --git a/apps/kimi-web/src/api/daemon/wire.ts b/apps/kimi-web/src/api/daemon/wire.ts index b86faa6990..900d98bcf0 100644 --- a/apps/kimi-web/src/api/daemon/wire.ts +++ b/apps/kimi-web/src/api/daemon/wire.ts @@ -158,8 +158,6 @@ export interface WireWorkspace { id: string; root: string; name: string; - is_git_repo: boolean; - branch: string | null; last_opened_at?: string; session_count: number; } @@ -168,8 +166,6 @@ export interface WireFsBrowseEntry { name: string; path: string; is_dir: boolean; - is_git_repo: boolean; - branch?: string; } export interface WireFsBrowseResult { diff --git a/apps/kimi-web/src/api/types.ts b/apps/kimi-web/src/api/types.ts index ec33825894..3f82db6a4b 100644 --- a/apps/kimi-web/src/api/types.ts +++ b/apps/kimi-web/src/api/types.ts @@ -120,10 +120,6 @@ export interface AppWorkspace { root: string; /** Display name — defaults to basename(root), may be renamed on the daemon. */ name: string; - /** Whether root is inside a git repository. */ - isGitRepo: boolean; - /** Current branch, when known. */ - branch?: string; /** ISO timestamp of when this workspace was last opened. */ lastOpenedAt?: string; /** Number of sessions belonging to this workspace. */ @@ -135,8 +131,6 @@ export interface FsBrowseEntry { name: string; path: string; isDir: boolean; - isGitRepo: boolean; - branch?: string; } export interface FsBrowseResult { diff --git a/apps/kimi-web/src/components/dialogs/AddWorkspaceDialog.vue b/apps/kimi-web/src/components/dialogs/AddWorkspaceDialog.vue index 3144b59827..26aeafec2b 100644 --- a/apps/kimi-web/src/components/dialogs/AddWorkspaceDialog.vue +++ b/apps/kimi-web/src/components/dialogs/AddWorkspaceDialog.vue @@ -22,7 +22,6 @@ import Dialog from '../ui/Dialog.vue'; import Button from '../ui/Button.vue'; import IconButton from '../ui/IconButton.vue'; import Spinner from '../ui/Spinner.vue'; -import Badge from '../ui/Badge.vue'; import Icon from '../ui/Icon.vue'; import Tooltip from '../ui/Tooltip.vue'; @@ -62,7 +61,7 @@ const entries = ref([]); // dialog never resizes while searching. const filter = ref(''); const searching = ref(false); -interface SearchHit { path: string; name: string; rel: string; isGitRepo?: boolean; branch?: string } +interface SearchHit { path: string; name: string; rel: string } const searchResults = ref([]); const isSearching = computed(() => filter.value.trim().length > 0); let searchToken = 0; @@ -137,7 +136,7 @@ async function runSearch(query: string): Promise { if (!e.isDir) continue; const rel = e.path.startsWith(root) ? e.path.slice(root.length).replace(/^\/+/, '') : e.path; if (fuzzyMatch(q, rel || e.name)) { - hits.push({ path: e.path, name: e.name, rel: rel || e.name, isGitRepo: e.isGitRepo, branch: e.branch }); + hits.push({ path: e.path, name: e.name, rel: rel || e.name }); if (hits.length >= SEARCH_MAX_RESULTS) break; } if (node.depth + 1 < SEARCH_MAX_DEPTH) queue.push({ path: e.path, depth: node.depth + 1 }); @@ -419,9 +418,6 @@ onUnmounted(() => { > {{ c.name }} - - {{ t('workspace.gitTag') }} {{ c.branch }} -
{{ t('workspace.noPathMatch', { parent: pathParent }) }} @@ -442,9 +438,6 @@ onUnmounted(() => { > {{ hit.rel }} - - {{ t('workspace.gitTag') }} {{ hit.branch }} -
{{ t('workspace.noFilterMatch', { q: filter.trim() }) }}
{{ t('workspace.searching') }}
@@ -460,9 +453,6 @@ onUnmounted(() => { > {{ entry.name }} - - {{ t('workspace.gitTag') }} {{ entry.branch }} -
{{ t('workspace.noSubfolders') }}
@@ -603,7 +593,6 @@ onUnmounted(() => { white-space: nowrap; color: var(--color-text); } -.git-branch { color: var(--color-text-muted); } /* Degraded mode (daemon can't browse): compact hint under the input box. */ .degraded-hint { diff --git a/apps/kimi-web/src/components/mobile/MobileSwitcherSheet.vue b/apps/kimi-web/src/components/mobile/MobileSwitcherSheet.vue index 621d530318..1de3de4266 100644 --- a/apps/kimi-web/src/components/mobile/MobileSwitcherSheet.vue +++ b/apps/kimi-web/src/components/mobile/MobileSwitcherSheet.vue @@ -1,7 +1,7 @@