@agimon-ai/po-git 0.0.0-alpha.93 → 0.0.0-alpha.95
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/native.mjs +9 -1
- package/dist/extensions/native.mjs.map +1 -1
- package/dist/extensions/server.cjs +11 -3
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.mjs +11 -3
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +22 -5
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{worktreeOperations-CD7s0YnO.cjs → worktreeOperations-0Jrjcbg7.cjs} +2 -1
- package/dist/worktreeOperations-0Jrjcbg7.cjs.map +1 -0
- package/dist/{worktreeOperations-B3E4JY4H.mjs → worktreeOperations-DA_dbDv8.mjs} +2 -1
- package/dist/worktreeOperations-DA_dbDv8.mjs.map +1 -0
- package/package.json +8 -8
- package/dist/worktreeOperations-B3E4JY4H.mjs.map +0 -1
- package/dist/worktreeOperations-CD7s0YnO.cjs.map +0 -1
package/dist/extensions/web.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createApiClient, defineActivityGroup, defineChannelFile, defineFill, defineGlobalStore, 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, 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 } 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, 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";
|
|
@@ -105,10 +105,18 @@ function formProblem$1(state) {
|
|
|
105
105
|
}
|
|
106
106
|
if (state.mode === "new" && state.newBranch.trim() === "") return "Name the new branch.";
|
|
107
107
|
}
|
|
108
|
+
/** The launch profile choice for any session kind, or undefined when none was made. */
|
|
109
|
+
function launchSelection(state) {
|
|
110
|
+
return state.profile === void 0 ? void 0 : { profile: state.profile };
|
|
111
|
+
}
|
|
108
112
|
/** The worktree create request for the form, or undefined in plain mode. */
|
|
109
113
|
function createRequest(state) {
|
|
110
114
|
const name = state.name.trim();
|
|
111
|
-
const
|
|
115
|
+
const chosen = launchSelection(state);
|
|
116
|
+
const named = {
|
|
117
|
+
...name === "" ? {} : { name },
|
|
118
|
+
...chosen === void 0 ? {} : { selection: chosen }
|
|
119
|
+
};
|
|
112
120
|
if (state.mode === "existing" && state.selected !== void 0) return {
|
|
113
121
|
mode: "existing-branch",
|
|
114
122
|
branch: state.selected.name,
|
|
@@ -134,7 +142,7 @@ function Field$1({ label, children }) {
|
|
|
134
142
|
});
|
|
135
143
|
}
|
|
136
144
|
/** Inline presentation also lets story capture inspect content, rather than a portal-only root. */
|
|
137
|
-
function GitNewSessionDialogView({ workspaceRoot, branches, loadError = "", initialForm, busy = false, error = "", riftMissing = false, onClose, onCreate, onDeleteBranch, onOpenBranchFolder }) {
|
|
145
|
+
function GitNewSessionDialogView({ workspaceRoot, branches, loadError = "", initialForm, busy = false, error = "", riftMissing = false, profileCatalog, onClose, onCreate, onDeleteBranch, onOpenBranchFolder }) {
|
|
138
146
|
const [form, setForm] = useState({
|
|
139
147
|
mode: "existing",
|
|
140
148
|
newBranch: "",
|
|
@@ -393,6 +401,13 @@ function GitNewSessionDialogView({ workspaceRoot, branches, loadError = "", init
|
|
|
393
401
|
disabled: busy
|
|
394
402
|
})
|
|
395
403
|
}),
|
|
404
|
+
profileCatalog === void 0 ? null : /* @__PURE__ */ jsx(ProfilePicker, {
|
|
405
|
+
profiles: profileCatalog.profiles,
|
|
406
|
+
status: profileCatalog.status,
|
|
407
|
+
value: form.profile,
|
|
408
|
+
onChange: (profile) => update({ profile }),
|
|
409
|
+
disabled: busy
|
|
410
|
+
}),
|
|
396
411
|
mode !== "plain" ? /* @__PURE__ */ jsx("p", {
|
|
397
412
|
className: "text-sm leading-relaxed text-po-dim",
|
|
398
413
|
children: "Runs in its own worktree, so this checkout stays as it is."
|
|
@@ -450,6 +465,7 @@ function GitNewSessionDialog({ newSession }) {
|
|
|
450
465
|
const [busy, setBusy] = useState(false);
|
|
451
466
|
const workspaceId = newSession?.workspaceId;
|
|
452
467
|
const request = useEffectEvent((input) => newSession?.requestWithStepUp(input));
|
|
468
|
+
const profileCatalog = useProfileCatalog(workspaceId ?? "", newSession?.loadProfiles);
|
|
453
469
|
useEffect(() => {
|
|
454
470
|
if (workspaceId === void 0) return;
|
|
455
471
|
let stale = false;
|
|
@@ -478,7 +494,7 @@ function GitNewSessionDialog({ newSession }) {
|
|
|
478
494
|
const body = createRequest(state);
|
|
479
495
|
let failure;
|
|
480
496
|
try {
|
|
481
|
-
if (body === void 0) failure = await newSession.createPlain(state.name);
|
|
497
|
+
if (body === void 0) failure = await newSession.createPlain(state.name, launchSelection(state));
|
|
482
498
|
else {
|
|
483
499
|
const response = await newSession.requestWithStepUp(api.workspace(newSession.workspaceId).createSession.url(), {
|
|
484
500
|
method: "POST",
|
|
@@ -544,11 +560,12 @@ function GitNewSessionDialog({ newSession }) {
|
|
|
544
560
|
busy,
|
|
545
561
|
error,
|
|
546
562
|
riftMissing,
|
|
563
|
+
profileCatalog,
|
|
547
564
|
onClose: newSession.close,
|
|
548
565
|
onCreate: (state) => void submit(state),
|
|
549
566
|
onDeleteBranch: (branch) => branchAction(branch, "delete"),
|
|
550
567
|
onOpenBranchFolder: (branch) => void branchAction(branch, "open")
|
|
551
|
-
})]
|
|
568
|
+
}, newSession.workspaceId)]
|
|
552
569
|
})
|
|
553
570
|
});
|
|
554
571
|
}
|