Skip to content

armgit / pibot

Public Imported from GitHub
0

Open-source, local-first AI agent team for your desktop: multi-agent group chats, computer use, browser, MCP, routines and approvals. macOS, Windows, Linux + Android. Built on pi.

fix(changes): a group's own folder is named as the group's in the changes panel

leen.zhou18b3ffcc3a16
diff --git a/packages/workspaces-contract/src/i18n/changes.ts b/packages/workspaces-contract/src/i18n/changes.ts
index 6dea24e..b0bc25a 100644
--- a/packages/workspaces-contract/src/i18n/changes.ts
+++ b/packages/workspaces-contract/src/i18n/changes.ts
@@ -80,6 +80,7 @@ export const changesZh = {
"changes.scope.turn": "这一轮",
"changes.scope.history": "提交记录",
"changes.repo.ownFolder": "Bot 自己的目录",
+ "changes.repo.groupFolder": "群自己的目录",
"changes.repo.folder": "文件夹",
"changes.repo.readonlyOption": "{name}(只读)",
"changes.repo.worktreeOption": "{name}(工作区改动)",
@@ -494,6 +495,7 @@ export const changesEn: { [K in keyof typeof changesZh]: string } = {
"changes.scope.turn": "This turn",
"changes.scope.history": "History",
"changes.repo.ownFolder": "Bot’s own folder",
+ "changes.repo.groupFolder": "The group’s own folder",
"changes.repo.folder": "Folder",
"changes.repo.readonlyOption": "{name} (read-only)",
"changes.repo.worktreeOption": "{name} (workspace changes)",
diff --git a/packages/workspaces/src/ui/changes/PaneParts.tsx b/packages/workspaces/src/ui/changes/PaneParts.tsx
index 1d0d430..6b3eb09 100644
--- a/packages/workspaces/src/ui/changes/PaneParts.tsx
+++ b/packages/workspaces/src/ui/changes/PaneParts.tsx
@@ -35,7 +35,13 @@ export function RepoBar({
comboText = useComboboxText();
if (!status) return <div className={styles.repo} />;
const rootName = (root: ChangesStatus["root"]) =>
- root.id === "home" ? t("changes.repo.ownFolder") : root.name;
+ root.id === "home"
+ ? t(
+ target?.conversationKey.startsWith("group:")
+ ? "changes.repo.groupFolder"
+ : "changes.repo.ownFolder",
+ )
+ : root.name;
const git = status.git,
roots = status.roots.filter((root) => root.kind !== "worktree"),
primary = roots.find((root) => root.role === "primary"),