@agimon-ai/po-git 0.0.0-alpha.192 → 0.0.0-alpha.194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/extensions/web.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createApiClient, defineActivityGroup, defineChannelFile, defineFill, defineHostStore, defineLeaderBinding, defineRepositorySettingsPanel, defineSessionStore, defineToolRenderer, defineWebLifecycle, defineWebPlugin, sessionApiAddress } from "@agimon-ai/po-core/web";
|
|
2
|
-
import { ArrowRightIcon, BranchIcon, Button, CheckIcon, ChevronDownIcon, ChevronUpIcon, CodeBlock, Dialog, DialogContent, DialogTitle, DiffView, Dot, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, FolderIcon, Input, KebabIcon, MessageIcon, MessageItem, MessageItemBody, ProfilePicker, ReviewCommentDraft, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, SettingsActions, SettingsCard, SettingsNote, SettingsRow, SettingsRowDescription, SettingsRowText, SettingsRowTitle, SettingsSection, SettingsSectionDescription, SettingsSectionHeader, SettingsSectionTitle, ShieldIcon, Spinner, StatusBadge, Tabs, TabsContent, TabsList, TabsTrigger, TrashIcon, buildReviewPrompt, useProfileCatalog } from "@agimon-ai/po-web-components";
|
|
2
|
+
import { ArrowRightIcon, BranchIcon, Button, CheckIcon, ChevronDownIcon, ChevronUpIcon, CodeBlock, Dialog, DialogContent, DialogTitle, DiffView, Dot, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, FolderIcon, Input, KebabIcon, MessageIcon, MessageItem, MessageItemBody, ProfilePicker, ReviewCommentDraft, SearchIcon, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, SettingsActions, SettingsCard, SettingsNote, SettingsRow, SettingsRowDescription, SettingsRowText, SettingsRowTitle, SettingsSection, SettingsSectionDescription, SettingsSectionHeader, SettingsSectionTitle, ShieldIcon, Spinner, StatusBadge, Tabs, TabsContent, TabsList, TabsTrigger, TrashIcon, buildReviewPrompt, useProfileCatalog } from "@agimon-ai/po-web-components";
|
|
3
3
|
import { createElement, useCallback, useEffect, useEffectEvent, useId, useRef, useState } from "react";
|
|
4
4
|
import { browserTransport } from "@agimon-ai/po-web-security/browser";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1366,6 +1366,7 @@ function WorktreesPanel(props) {
|
|
|
1366
1366
|
}
|
|
1367
1367
|
function WorktreesPanelView({ worktrees, pending, error, closeErrorId, onNew, onClose, form, startingIds = [], startingBranch }) {
|
|
1368
1368
|
const groups = [worktrees.filter((w) => !w.orphaned && !w.unowned), worktrees.filter((w) => w.orphaned || w.unowned)];
|
|
1369
|
+
const empty = worktrees.length === 0 && !startingBranch;
|
|
1369
1370
|
return /* @__PURE__ */ jsxs("div", {
|
|
1370
1371
|
"data-testid": "git-worktrees-panel",
|
|
1371
1372
|
className: "rounded-lg border border-po-border-soft bg-po-panel p-5",
|
|
@@ -1382,7 +1383,7 @@ function WorktreesPanelView({ worktrees, pending, error, closeErrorId, onNew, on
|
|
|
1382
1383
|
className: "sr-only",
|
|
1383
1384
|
children: worktrees.length === 0 ? "none yet" : `${worktrees.length} open`
|
|
1384
1385
|
}),
|
|
1385
|
-
/* @__PURE__ */ jsx(Button, {
|
|
1386
|
+
!empty && /* @__PURE__ */ jsx(Button, {
|
|
1386
1387
|
variant: "outline",
|
|
1387
1388
|
size: "sm",
|
|
1388
1389
|
onClick: onNew,
|
|
@@ -1408,11 +1409,17 @@ function WorktreesPanelView({ worktrees, pending, error, closeErrorId, onNew, on
|
|
|
1408
1409
|
className: "text-sm text-po-red",
|
|
1409
1410
|
children: error
|
|
1410
1411
|
}),
|
|
1411
|
-
|
|
1412
|
+
empty ? /* @__PURE__ */ jsx(EmptyState, {
|
|
1412
1413
|
"data-testid": "git-worktrees-empty",
|
|
1414
|
+
surface: "plain",
|
|
1413
1415
|
className: "py-10",
|
|
1416
|
+
icon: /* @__PURE__ */ jsx(BranchIcon, {}),
|
|
1414
1417
|
title: "No worktrees yet",
|
|
1415
|
-
description: "A worktree gives a branch its own checkout and a session nested under this one."
|
|
1418
|
+
description: "A worktree gives a branch its own checkout and a session nested under this one.",
|
|
1419
|
+
action: onNew && !form ? {
|
|
1420
|
+
label: "New worktree",
|
|
1421
|
+
onAction: onNew
|
|
1422
|
+
} : void 0
|
|
1416
1423
|
}) : /* @__PURE__ */ jsx("div", {
|
|
1417
1424
|
"data-testid": "git-worktrees-list",
|
|
1418
1425
|
children: groups.map((group, i) => (group.length > 0 || i === 0 && startingBranch) && /* @__PURE__ */ jsxs("section", { children: [
|
|
@@ -1694,8 +1701,7 @@ var git_web_default = defineActivityGroup({
|
|
|
1694
1701
|
}
|
|
1695
1702
|
},
|
|
1696
1703
|
marksBackgroundWork: false,
|
|
1697
|
-
transientTab: worktreesTab
|
|
1698
|
-
order: 30
|
|
1704
|
+
transientTab: worktreesTab
|
|
1699
1705
|
});
|
|
1700
1706
|
//#endregion
|
|
1701
1707
|
//#region src/extensions/workspaces/sessions/(frontend)/channel/gitChanges.web.ts
|
|
@@ -1967,9 +1973,17 @@ function GitReviewBrowser({ files, activePath, commentCounts, onPick }) {
|
|
|
1967
1973
|
})
|
|
1968
1974
|
]
|
|
1969
1975
|
}, f.path);
|
|
1970
|
-
}), shown.length === 0 && /* @__PURE__ */ jsx(
|
|
1971
|
-
|
|
1972
|
-
|
|
1976
|
+
}), shown.length === 0 && /* @__PURE__ */ jsx(EmptyState, {
|
|
1977
|
+
"data-testid": "git-review-browser-no-match",
|
|
1978
|
+
size: "compact",
|
|
1979
|
+
surface: "plain",
|
|
1980
|
+
icon: /* @__PURE__ */ jsx(SearchIcon, {}),
|
|
1981
|
+
title: "No paths match",
|
|
1982
|
+
description: query.trim() ? `No changed file path contains "${query.trim()}".` : void 0,
|
|
1983
|
+
secondaryAction: {
|
|
1984
|
+
label: "Clear filter",
|
|
1985
|
+
onAction: () => setQuery("")
|
|
1986
|
+
}
|
|
1973
1987
|
})]
|
|
1974
1988
|
})]
|
|
1975
1989
|
});
|