@qredence/fleet 0.6.6 → 0.7.0
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/CHANGELOG.md +6 -0
- package/dist/web/client/assets/{action-swap-roll-Dbquwd1Y.js → action-swap-roll-BfVrBOVd.js} +1 -1
- package/dist/web/client/assets/{alert-dialog-C6Dkg1x6.js → alert-dialog-FCppNafx.js} +1 -1
- package/dist/web/client/assets/{artifacts-panel-8a_tn7Yb.js → artifacts-panel-Qd6JlHzz.js} +1 -1
- package/dist/web/client/assets/button-BJyg7l5W.js +1 -0
- package/dist/web/client/assets/{chat-command-palette-DhidLnw7.js → chat-command-palette-CPlJp2cO.js} +1 -1
- package/dist/web/client/assets/{citations-BYiDBo21.js → citations-BhyqbxcZ.js} +1 -1
- package/dist/web/client/assets/{command-Cre9BsOI.js → command-Bo31U-UD.js} +1 -1
- package/dist/web/client/assets/create-project-dialog-SDyXTpl-.js +1 -0
- package/dist/web/client/assets/{dialog-0KDCsqw0.js → dialog-DLIPvl1s.js} +1 -1
- package/dist/web/client/assets/ease-DKi-MOH5.js +1 -0
- package/dist/web/client/assets/{fork-picker-dialog-BPSqUjKu.js → fork-picker-dialog-BDleMADF.js} +1 -1
- package/dist/web/client/assets/globals-DZbMyHfg.css +2 -0
- package/dist/web/client/assets/index-D3HpiAnD.js +12 -0
- package/dist/web/client/assets/input-Ce8yLnXY.js +1 -0
- package/dist/web/client/assets/{input-group-Fky3fte_.js → input-group-BZLQiZOA.js} +1 -1
- package/dist/web/client/assets/is-ref-object-BD8OGh9C.js +1 -0
- package/dist/web/client/assets/{layout-constants-CC0ANQOP.js → layout-constants-Bl6XCvhY.js} +1 -1
- package/dist/web/client/assets/{message-queue-BUJK6bPQ.js → message-queue-CiptKSb6.js} +1 -1
- package/dist/web/client/assets/{model-selector-list-yOj8BeKr.js → model-selector-list-BHQ-Q8b9.js} +1 -1
- package/dist/web/client/assets/{notify-GSsGEKtR.js → notify-BC0a76VJ.js} +1 -1
- package/dist/web/client/assets/{openui-renderer-xe2-ekvP.js → openui-renderer-CH9K7_8t.js} +3 -3
- package/dist/web/client/assets/{prompt-input-BhVQxoyh.js → prompt-input-IwZOepG7.js} +1 -1
- package/dist/web/client/assets/{provider-label-BW_awXvw.js → provider-label-DNZOLldn.js} +1 -1
- package/dist/web/client/assets/{right-panel-registry-BpfG1iZV.js → right-panel-registry-BJG8ubHt.js} +2 -2
- package/dist/web/client/assets/routes-BXFQmjL9.js +16 -0
- package/dist/web/client/assets/select-COK0Kaq2.js +1 -0
- package/dist/web/client/assets/{session-tool-renderer-CNcxpGsk.js → session-tool-renderer-mOZdkbiU.js} +1 -1
- package/dist/web/client/assets/{session-tree-panel-BIEUJ1Zs.js → session-tree-panel-deGRKAhX.js} +1 -1
- package/dist/web/client/assets/settings-dialog-BU1Tw0CQ.js +2 -0
- package/dist/web/client/assets/{subagent-chat-panel-DA1GvHt8.js → subagent-chat-panel-DQEnhU2t.js} +1 -1
- package/dist/web/client/assets/{subagent-transcript-BGctBTbY.js → subagent-transcript-CCpg3uL6.js} +1 -1
- package/dist/web/client/assets/{subagent-utils-HbymlalM.js → subagent-utils-DTV2RcFl.js} +2 -2
- package/dist/web/client/assets/{subagents-panel-BJIdWRcV.js → subagents-panel-B-X7WPUU.js} +1 -1
- package/dist/web/client/assets/surface-context-DWplCCcO.js +1 -0
- package/dist/web/client/assets/{switch-DIbInrPR.js → switch-DQETDDJT.js} +1 -1
- package/dist/web/client/assets/toast-BFeqSeaR.js +1 -0
- package/dist/web/client/assets/{tool-result-PSnAt_3f.js → tool-result-C5Ixe-AJ.js} +1 -1
- package/dist/web/client/assets/{use-presence-D2YmRKr3.js → use-presence-rcUnm8Z7.js} +1 -1
- package/dist/web/client/assets/use-reduced-motion-BgG7f9xw.js +9 -0
- package/dist/web/client/assets/{workspace-panel-D3CMFw8W.js → workspace-panel-DDjQuELx.js} +1 -1
- package/dist/web/client/bundle-budget.json +5 -5
- package/dist/web/server/{_tanstack-start-manifest_v-MhCuqEzO-S6MEB7L5.js → _tanstack-start-manifest_v-vL58CVrY-7SDCWIHD.js} +23 -23
- package/dist/web/server/{artifacts-panel-BVfcZuA2-PB4RCSHV.js → artifacts-panel-CozDO7ak-5T4W7RME.js} +9 -9
- package/dist/web/server/{chat-command-palette-DlJDToBH-MVI6V743.js → chat-command-palette-CLE-L0qp-ZZNKVTSS.js} +5 -5
- package/dist/web/server/{chunk-MM4HQ5EO.js → chunk-54UEKLGD.js} +7 -7
- package/dist/web/server/{chunk-3VMFSSWK.js → chunk-B4EBMF5J.js} +2 -2
- package/dist/web/server/{chunk-RQHQK66C.js → chunk-D7GSWBRI.js} +2 -2
- package/dist/web/server/{chunk-JT53AAM5.js → chunk-E4YWFQX5.js} +1442 -1063
- package/dist/web/server/{chunk-VF3NJAD6.js → chunk-EUWNVEIC.js} +497 -556
- package/dist/web/server/{chunk-KUBURZOL.js → chunk-GRGV5FVO.js} +4 -4
- package/dist/web/server/{chunk-4QFOBBX5.js → chunk-NHV77NOI.js} +2 -2
- package/dist/web/server/{chunk-RWQWBZNI.js → chunk-QCDSLD3L.js} +6 -6
- package/dist/web/server/{chunk-MSXGQVHG.js → chunk-RVDWGK6U.js} +5 -5
- package/dist/web/server/{chunk-SAIH5YPC.js → chunk-RYU7I34A.js} +4 -4
- package/dist/web/server/{chunk-WBPESYPV.js → chunk-SLRV7YNY.js} +3 -3
- package/dist/web/server/{chunk-44MTKAFZ.js → chunk-XJHYJLGU.js} +4 -4
- package/dist/web/server/{create-project-dialog-UPz5_Ysf-FS6BL74M.js → create-project-dialog-CReZdM5g-2V7C5J67.js} +75 -14
- package/dist/web/server/{fork-picker-dialog-CZBpezXS-64KP23PO.js → fork-picker-dialog-CXcLEaor-6SVM5RJO.js} +3 -3
- package/dist/web/server/{message-queue-D_Q3coUY-I3EJZXWR.js → message-queue-Q_Q6hbqc-AOV2PSCX.js} +3 -3
- package/dist/web/server/{model-selector-list-q6WkkOwQ-OT46QU5P.js → model-selector-list-BOKU5_Z3-III72ZT2.js} +5 -5
- package/dist/web/server/{openui-renderer-BqI6m6VI-HXEIYIYZ.js → openui-renderer-VuQOQeAP-XBOR3XGN.js} +5 -5
- package/dist/web/server/{resources-panel-BKZ0M0RP-CMATPQQP.js → resources-panel-Cnz-X1bx-TT5KVROR.js} +4 -4
- package/dist/web/server/{router-BfuEp_JW-DNQ33L5J.js → router-C437aaqv-72HBLLJI.js} +2 -2
- package/dist/web/server/{routes-NdG3DsXJ-QKZT7TKM.js → routes-BkVN3m9i-PYNMNLQ5.js} +36 -34
- package/dist/web/server/server.js +2 -2
- package/dist/web/server/{session-reasoning-panel-Dc-AnjdD-7KAZLD74.js → session-reasoning-panel-2_TR5nKM-KA5OY7ZV.js} +4 -4
- package/dist/web/server/{session-tool-renderer-DaR8U5rb-TXWACWT7.js → session-tool-renderer-BFEWy2Pk-JTSYUPO5.js} +5 -5
- package/dist/web/server/{session-tree-panel-V3l8WdmE-YBRDLHWU.js → session-tree-panel-3y9LVA0A-4V4TJX62.js} +5 -5
- package/dist/web/server/{settings-dialog-C8U1VX75-6A2V6HSW.js → settings-dialog-DgZ8Z5e4-6T5AS2EB.js} +190 -119
- package/dist/web/server/{subagent-chat-panel-B9CtFTP5-6QDZ4RQY.js → subagent-chat-panel-B0pmAxCp-DKXNAOUU.js} +7 -7
- package/dist/web/server/{subagents-panel-Dw6yP5X4-BMN45GDD.js → subagents-panel-FUUT0t1i-5ZKJ2QAJ.js} +8 -8
- package/dist/web/server/{workspace-panel-C246J-eO-2WGJWVE6.js → workspace-panel-BbI1N4f8-WYOEVH4G.js} +4 -4
- package/package.json +1 -1
- package/dist/web/client/assets/button-BrwYi6QP.js +0 -1
- package/dist/web/client/assets/create-project-dialog-DVOaxTzt.js +0 -1
- package/dist/web/client/assets/ease-2UPBQU5v.js +0 -1
- package/dist/web/client/assets/globals-CD6JXJJh.css +0 -2
- package/dist/web/client/assets/index-BEG-7vN-.js +0 -12
- package/dist/web/client/assets/input-tWLSIxES.js +0 -1
- package/dist/web/client/assets/is-ref-object-CEXqIz6L.js +0 -1
- package/dist/web/client/assets/routes-BIp_deev.js +0 -16
- package/dist/web/client/assets/select-Buvrx1fi.js +0 -1
- package/dist/web/client/assets/settings-dialog-DAB6RL4u.js +0 -2
- package/dist/web/client/assets/surface-context-A-BjVzO_.js +0 -1
- package/dist/web/client/assets/toast-CS0pnDlS.js +0 -1
- package/dist/web/client/assets/use-reduced-motion-CaQBb3Qc.js +0 -9
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
visuallyHidden,
|
|
171
171
|
visuallyHiddenInput,
|
|
172
172
|
writeStoredValue
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-E4YWFQX5.js";
|
|
174
174
|
import {
|
|
175
175
|
CHAT_COLUMN_CLASS,
|
|
176
176
|
CHAT_HEADER_LAYER_CLASS,
|
|
@@ -584,7 +584,7 @@ function Badge({ className, variant = "default", render, ...props }) {
|
|
|
584
584
|
});
|
|
585
585
|
}
|
|
586
586
|
|
|
587
|
-
// web/app/dist/server/assets/surface-context-
|
|
587
|
+
// web/app/dist/server/assets/surface-context-zH57tA54.js
|
|
588
588
|
import { createContext, useContext } from "react";
|
|
589
589
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
590
590
|
var SURFACE_BG = {
|
|
@@ -1733,7 +1733,7 @@ function isDaytonaNotConnectedError(error2) {
|
|
|
1733
1733
|
return error2.status === 403;
|
|
1734
1734
|
}
|
|
1735
1735
|
|
|
1736
|
-
// web/app/dist/server/assets/routes-
|
|
1736
|
+
// web/app/dist/server/assets/routes-BkVN3m9i.js
|
|
1737
1737
|
import { Children, Fragment as Fragment7, Suspense as Suspense2, cloneElement, createContext as createContext27, createElement, forwardRef as forwardRef54, isValidElement, lazy as lazy2, memo as memo4, useCallback as useCallback12, useContext as useContext27, useEffect as useEffect8, useEffectEvent, useId as useId2, useLayoutEffect as useLayoutEffect2, useMemo as useMemo22, useReducer, useRef as useRef39, useState as useState23, useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
1738
1738
|
import { Fragment as Fragment$1, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1739
1739
|
|
|
@@ -6958,7 +6958,7 @@ if (process.env.NODE_ENV !== "production") ListboxSeparator.displayName = "Listb
|
|
|
6958
6958
|
// node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.5.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@base-ui/react/select/separator/SelectSeparator.mjs
|
|
6959
6959
|
var SelectSeparator = ListboxSeparator;
|
|
6960
6960
|
|
|
6961
|
-
// web/app/dist/server/assets/routes-
|
|
6961
|
+
// web/app/dist/server/assets/routes-BkVN3m9i.js
|
|
6962
6962
|
import { createPortal } from "react-dom";
|
|
6963
6963
|
|
|
6964
6964
|
// node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.5.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@base-ui/react/alert-dialog/index.parts.mjs
|
|
@@ -10444,7 +10444,7 @@ var TabsList = /* @__PURE__ */ React112.forwardRef(function TabsList2(componentP
|
|
|
10444
10444
|
});
|
|
10445
10445
|
if (process.env.NODE_ENV !== "production") TabsList.displayName = "TabsList";
|
|
10446
10446
|
|
|
10447
|
-
// web/app/dist/server/assets/routes-
|
|
10447
|
+
// web/app/dist/server/assets/routes-BkVN3m9i.js
|
|
10448
10448
|
function isChatTextPart(part) {
|
|
10449
10449
|
return part.type === "text";
|
|
10450
10450
|
}
|
|
@@ -10489,7 +10489,7 @@ function DialogContent({ className, children, showCloseButton = true, overlayCla
|
|
|
10489
10489
|
render: /* @__PURE__ */ jsx7(Button$1, {
|
|
10490
10490
|
variant: "ghost",
|
|
10491
10491
|
className: "absolute top-2 right-2",
|
|
10492
|
-
size: "icon-
|
|
10492
|
+
size: "icon-compact"
|
|
10493
10493
|
}),
|
|
10494
10494
|
children: [/* @__PURE__ */ jsx7(X, {}), /* @__PURE__ */ jsx7("span", {
|
|
10495
10495
|
className: "sr-only",
|
|
@@ -10846,7 +10846,7 @@ function PromptInput({ value, defaultValue = "", onValueChange, onSubmit, loadin
|
|
|
10846
10846
|
]
|
|
10847
10847
|
});
|
|
10848
10848
|
}
|
|
10849
|
-
var LazyGenerativeTextRenderer = lazy2(() => import("./openui-renderer-
|
|
10849
|
+
var LazyGenerativeTextRenderer = lazy2(() => import("./openui-renderer-VuQOQeAP-XBOR3XGN.js").then((n) => n.n).then(({ GenerativeTextRenderer }) => ({ default: GenerativeTextRenderer })));
|
|
10850
10850
|
function PlainTextFallback({ className, content }) {
|
|
10851
10851
|
return /* @__PURE__ */ jsx7("div", {
|
|
10852
10852
|
className: className ? `${className} whitespace-pre-wrap` : "whitespace-pre-wrap",
|
|
@@ -12737,13 +12737,13 @@ function rlmStatusIcon(status) {
|
|
|
12737
12737
|
if (status === "recovering") return /* @__PURE__ */ jsx7(RotateCw, { className: "size-3.5 animate-spin text-amber-500 dark:text-amber-400" });
|
|
12738
12738
|
return /* @__PURE__ */ jsx7(LoaderCircle, { className: "size-3.5 animate-spin text-primary" });
|
|
12739
12739
|
}
|
|
12740
|
-
var LazyArtifactsPanel = lazy2(() => import("./artifacts-panel-
|
|
12741
|
-
var LazyResourcesPanel = lazy2(() => import("./resources-panel-
|
|
12740
|
+
var LazyArtifactsPanel = lazy2(() => import("./artifacts-panel-CozDO7ak-5T4W7RME.js").then(({ ArtifactsPanelContent }) => ({ default: ArtifactsPanelContent })));
|
|
12741
|
+
var LazyResourcesPanel = lazy2(() => import("./resources-panel-Cnz-X1bx-TT5KVROR.js").then(({ ResourcesPanelContent }) => ({ default: ResourcesPanelContent })));
|
|
12742
12742
|
var LazySessionInsightsPanel = lazy2(() => import("./session-insights-panel-CWmY-2NA-ZSWW6NIO.js").then(({ SessionInsightsPanel }) => ({ default: SessionInsightsPanel })));
|
|
12743
12743
|
var LazyReplPanel = lazy2(() => import("./repl-panel-DOyUyuQR-IMYO4FKX.js").then(({ ReplPanelContent }) => ({ default: ReplPanelContent })));
|
|
12744
|
-
var LazySubagentsPanel = lazy2(() => import("./subagents-panel-
|
|
12745
|
-
var LazyWorkspacePanel = lazy2(() => import("./workspace-panel-
|
|
12746
|
-
var LazySessionTreePanel = lazy2(() => import("./session-tree-panel-
|
|
12744
|
+
var LazySubagentsPanel = lazy2(() => import("./subagents-panel-FUUT0t1i-5ZKJ2QAJ.js").then(({ SubagentsPanelContent }) => ({ default: SubagentsPanelContent })));
|
|
12745
|
+
var LazyWorkspacePanel = lazy2(() => import("./workspace-panel-BbI1N4f8-WYOEVH4G.js").then(({ WorkspacePanelContent }) => ({ default: WorkspacePanelContent })));
|
|
12746
|
+
var LazySessionTreePanel = lazy2(() => import("./session-tree-panel-3y9LVA0A-4V4TJX62.js").then(({ SessionTreePanel }) => ({ default: SessionTreePanel })));
|
|
12747
12747
|
function PanelFallback() {
|
|
12748
12748
|
return /* @__PURE__ */ jsxs3("div", {
|
|
12749
12749
|
className: "flex min-h-32 flex-col gap-3 p-4",
|
|
@@ -13496,9 +13496,14 @@ function resolveChatApiUrl(path) {
|
|
|
13496
13496
|
if (!isChatRuntimePath(pathname)) return path;
|
|
13497
13497
|
return `${base}${path}`;
|
|
13498
13498
|
}
|
|
13499
|
-
function
|
|
13499
|
+
function useOptionalUser() {
|
|
13500
|
+
return null;
|
|
13501
|
+
}
|
|
13502
|
+
function getChatAuthBearerToken() {
|
|
13500
13503
|
return null;
|
|
13501
13504
|
}
|
|
13505
|
+
async function signOut() {
|
|
13506
|
+
}
|
|
13502
13507
|
var ChatRequestError = class extends Error {
|
|
13503
13508
|
status;
|
|
13504
13509
|
body;
|
|
@@ -13558,7 +13563,7 @@ function chatErrorFromStreamEvent(event) {
|
|
|
13558
13563
|
}
|
|
13559
13564
|
async function withChatRequestHeaders(init) {
|
|
13560
13565
|
const headers = new Headers(init?.headers);
|
|
13561
|
-
const bearer = await getChatAuthBearerToken
|
|
13566
|
+
const bearer = await getChatAuthBearerToken();
|
|
13562
13567
|
if (bearer) headers.set("Authorization", `Bearer ${bearer}`);
|
|
13563
13568
|
return headers;
|
|
13564
13569
|
}
|
|
@@ -13712,7 +13717,7 @@ function ChatWelcome({ disabled, onSelect }) {
|
|
|
13712
13717
|
children: WELCOME_TASKS.map((item) => /* @__PURE__ */ jsx7(Button$1, {
|
|
13713
13718
|
type: "button",
|
|
13714
13719
|
variant: "outline",
|
|
13715
|
-
size: "
|
|
13720
|
+
size: "compact",
|
|
13716
13721
|
disabled: disabled || item.disabled,
|
|
13717
13722
|
onClick: () => onSelect(item),
|
|
13718
13723
|
className: SUGGESTION_ITEM_CLASS,
|
|
@@ -14476,7 +14481,7 @@ function ApprovalCard({ title = "Approval required", description, children, ques
|
|
|
14476
14481
|
className: "mt-4 flex flex-wrap items-center gap-2",
|
|
14477
14482
|
children: [
|
|
14478
14483
|
/* @__PURE__ */ jsx7(Button$1, {
|
|
14479
|
-
size: "
|
|
14484
|
+
size: "compact",
|
|
14480
14485
|
disabled: busy,
|
|
14481
14486
|
onClick: onApprove,
|
|
14482
14487
|
className: "rounded-full",
|
|
@@ -14484,7 +14489,7 @@ function ApprovalCard({ title = "Approval required", description, children, ques
|
|
|
14484
14489
|
}),
|
|
14485
14490
|
onRequestChanges ? /* @__PURE__ */ jsx7(Button$1, {
|
|
14486
14491
|
variant: "secondary",
|
|
14487
|
-
size: "
|
|
14492
|
+
size: "compact",
|
|
14488
14493
|
disabled: busy,
|
|
14489
14494
|
onClick: onRequestChanges,
|
|
14490
14495
|
className: "rounded-full",
|
|
@@ -14492,7 +14497,7 @@ function ApprovalCard({ title = "Approval required", description, children, ques
|
|
|
14492
14497
|
}) : null,
|
|
14493
14498
|
onReject ? /* @__PURE__ */ jsx7(Button$1, {
|
|
14494
14499
|
variant: "ghost",
|
|
14495
|
-
size: "
|
|
14500
|
+
size: "compact",
|
|
14496
14501
|
disabled: busy,
|
|
14497
14502
|
onClick: onReject,
|
|
14498
14503
|
className: "rounded-full text-muted-foreground hover:text-rose-600 dark:hover:text-rose-400",
|
|
@@ -15113,7 +15118,7 @@ function useInputBarState({ models, status, thinkingLevel, onModelChange, onThin
|
|
|
15113
15118
|
value
|
|
15114
15119
|
};
|
|
15115
15120
|
}
|
|
15116
|
-
var LazyModelSelectorList = lazy2(() => import("./model-selector-list-
|
|
15121
|
+
var LazyModelSelectorList = lazy2(() => import("./model-selector-list-BOKU5_Z3-III72ZT2.js").then(({ ModelSelectorList: ModelSelectorList2 }) => ({ default: ModelSelectorList2 })));
|
|
15117
15122
|
function ModelSelectorList(props) {
|
|
15118
15123
|
return /* @__PURE__ */ jsx7(Suspense2, {
|
|
15119
15124
|
fallback: /* @__PURE__ */ jsx7("div", {
|
|
@@ -15224,7 +15229,7 @@ function InputBarContent({ modelKey, models, status, infoDescription, chatMode =
|
|
|
15224
15229
|
}), /* @__PURE__ */ jsx7(Button$1, {
|
|
15225
15230
|
type: "button",
|
|
15226
15231
|
variant: "outline",
|
|
15227
|
-
size: "icon-
|
|
15232
|
+
size: "icon-compact",
|
|
15228
15233
|
"aria-label": `Remove ${image.filename}`,
|
|
15229
15234
|
onClick: () => attachments?.onRemoveImage?.(image.id),
|
|
15230
15235
|
className: cn(HIT_AREA_EXPAND_CLASS, "absolute -end-1 -top-1 size-6 rounded-full bg-background opacity-0 shadow-sm transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100 [@media(hover:none)]:opacity-100"),
|
|
@@ -15675,7 +15680,7 @@ function iconFor(kind) {
|
|
|
15675
15680
|
return kind;
|
|
15676
15681
|
}
|
|
15677
15682
|
}
|
|
15678
|
-
var LazySessionToolRenderer = lazy2(() => import("./session-tool-renderer-
|
|
15683
|
+
var LazySessionToolRenderer = lazy2(() => import("./session-tool-renderer-BFEWy2Pk-JTSYUPO5.js").then((n) => n.n).then(({ SessionToolRenderer: SessionToolRenderer2 }) => ({ default: SessionToolRenderer2 })));
|
|
15679
15684
|
function SessionToolRenderer(props) {
|
|
15680
15685
|
return /* @__PURE__ */ jsx7(Suspense2, {
|
|
15681
15686
|
fallback: /* @__PURE__ */ jsx7("div", {
|
|
@@ -15686,7 +15691,7 @@ function SessionToolRenderer(props) {
|
|
|
15686
15691
|
children: /* @__PURE__ */ jsx7(LazySessionToolRenderer, { ...props })
|
|
15687
15692
|
});
|
|
15688
15693
|
}
|
|
15689
|
-
var LazySessionReasoningPanel = lazy2(() => import("./session-reasoning-panel-
|
|
15694
|
+
var LazySessionReasoningPanel = lazy2(() => import("./session-reasoning-panel-2_TR5nKM-KA5OY7ZV.js").then(({ SessionReasoningPanel: SessionReasoningPanel2 }) => ({ default: SessionReasoningPanel2 })));
|
|
15690
15695
|
function SessionReasoningPanel(props) {
|
|
15691
15696
|
return /* @__PURE__ */ jsx7(Suspense2, {
|
|
15692
15697
|
fallback: /* @__PURE__ */ jsx7("div", {
|
|
@@ -15722,7 +15727,7 @@ function PromptSuggestions(props) {
|
|
|
15722
15727
|
})
|
|
15723
15728
|
});
|
|
15724
15729
|
}
|
|
15725
|
-
var LazyMessageQueue = lazy2(() => import("./message-queue-
|
|
15730
|
+
var LazyMessageQueue = lazy2(() => import("./message-queue-Q_Q6hbqc-AOV2PSCX.js").then(({ MessageQueue: MessageQueue2 }) => ({ default: MessageQueue2 })));
|
|
15726
15731
|
function MessageQueue(props) {
|
|
15727
15732
|
return /* @__PURE__ */ jsx7(Suspense2, {
|
|
15728
15733
|
fallback: null,
|
|
@@ -16180,14 +16185,6 @@ function useChatInputBarProps(composer, activeSessionId) {
|
|
|
16180
16185
|
workspaceReferenceSuggestions
|
|
16181
16186
|
]);
|
|
16182
16187
|
}
|
|
16183
|
-
function useOptionalUser() {
|
|
16184
|
-
return null;
|
|
16185
|
-
}
|
|
16186
|
-
function getChatAuthBearerToken() {
|
|
16187
|
-
return null;
|
|
16188
|
-
}
|
|
16189
|
-
async function signOut() {
|
|
16190
|
-
}
|
|
16191
16188
|
var ProjectResponseSchema = external_exports.object({ project: ProjectSummarySchema });
|
|
16192
16189
|
var chatClient = {
|
|
16193
16190
|
async abortSession(metadata) {
|
|
@@ -19857,19 +19854,18 @@ function usePiChat(model, options) {
|
|
|
19857
19854
|
}
|
|
19858
19855
|
var RESOURCE_CANVAS_WIDTH_STORAGE_KEY = "fleet-prime:v1:right-panel-width";
|
|
19859
19856
|
var THEME_PREFERENCE_STORAGE_KEY = "fleet-prime:v1:theme-preference";
|
|
19860
|
-
var RESOURCE_CANVAS_MIN_WIDTH = 320;
|
|
19861
19857
|
function getResourceCanvasInitialWidth() {
|
|
19862
|
-
if (typeof window === "undefined") return
|
|
19858
|
+
if (typeof window === "undefined") return 320;
|
|
19863
19859
|
return clampResourceCanvasWidth(Math.floor(window.innerWidth * RESOURCE_CANVAS_DEFAULT_VIEWPORT_RATIO));
|
|
19864
19860
|
}
|
|
19865
19861
|
function getResourceCanvasMaxWidth() {
|
|
19866
|
-
if (typeof window === "undefined") return
|
|
19862
|
+
if (typeof window === "undefined") return 320;
|
|
19867
19863
|
const computedRootFontSizePx = Number.parseFloat(window.getComputedStyle(document.documentElement).fontSize);
|
|
19868
19864
|
const sessionSidebarWidthPx = getResourceCanvasSessionSidebarWidthPx(Number.isFinite(computedRootFontSizePx) && computedRootFontSizePx > 0 ? computedRootFontSizePx : 16);
|
|
19869
|
-
return Math.max(
|
|
19865
|
+
return Math.max(320, window.innerWidth - sessionSidebarWidthPx - 360);
|
|
19870
19866
|
}
|
|
19871
19867
|
function clampResourceCanvasWidth(width) {
|
|
19872
|
-
return Math.min(getResourceCanvasMaxWidth(), Math.max(
|
|
19868
|
+
return Math.min(getResourceCanvasMaxWidth(), Math.max(320, Math.round(width)));
|
|
19873
19869
|
}
|
|
19874
19870
|
function readStoredResourceCanvasWidth() {
|
|
19875
19871
|
return readStoredWidth(RESOURCE_CANVAS_WIDTH_STORAGE_KEY, getResourceCanvasInitialWidth(), clampResourceCanvasWidth);
|
|
@@ -19968,6 +19964,11 @@ function useChatShellState(modelsData, storage) {
|
|
|
19968
19964
|
storeThemePreference(preference);
|
|
19969
19965
|
applyThemePreference(preference);
|
|
19970
19966
|
}, []);
|
|
19967
|
+
const handleResourceCanvasWidthChange = useCallback12((nextWidth) => {
|
|
19968
|
+
const clamped = clampResourceCanvasWidth(nextWidth);
|
|
19969
|
+
setResourceCanvasWidth(clamped);
|
|
19970
|
+
storeResourceCanvasWidth(clamped);
|
|
19971
|
+
}, []);
|
|
19971
19972
|
const handleResourceCanvasResizeStart = useCallback12((event) => {
|
|
19972
19973
|
startHorizontalResize({
|
|
19973
19974
|
event,
|
|
@@ -20027,6 +20028,7 @@ function useChatShellState(modelsData, storage) {
|
|
|
20027
20028
|
return {
|
|
20028
20029
|
commandPaletteOpen,
|
|
20029
20030
|
handleResourceCanvasResizeStart,
|
|
20031
|
+
handleResourceCanvasWidthChange,
|
|
20030
20032
|
handleThemePreferenceChange,
|
|
20031
20033
|
initialSessionMetadata: storedSessionMetadata,
|
|
20032
20034
|
modelKey,
|
|
@@ -20398,7 +20400,7 @@ var AnimatedSidebarTrigger = forwardRef54(function AnimatedSidebarTrigger2({ cla
|
|
|
20398
20400
|
},
|
|
20399
20401
|
type,
|
|
20400
20402
|
variant: "ghost",
|
|
20401
|
-
size: "icon
|
|
20403
|
+
size: "icon",
|
|
20402
20404
|
"aria-label": props["aria-label"] ?? "Toggle sidebar",
|
|
20403
20405
|
"aria-expanded": expanded,
|
|
20404
20406
|
"data-slot": "sidebar-trigger",
|
|
@@ -20417,7 +20419,7 @@ forwardRef54(function AnimatedSidebarClose({ className, onClick, type = "button"
|
|
|
20417
20419
|
ref: forwardedRef,
|
|
20418
20420
|
type,
|
|
20419
20421
|
variant: "ghost",
|
|
20420
|
-
size: "icon
|
|
20422
|
+
size: "icon",
|
|
20421
20423
|
"aria-label": props["aria-label"] ?? "Close sidebar",
|
|
20422
20424
|
onClick: (event) => {
|
|
20423
20425
|
onClick?.(event);
|
|
@@ -20562,7 +20564,7 @@ function ChromePillButton({ active = false, ariaLabel, className, title, ...prop
|
|
|
20562
20564
|
...props,
|
|
20563
20565
|
type: "button",
|
|
20564
20566
|
variant: "ghost",
|
|
20565
|
-
size: "
|
|
20567
|
+
size: "compact",
|
|
20566
20568
|
className: cn(CHROME_PILL_CLASS, active ? CHROME_PILL_ACTIVE_CLASS : CHROME_PILL_INACTIVE_CLASS, className),
|
|
20567
20569
|
"aria-label": ariaLabel,
|
|
20568
20570
|
title: title ?? ariaLabel
|
|
@@ -20758,7 +20760,7 @@ function AgentTabBar({ tabs, value, onValueChange, onClose, onNewSession }) {
|
|
|
20758
20760
|
onClick: () => onValueChange(tab.id),
|
|
20759
20761
|
onKeyDown: (event) => handleKeyDown(event, tab.id),
|
|
20760
20762
|
role: "tab",
|
|
20761
|
-
size: "
|
|
20763
|
+
size: "compact",
|
|
20762
20764
|
tabIndex: active ? 0 : -1,
|
|
20763
20765
|
type: "button",
|
|
20764
20766
|
variant: "ghost",
|
|
@@ -20779,7 +20781,7 @@ function AgentTabBar({ tabs, value, onValueChange, onClose, onNewSession }) {
|
|
|
20779
20781
|
event.stopPropagation();
|
|
20780
20782
|
onClose(tab.id);
|
|
20781
20783
|
},
|
|
20782
|
-
size: "icon-
|
|
20784
|
+
size: "icon-compact",
|
|
20783
20785
|
title: `Close ${tab.label} tab`,
|
|
20784
20786
|
type: "button",
|
|
20785
20787
|
variant: "ghost",
|
|
@@ -20799,7 +20801,7 @@ function AgentTabBar({ tabs, value, onValueChange, onClose, onNewSession }) {
|
|
|
20799
20801
|
event.stopPropagation();
|
|
20800
20802
|
onNewSession();
|
|
20801
20803
|
},
|
|
20802
|
-
size: "icon-
|
|
20804
|
+
size: "icon-compact",
|
|
20803
20805
|
title: "New chat",
|
|
20804
20806
|
type: "button",
|
|
20805
20807
|
variant: "ghost",
|
|
@@ -21469,7 +21471,7 @@ function MobilePanel({ children, dataTestid, headerActions, icon: Icon, onClose,
|
|
|
21469
21471
|
type: "button",
|
|
21470
21472
|
onClick: handleHeaderClose,
|
|
21471
21473
|
variant: "ghost",
|
|
21472
|
-
size: "icon-
|
|
21474
|
+
size: "icon-compact",
|
|
21473
21475
|
className: `relative after:absolute after:top-1/2 after:left-1/2 after:size-10 after:-translate-x-1/2 after:-translate-y-1/2 text-foreground/40 hover:text-foreground/70`,
|
|
21474
21476
|
"aria-label": "Close panel",
|
|
21475
21477
|
title: "Close panel",
|
|
@@ -22366,7 +22368,7 @@ function useChatWorkspaceData() {
|
|
|
22366
22368
|
projectId: activeProjectId
|
|
22367
22369
|
});
|
|
22368
22370
|
const discoverModelsMutation = useDiscoverChatModels();
|
|
22369
|
-
const { commandPaletteOpen, handleResourceCanvasResizeStart, handleThemePreferenceChange, initialSessionMetadata, modelKey, modelSelection, models, openArtifact, openWorkspacePath, openPanelAction, persistSession, reopenRightPanel, resourceCanvasWidth, rightPanel, selectedArtifactId, selectedWorkspacePath, setCommandPaletteOpen, setModelKey, setRightPanel, setSelectedWorkspacePath, setThinkingLevel, themePreference, thinkingLevel } = useChatShellState(modelsData, storage);
|
|
22371
|
+
const { commandPaletteOpen, handleResourceCanvasResizeStart, handleResourceCanvasWidthChange, handleThemePreferenceChange, initialSessionMetadata, modelKey, modelSelection, models, openArtifact, openWorkspacePath, openPanelAction, persistSession, reopenRightPanel, resourceCanvasWidth, rightPanel, selectedArtifactId, selectedWorkspacePath, setCommandPaletteOpen, setModelKey, setRightPanel, setSelectedWorkspacePath, setThinkingLevel, themePreference, thinkingLevel } = useChatShellState(modelsData, storage);
|
|
22370
22372
|
useEffect8(() => {
|
|
22371
22373
|
if (initialSessionMetadata.projectId && initialSessionMetadata.projectId !== activeProjectId) {
|
|
22372
22374
|
setActiveProjectId(initialSessionMetadata.projectId);
|
|
@@ -22734,7 +22736,7 @@ function useChatWorkspaceData() {
|
|
|
22734
22736
|
}, [composerIntentAvailability]);
|
|
22735
22737
|
const setComposerIntentKey = useCallback12(async (apiKey) => {
|
|
22736
22738
|
try {
|
|
22737
|
-
await
|
|
22739
|
+
await fetchJson("/api/chat/intent", {
|
|
22738
22740
|
method: "PUT",
|
|
22739
22741
|
headers: { "Content-Type": "application/json" },
|
|
22740
22742
|
body: JSON.stringify({ apiKey })
|
|
@@ -22911,6 +22913,7 @@ function useChatWorkspaceData() {
|
|
|
22911
22913
|
panels: {
|
|
22912
22914
|
chatPanelData,
|
|
22913
22915
|
handleResourceCanvasResizeStart,
|
|
22916
|
+
handleResourceCanvasWidthChange,
|
|
22914
22917
|
resourceCanvasWidth,
|
|
22915
22918
|
rightPanel,
|
|
22916
22919
|
setRightPanel,
|
|
@@ -22946,9 +22949,9 @@ function ChatApp({ children, className, sidebarWidth = SESSION_SIDEBAR_WIDTH_CSS
|
|
|
22946
22949
|
children
|
|
22947
22950
|
});
|
|
22948
22951
|
}
|
|
22949
|
-
var LazyChatCommandPalette = lazy2(() => import("./chat-command-palette-
|
|
22950
|
-
var LazySettingsDialog = lazy2(() => import("./settings-dialog-
|
|
22951
|
-
var LazyForkPickerDialog = lazy2(() => import("./fork-picker-dialog-
|
|
22952
|
+
var LazyChatCommandPalette = lazy2(() => import("./chat-command-palette-CLE-L0qp-ZZNKVTSS.js").then(({ ChatCommandPalette }) => ({ default: ChatCommandPalette })));
|
|
22953
|
+
var LazySettingsDialog = lazy2(() => import("./settings-dialog-DgZ8Z5e4-6T5AS2EB.js").then(({ SettingsDialog }) => ({ default: SettingsDialog })));
|
|
22954
|
+
var LazyForkPickerDialog = lazy2(() => import("./fork-picker-dialog-CXcLEaor-6SVM5RJO.js").then(({ ForkPickerDialog }) => ({ default: ForkPickerDialog })));
|
|
22952
22955
|
function ChatCommandPaletteOverlay({ chrome, conversation, dialogs, panels, session }) {
|
|
22953
22956
|
return /* @__PURE__ */ jsx7(Fragment$1, { children: dialogs.commandPaletteOpen ? /* @__PURE__ */ jsx7(Suspense2, {
|
|
22954
22957
|
fallback: null,
|
|
@@ -23000,7 +23003,7 @@ function ChatWorkspaceOverlayDialogs({ dialogs }) {
|
|
|
23000
23003
|
}
|
|
23001
23004
|
var layoutStyle = {
|
|
23002
23005
|
"--chat-chrome-top": `52px`,
|
|
23003
|
-
"--chat-header-height": `44px`,
|
|
23006
|
+
"--chat-header-height": `var(--density-header-height, 44px)`,
|
|
23004
23007
|
"--chat-header-top": `0px`
|
|
23005
23008
|
};
|
|
23006
23009
|
function ChatWorkspaceLayout({ children, headerCenter, headerLeft, headerRight, panel }) {
|
|
@@ -23132,13 +23135,15 @@ function usePanelKeybindings({ onCommandPaletteToggle, onClosePanel, rightPanel,
|
|
|
23132
23135
|
setRightPanel
|
|
23133
23136
|
]);
|
|
23134
23137
|
}
|
|
23135
|
-
function ResizableCanvas({ children, dataTestid, headerLeading, loading, onClose, onRefresh, onResizeStart, open: open2, headerActions, title, titleIcon: TitleIcon, width }) {
|
|
23138
|
+
function ResizableCanvas({ children, dataTestid, headerLeading, loading, onClose, onRefresh, onResizeStart, onWidthChange, open: open2, headerActions, title, titleIcon: TitleIcon, width }) {
|
|
23136
23139
|
const reduceMotion = useReducedMotion();
|
|
23137
23140
|
const panelRef = useRef39(null);
|
|
23138
23141
|
useEffect8(() => {
|
|
23139
23142
|
if (!open2) return;
|
|
23140
23143
|
panelRef.current?.focus({ preventScroll: true });
|
|
23141
23144
|
}, [open2]);
|
|
23145
|
+
const minWidth = 320;
|
|
23146
|
+
const maxWidth = getResourceCanvasMaxWidth();
|
|
23142
23147
|
return /* @__PURE__ */ jsx7(AnimatePresence, { children: open2 && /* @__PURE__ */ jsxs3(m.aside, {
|
|
23143
23148
|
ref: panelRef,
|
|
23144
23149
|
initial: reduceMotion ? false : {
|
|
@@ -23173,14 +23178,36 @@ function ResizableCanvas({ children, dataTestid, headerLeading, loading, onClose
|
|
|
23173
23178
|
},
|
|
23174
23179
|
children: [/* @__PURE__ */ jsx7("button", {
|
|
23175
23180
|
type: "button",
|
|
23181
|
+
role: "separator",
|
|
23182
|
+
"aria-orientation": "vertical",
|
|
23176
23183
|
"aria-label": `Resize ${title} panel`,
|
|
23177
|
-
|
|
23184
|
+
"aria-valuenow": Math.round(width),
|
|
23185
|
+
"aria-valuemin": minWidth,
|
|
23186
|
+
"aria-valuemax": maxWidth,
|
|
23187
|
+
tabIndex: 0,
|
|
23188
|
+
className: "absolute top-0 bottom-0 left-0 z-10 w-2 -translate-x-1 cursor-col-resize touch-none bg-transparent transition-colors outline-none hover:bg-foreground/10 focus-visible:bg-foreground/10 focus-visible:ring-1 focus-visible:ring-ring",
|
|
23178
23189
|
"data-testid": "pi-resources-resize-handle",
|
|
23179
|
-
onPointerDown: onResizeStart
|
|
23190
|
+
onPointerDown: onResizeStart,
|
|
23191
|
+
onKeyDown: (event) => {
|
|
23192
|
+
const step = 16;
|
|
23193
|
+
if (event.key === "ArrowLeft") {
|
|
23194
|
+
event.preventDefault();
|
|
23195
|
+
onWidthChange?.(clampResourceCanvasWidth(width + step));
|
|
23196
|
+
} else if (event.key === "ArrowRight") {
|
|
23197
|
+
event.preventDefault();
|
|
23198
|
+
onWidthChange?.(clampResourceCanvasWidth(width - step));
|
|
23199
|
+
} else if (event.key === "Home") {
|
|
23200
|
+
event.preventDefault();
|
|
23201
|
+
onWidthChange?.(minWidth);
|
|
23202
|
+
} else if (event.key === "End") {
|
|
23203
|
+
event.preventDefault();
|
|
23204
|
+
onWidthChange?.(maxWidth);
|
|
23205
|
+
}
|
|
23206
|
+
}
|
|
23180
23207
|
}), /* @__PURE__ */ jsxs3("div", {
|
|
23181
23208
|
className: "flex h-full min-w-0 flex-1 flex-col overflow-hidden",
|
|
23182
23209
|
children: [/* @__PURE__ */ jsxs3("div", {
|
|
23183
|
-
className: "flex h-[var(--chat-header-height,44px)] min-h-[var(--chat-header-height,44px)] min-w-0 shrink-0 items-center justify-between gap-2 border-b border-border/60 px-[var(--density-pad-x)] py-1",
|
|
23210
|
+
className: "flex h-[var(--chat-header-height,var(--density-header-height,44px))] min-h-[var(--chat-header-height,var(--density-header-height,44px))] min-w-0 shrink-0 items-center justify-between gap-2 border-b border-border/60 px-[var(--density-pad-x)] py-1",
|
|
23184
23211
|
children: [/* @__PURE__ */ jsx7("div", {
|
|
23185
23212
|
className: "min-w-0 flex-1",
|
|
23186
23213
|
children: headerLeading ?? /* @__PURE__ */ jsxs3("div", {
|
|
@@ -23196,7 +23223,7 @@ function ResizableCanvas({ children, dataTestid, headerLeading, loading, onClose
|
|
|
23196
23223
|
onClick: onRefresh,
|
|
23197
23224
|
disabled: !onRefresh,
|
|
23198
23225
|
variant: "ghost",
|
|
23199
|
-
size: "icon-
|
|
23226
|
+
size: "icon-compact",
|
|
23200
23227
|
className: `relative after:absolute after:inset-x-0 after:-top-1.5 after:-bottom-1.5 text-foreground/40 hover:text-foreground/70 disabled:cursor-not-allowed disabled:opacity-35`,
|
|
23201
23228
|
"aria-label": `Refresh ${title}`,
|
|
23202
23229
|
title: `Refresh ${title}`,
|
|
@@ -23209,7 +23236,7 @@ function ResizableCanvas({ children, dataTestid, headerLeading, loading, onClose
|
|
|
23209
23236
|
type: "button",
|
|
23210
23237
|
onClick: onClose,
|
|
23211
23238
|
variant: "ghost",
|
|
23212
|
-
size: "icon-
|
|
23239
|
+
size: "icon-compact",
|
|
23213
23240
|
className: `relative after:absolute after:inset-x-0 after:-top-1.5 after:-bottom-1.5 text-foreground/40 hover:text-foreground/70`,
|
|
23214
23241
|
"aria-label": "Close panel",
|
|
23215
23242
|
title: "Close panel",
|
|
@@ -23243,7 +23270,7 @@ function getServerDesktopPanelSnapshot() {
|
|
|
23243
23270
|
function useIsDesktopPanel() {
|
|
23244
23271
|
return useSyncExternalStore3(subscribeToDesktopPanel, getDesktopPanelSnapshot, getServerDesktopPanelSnapshot);
|
|
23245
23272
|
}
|
|
23246
|
-
function RightPanelShell({ handleResourceCanvasResizeStart, onClose, resourceCanvasWidth }) {
|
|
23273
|
+
function RightPanelShell({ handleResourceCanvasResizeStart, onClose, resourceCanvasWidth, onResourceCanvasWidthChange }) {
|
|
23247
23274
|
const chat = useChatPanelDataContext();
|
|
23248
23275
|
const workspace = useWorkspaceTreeContext();
|
|
23249
23276
|
const { rightPanel } = chat;
|
|
@@ -23263,6 +23290,7 @@ function RightPanelShell({ handleResourceCanvasResizeStart, onClose, resourceCan
|
|
|
23263
23290
|
onClose,
|
|
23264
23291
|
onRefresh,
|
|
23265
23292
|
onResizeStart: handleResourceCanvasResizeStart,
|
|
23293
|
+
onWidthChange: onResourceCanvasWidthChange,
|
|
23266
23294
|
open: panelOpen,
|
|
23267
23295
|
title: definition?.title ?? "",
|
|
23268
23296
|
titleIcon: definition?.icon ?? Library,
|
|
@@ -23277,129 +23305,189 @@ function RightPanelShell({ handleResourceCanvasResizeStart, onClose, resourceCan
|
|
|
23277
23305
|
children: PanelContent ? /* @__PURE__ */ jsx7(PanelContent, {}) : null
|
|
23278
23306
|
}) });
|
|
23279
23307
|
}
|
|
23280
|
-
function
|
|
23281
|
-
const
|
|
23308
|
+
function RenameSessionDialog({ session, onClose, onRenameSession }) {
|
|
23309
|
+
const [renameTitle, setRenameTitle] = useState23(() => sessionLabel(session));
|
|
23310
|
+
return /* @__PURE__ */ jsx7(AlertDialog$1, {
|
|
23311
|
+
open: true,
|
|
23312
|
+
onOpenChange: (open2) => !open2 && onClose(),
|
|
23313
|
+
children: /* @__PURE__ */ jsxs3(AlertDialogContent, { children: [
|
|
23314
|
+
/* @__PURE__ */ jsx7(AlertDialogTitle, { children: "Rename session" }),
|
|
23315
|
+
/* @__PURE__ */ jsx7(AlertDialogDescription, { children: "Choose a local display title for this Fleet Prime session." }),
|
|
23316
|
+
/* @__PURE__ */ jsx7(Input$1, {
|
|
23317
|
+
value: renameTitle,
|
|
23318
|
+
onChange: (event) => setRenameTitle(event.target.value),
|
|
23319
|
+
"aria-label": "Session title",
|
|
23320
|
+
autoFocus: true
|
|
23321
|
+
}),
|
|
23322
|
+
/* @__PURE__ */ jsxs3(AlertDialogFooter, { children: [/* @__PURE__ */ jsx7(AlertDialogCancel, {
|
|
23323
|
+
onClick: onClose,
|
|
23324
|
+
children: "Cancel"
|
|
23325
|
+
}), /* @__PURE__ */ jsx7(AlertDialogAction, {
|
|
23326
|
+
disabled: !renameTitle.trim(),
|
|
23327
|
+
onClick: () => {
|
|
23328
|
+
if (renameTitle.trim()) {
|
|
23329
|
+
onRenameSession(session.sessionId, renameTitle.trim());
|
|
23330
|
+
onClose();
|
|
23331
|
+
}
|
|
23332
|
+
},
|
|
23333
|
+
children: "Rename"
|
|
23334
|
+
})] })
|
|
23335
|
+
] })
|
|
23336
|
+
});
|
|
23337
|
+
}
|
|
23338
|
+
function RenameProjectDialog({ project, onClose, onRenameProject }) {
|
|
23339
|
+
const [renameProjectName, setRenameProjectName] = useState23(project.name);
|
|
23340
|
+
return /* @__PURE__ */ jsx7(AlertDialog$1, {
|
|
23341
|
+
open: true,
|
|
23342
|
+
onOpenChange: (open2) => !open2 && onClose(),
|
|
23343
|
+
children: /* @__PURE__ */ jsxs3(AlertDialogContent, { children: [
|
|
23344
|
+
/* @__PURE__ */ jsx7(AlertDialogTitle, { children: "Rename project" }),
|
|
23345
|
+
/* @__PURE__ */ jsx7(AlertDialogDescription, { children: "This changes the display name only. The registered directory stays the same." }),
|
|
23346
|
+
/* @__PURE__ */ jsx7(Input$1, {
|
|
23347
|
+
value: renameProjectName,
|
|
23348
|
+
onChange: (event) => setRenameProjectName(event.target.value),
|
|
23349
|
+
"aria-label": "Project name",
|
|
23350
|
+
autoFocus: true
|
|
23351
|
+
}),
|
|
23352
|
+
/* @__PURE__ */ jsxs3(AlertDialogFooter, { children: [/* @__PURE__ */ jsx7(AlertDialogCancel, {
|
|
23353
|
+
onClick: onClose,
|
|
23354
|
+
children: "Cancel"
|
|
23355
|
+
}), /* @__PURE__ */ jsx7(AlertDialogAction, {
|
|
23356
|
+
disabled: !renameProjectName.trim() || !onRenameProject,
|
|
23357
|
+
onClick: () => {
|
|
23358
|
+
if (renameProjectName.trim()) {
|
|
23359
|
+
onRenameProject?.(project.projectId, renameProjectName.trim());
|
|
23360
|
+
onClose();
|
|
23361
|
+
}
|
|
23362
|
+
},
|
|
23363
|
+
children: "Rename"
|
|
23364
|
+
})] })
|
|
23365
|
+
] })
|
|
23366
|
+
});
|
|
23367
|
+
}
|
|
23368
|
+
function DeleteSessionDialog({ session, onClose, onDeleteSession }) {
|
|
23369
|
+
return /* @__PURE__ */ jsx7(AlertDialog$1, {
|
|
23370
|
+
open: true,
|
|
23371
|
+
onOpenChange: (open2) => !open2 && onClose(),
|
|
23372
|
+
children: /* @__PURE__ */ jsxs3(AlertDialogContent, { children: [
|
|
23373
|
+
/* @__PURE__ */ jsx7(AlertDialogTitle, { children: "Delete session?" }),
|
|
23374
|
+
/* @__PURE__ */ jsx7(AlertDialogDescription, { children: "This removes the Fleet Prime session and its managed session artifacts. This cannot be undone." }),
|
|
23375
|
+
/* @__PURE__ */ jsxs3(AlertDialogFooter, { children: [/* @__PURE__ */ jsx7(AlertDialogCancel, {
|
|
23376
|
+
onClick: onClose,
|
|
23377
|
+
children: "Cancel"
|
|
23378
|
+
}), /* @__PURE__ */ jsx7(AlertDialogAction, {
|
|
23379
|
+
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
23380
|
+
onClick: () => {
|
|
23381
|
+
onDeleteSession(session.sessionId);
|
|
23382
|
+
onClose();
|
|
23383
|
+
},
|
|
23384
|
+
children: "Delete"
|
|
23385
|
+
})] })
|
|
23386
|
+
] })
|
|
23387
|
+
});
|
|
23388
|
+
}
|
|
23389
|
+
function UnregisterProjectDialog({ project, onClose, onUnregisterProject }) {
|
|
23390
|
+
return /* @__PURE__ */ jsx7(AlertDialog$1, {
|
|
23391
|
+
open: true,
|
|
23392
|
+
onOpenChange: (open2) => !open2 && onClose(),
|
|
23393
|
+
children: /* @__PURE__ */ jsxs3(AlertDialogContent, { children: [
|
|
23394
|
+
/* @__PURE__ */ jsx7(AlertDialogTitle, { children: "Unregister project?" }),
|
|
23395
|
+
/* @__PURE__ */ jsx7(AlertDialogDescription, { children: "The directory and its sessions remain intact. Existing sessions will move to Unassigned until the directory is registered again." }),
|
|
23396
|
+
/* @__PURE__ */ jsxs3(AlertDialogFooter, { children: [/* @__PURE__ */ jsx7(AlertDialogCancel, {
|
|
23397
|
+
onClick: onClose,
|
|
23398
|
+
children: "Cancel"
|
|
23399
|
+
}), /* @__PURE__ */ jsx7(AlertDialogAction, {
|
|
23400
|
+
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
23401
|
+
onClick: () => {
|
|
23402
|
+
onUnregisterProject?.(project.projectId);
|
|
23403
|
+
onClose();
|
|
23404
|
+
},
|
|
23405
|
+
children: "Unregister"
|
|
23406
|
+
})] })
|
|
23407
|
+
] })
|
|
23408
|
+
});
|
|
23409
|
+
}
|
|
23410
|
+
function ForkSessionDialog({ session, projects, onClose, onForkSessionIntoProject }) {
|
|
23411
|
+
const initialProjectId = projects.find((project) => project.projectId !== session.projectId)?.projectId;
|
|
23412
|
+
const [forkProjectId, setForkProjectId] = useState23(initialProjectId);
|
|
23413
|
+
const forkProjectOptions = useMemo22(() => projects.flatMap((project) => project.projectId === session.projectId ? [] : [{
|
|
23282
23414
|
value: project.projectId,
|
|
23283
23415
|
label: `${project.name} \u2014 ${project.pathLabel}`,
|
|
23284
23416
|
icon: Folder
|
|
23285
|
-
}]), [
|
|
23286
|
-
return /* @__PURE__ */
|
|
23287
|
-
|
|
23288
|
-
|
|
23289
|
-
|
|
23290
|
-
|
|
23291
|
-
|
|
23292
|
-
/* @__PURE__ */ jsx7(
|
|
23293
|
-
/* @__PURE__ */ jsx7(
|
|
23294
|
-
|
|
23295
|
-
|
|
23296
|
-
|
|
23297
|
-
|
|
23298
|
-
|
|
23299
|
-
|
|
23300
|
-
|
|
23301
|
-
|
|
23302
|
-
if (renameTarget && renameTitle.trim()) {
|
|
23303
|
-
onRenameSession(renameTarget.sessionId, renameTitle.trim());
|
|
23304
|
-
setRenameTarget(null);
|
|
23305
|
-
}
|
|
23306
|
-
},
|
|
23307
|
-
children: "Rename"
|
|
23308
|
-
})] })
|
|
23309
|
-
] })
|
|
23310
|
-
}),
|
|
23311
|
-
/* @__PURE__ */ jsx7(AlertDialog$1, {
|
|
23312
|
-
open: renameProjectTarget !== null,
|
|
23313
|
-
onOpenChange: (open2) => !open2 && setRenameProjectTarget(null),
|
|
23314
|
-
children: /* @__PURE__ */ jsxs3(AlertDialogContent, { children: [
|
|
23315
|
-
/* @__PURE__ */ jsx7(AlertDialogTitle, { children: "Rename project" }),
|
|
23316
|
-
/* @__PURE__ */ jsx7(AlertDialogDescription, { children: "This changes the display name only. The registered directory stays the same." }),
|
|
23317
|
-
/* @__PURE__ */ jsx7(Input$1, {
|
|
23318
|
-
value: renameProjectName,
|
|
23319
|
-
onChange: (event) => setRenameProjectName(event.target.value),
|
|
23320
|
-
"aria-label": "Project name",
|
|
23321
|
-
autoFocus: true
|
|
23417
|
+
}]), [session.projectId, projects]);
|
|
23418
|
+
return /* @__PURE__ */ jsx7(Dialog$1, {
|
|
23419
|
+
open: true,
|
|
23420
|
+
onOpenChange: (open2) => !open2 && onClose(),
|
|
23421
|
+
children: /* @__PURE__ */ jsxs3(DialogContent, {
|
|
23422
|
+
className: "sm:max-w-md",
|
|
23423
|
+
children: [
|
|
23424
|
+
/* @__PURE__ */ jsxs3(DialogHeader, { children: [/* @__PURE__ */ jsx7(DialogTitle3, { children: "Fork session into project" }), /* @__PURE__ */ jsx7(DialogDescription3, { children: "Create a new Fleet Prime session in another registered project." })] }),
|
|
23425
|
+
/* @__PURE__ */ jsx7("div", {
|
|
23426
|
+
className: "py-2",
|
|
23427
|
+
children: /* @__PURE__ */ jsx7(Select$1, {
|
|
23428
|
+
value: forkProjectId ?? null,
|
|
23429
|
+
onValueChange: (value) => setForkProjectId(value),
|
|
23430
|
+
options: forkProjectOptions,
|
|
23431
|
+
placeholder: "Select a project\u2026",
|
|
23432
|
+
"aria-label": "Target project"
|
|
23433
|
+
})
|
|
23322
23434
|
}),
|
|
23323
|
-
/* @__PURE__ */ jsxs3(
|
|
23324
|
-
|
|
23325
|
-
|
|
23326
|
-
|
|
23327
|
-
|
|
23328
|
-
|
|
23329
|
-
|
|
23330
|
-
|
|
23331
|
-
children: "Rename"
|
|
23332
|
-
})] })
|
|
23333
|
-
] })
|
|
23334
|
-
}),
|
|
23335
|
-
/* @__PURE__ */ jsx7(AlertDialog$1, {
|
|
23336
|
-
open: deleteTarget !== null,
|
|
23337
|
-
onOpenChange: (open2) => !open2 && setDeleteTarget(null),
|
|
23338
|
-
children: /* @__PURE__ */ jsxs3(AlertDialogContent, { children: [
|
|
23339
|
-
/* @__PURE__ */ jsx7(AlertDialogTitle, { children: "Delete session?" }),
|
|
23340
|
-
/* @__PURE__ */ jsx7(AlertDialogDescription, { children: "This removes the Fleet Prime session and its managed session artifacts. This cannot be undone." }),
|
|
23341
|
-
/* @__PURE__ */ jsxs3(AlertDialogFooter, { children: [/* @__PURE__ */ jsx7(AlertDialogCancel, { children: "Cancel" }), /* @__PURE__ */ jsx7(AlertDialogAction, {
|
|
23342
|
-
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
23343
|
-
onClick: () => {
|
|
23344
|
-
if (deleteTarget) onDeleteSession(deleteTarget.sessionId);
|
|
23345
|
-
setDeleteTarget(null);
|
|
23346
|
-
},
|
|
23347
|
-
children: "Delete"
|
|
23348
|
-
})] })
|
|
23349
|
-
] })
|
|
23350
|
-
}),
|
|
23351
|
-
/* @__PURE__ */ jsx7(AlertDialog$1, {
|
|
23352
|
-
open: unregisterTarget !== null,
|
|
23353
|
-
onOpenChange: (open2) => !open2 && setUnregisterTarget(null),
|
|
23354
|
-
children: /* @__PURE__ */ jsxs3(AlertDialogContent, { children: [
|
|
23355
|
-
/* @__PURE__ */ jsx7(AlertDialogTitle, { children: "Unregister project?" }),
|
|
23356
|
-
/* @__PURE__ */ jsx7(AlertDialogDescription, { children: "The directory and its sessions remain intact. Existing sessions will move to Unassigned until the directory is registered again." }),
|
|
23357
|
-
/* @__PURE__ */ jsxs3(AlertDialogFooter, { children: [/* @__PURE__ */ jsx7(AlertDialogCancel, { children: "Cancel" }), /* @__PURE__ */ jsx7(AlertDialogAction, {
|
|
23358
|
-
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
23435
|
+
/* @__PURE__ */ jsxs3(DialogFooter, { children: [/* @__PURE__ */ jsx7(Button$1, {
|
|
23436
|
+
type: "button",
|
|
23437
|
+
variant: "outline",
|
|
23438
|
+
onClick: onClose,
|
|
23439
|
+
children: "Cancel"
|
|
23440
|
+
}), /* @__PURE__ */ jsx7(Button$1, {
|
|
23441
|
+
type: "button",
|
|
23442
|
+
disabled: !forkProjectId || !onForkSessionIntoProject,
|
|
23359
23443
|
onClick: () => {
|
|
23360
|
-
if (
|
|
23361
|
-
|
|
23444
|
+
if (!forkProjectId) return;
|
|
23445
|
+
onForkSessionIntoProject?.(session.sessionId, forkProjectId);
|
|
23446
|
+
onClose();
|
|
23362
23447
|
},
|
|
23363
|
-
children: "
|
|
23448
|
+
children: "Fork session"
|
|
23364
23449
|
})] })
|
|
23365
|
-
]
|
|
23366
|
-
}),
|
|
23367
|
-
/* @__PURE__ */ jsx7(Dialog$1, {
|
|
23368
|
-
open: forkTarget !== null,
|
|
23369
|
-
onOpenChange: (open2) => !open2 && setForkTarget(null),
|
|
23370
|
-
children: /* @__PURE__ */ jsxs3(DialogContent, {
|
|
23371
|
-
className: "sm:max-w-md",
|
|
23372
|
-
children: [
|
|
23373
|
-
/* @__PURE__ */ jsxs3(DialogHeader, { children: [/* @__PURE__ */ jsx7(DialogTitle3, { children: "Fork session into project" }), /* @__PURE__ */ jsx7(DialogDescription3, { children: "Create a new Fleet Prime session in another registered project." })] }),
|
|
23374
|
-
/* @__PURE__ */ jsx7("div", {
|
|
23375
|
-
className: "py-2",
|
|
23376
|
-
children: /* @__PURE__ */ jsx7(Select$1, {
|
|
23377
|
-
value: forkProjectId ?? null,
|
|
23378
|
-
onValueChange: (value) => setForkProjectId(value),
|
|
23379
|
-
options: forkProjectOptions,
|
|
23380
|
-
placeholder: "Select a project\u2026",
|
|
23381
|
-
"aria-label": "Target project"
|
|
23382
|
-
})
|
|
23383
|
-
}),
|
|
23384
|
-
/* @__PURE__ */ jsxs3(DialogFooter, { children: [/* @__PURE__ */ jsx7(Button$1, {
|
|
23385
|
-
type: "button",
|
|
23386
|
-
variant: "outline",
|
|
23387
|
-
onClick: () => setForkTarget(null),
|
|
23388
|
-
children: "Cancel"
|
|
23389
|
-
}), /* @__PURE__ */ jsx7(Button$1, {
|
|
23390
|
-
type: "button",
|
|
23391
|
-
disabled: !forkTarget || !forkProjectId || !onForkSessionIntoProject,
|
|
23392
|
-
onClick: () => {
|
|
23393
|
-
if (!forkTarget || !forkProjectId) return;
|
|
23394
|
-
onForkSessionIntoProject?.(forkTarget.sessionId, forkProjectId);
|
|
23395
|
-
setForkTarget(null);
|
|
23396
|
-
},
|
|
23397
|
-
children: "Fork session"
|
|
23398
|
-
})] })
|
|
23399
|
-
]
|
|
23400
|
-
})
|
|
23450
|
+
]
|
|
23401
23451
|
})
|
|
23402
|
-
|
|
23452
|
+
});
|
|
23453
|
+
}
|
|
23454
|
+
function SessionSidebarActionDialogs({ activeDialog, onClose, projects, onRenameSession, onDeleteSession, onRenameProject, onUnregisterProject, onForkSessionIntoProject }) {
|
|
23455
|
+
if (!activeDialog) return null;
|
|
23456
|
+
switch (activeDialog.kind) {
|
|
23457
|
+
case "rename-session":
|
|
23458
|
+
return /* @__PURE__ */ jsx7(RenameSessionDialog, {
|
|
23459
|
+
session: activeDialog.session,
|
|
23460
|
+
onClose,
|
|
23461
|
+
onRenameSession
|
|
23462
|
+
});
|
|
23463
|
+
case "rename-project":
|
|
23464
|
+
return /* @__PURE__ */ jsx7(RenameProjectDialog, {
|
|
23465
|
+
project: activeDialog.project,
|
|
23466
|
+
onClose,
|
|
23467
|
+
onRenameProject
|
|
23468
|
+
});
|
|
23469
|
+
case "delete-session":
|
|
23470
|
+
return /* @__PURE__ */ jsx7(DeleteSessionDialog, {
|
|
23471
|
+
session: activeDialog.session,
|
|
23472
|
+
onClose,
|
|
23473
|
+
onDeleteSession
|
|
23474
|
+
});
|
|
23475
|
+
case "unregister-project":
|
|
23476
|
+
return /* @__PURE__ */ jsx7(UnregisterProjectDialog, {
|
|
23477
|
+
project: activeDialog.project,
|
|
23478
|
+
onClose,
|
|
23479
|
+
onUnregisterProject
|
|
23480
|
+
});
|
|
23481
|
+
case "fork-session":
|
|
23482
|
+
return /* @__PURE__ */ jsx7(ForkSessionDialog, {
|
|
23483
|
+
session: activeDialog.session,
|
|
23484
|
+
projects,
|
|
23485
|
+
onClose,
|
|
23486
|
+
onForkSessionIntoProject
|
|
23487
|
+
});
|
|
23488
|
+
case "create-project":
|
|
23489
|
+
return null;
|
|
23490
|
+
}
|
|
23403
23491
|
}
|
|
23404
23492
|
var ROW_REVEAL = {
|
|
23405
23493
|
duration: 0.16,
|
|
@@ -24460,7 +24548,7 @@ function sessionStatusIcon(session) {
|
|
|
24460
24548
|
if (session?.status === "interrupted") return /* @__PURE__ */ jsx7(CircleStop, { className: "size-3.5 text-muted-foreground" });
|
|
24461
24549
|
return null;
|
|
24462
24550
|
}
|
|
24463
|
-
function SessionSidebarProjectList({ projectActionsOpen, setProjectActionsOpen, expandedProjectIds, setExpandedProjectIds,
|
|
24551
|
+
function SessionSidebarProjectList({ projectActionsOpen, setProjectActionsOpen, expandedProjectIds, setExpandedProjectIds, onOpenCreateProject, projects, projectSessions, sidebarItems, activeProjectId, activeSessionId, onNewSession, onNewSessionInProject, onProjectSelect, onRenameSession, onCreateProject, resumeResource, toggleProjectResource, renderMenu }) {
|
|
24464
24552
|
return /* @__PURE__ */ jsx7(AnimatedSidebarContent, {
|
|
24465
24553
|
className: "gap-0 px-2.5 pb-1 pt-2",
|
|
24466
24554
|
children: /* @__PURE__ */ jsxs3(AnimatedSidebarGroup, {
|
|
@@ -24492,7 +24580,7 @@ function SessionSidebarProjectList({ projectActionsOpen, setProjectActionsOpen,
|
|
|
24492
24580
|
type: "button",
|
|
24493
24581
|
onClick: () => {
|
|
24494
24582
|
setProjectActionsOpen(false);
|
|
24495
|
-
|
|
24583
|
+
onOpenCreateProject();
|
|
24496
24584
|
},
|
|
24497
24585
|
className: "flex h-8 w-full items-center gap-2 rounded-md px-2 text-xs outline-none hover:bg-muted focus-visible:bg-muted",
|
|
24498
24586
|
children: [/* @__PURE__ */ jsx7(FolderPlus, {
|
|
@@ -24515,7 +24603,7 @@ function SessionSidebarProjectList({ projectActionsOpen, setProjectActionsOpen,
|
|
|
24515
24603
|
type: "button",
|
|
24516
24604
|
"aria-label": "Add project",
|
|
24517
24605
|
title: "Add project",
|
|
24518
|
-
onClick:
|
|
24606
|
+
onClick: onOpenCreateProject,
|
|
24519
24607
|
className: cn(HIT_AREA_EXPAND_DENSE_CLASS, "inline-flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring"),
|
|
24520
24608
|
children: /* @__PURE__ */ jsx7(Plus, {
|
|
24521
24609
|
"aria-hidden": "true",
|
|
@@ -24534,7 +24622,7 @@ function SessionSidebarProjectList({ projectActionsOpen, setProjectActionsOpen,
|
|
|
24534
24622
|
id: "empty-project",
|
|
24535
24623
|
content: /* @__PURE__ */ jsx7(FolderPlus, { className: "size-5 text-muted-foreground" })
|
|
24536
24624
|
}],
|
|
24537
|
-
onClick:
|
|
24625
|
+
onClick: onOpenCreateProject,
|
|
24538
24626
|
ariaLabel: "Add a project",
|
|
24539
24627
|
className: "w-full"
|
|
24540
24628
|
})
|
|
@@ -24611,7 +24699,7 @@ function DiscordIcon({ className, ...props }) {
|
|
|
24611
24699
|
}
|
|
24612
24700
|
function fleetVersion() {
|
|
24613
24701
|
try {
|
|
24614
|
-
return "0.
|
|
24702
|
+
return "0.7.0";
|
|
24615
24703
|
} catch {
|
|
24616
24704
|
return "dev";
|
|
24617
24705
|
}
|
|
@@ -24767,7 +24855,7 @@ function KbdHint({ children }) {
|
|
|
24767
24855
|
children
|
|
24768
24856
|
});
|
|
24769
24857
|
}
|
|
24770
|
-
function SessionSidebarNavigation({ brandMenuOpen, setBrandMenuOpen, searchOpen, setSearchOpen, query, setQuery, projectActionsOpen, setProjectActionsOpen, expandedProjectIds, setExpandedProjectIds,
|
|
24858
|
+
function SessionSidebarNavigation({ brandMenuOpen, setBrandMenuOpen, searchOpen, setSearchOpen, query, setQuery, projectActionsOpen, setProjectActionsOpen, expandedProjectIds, setExpandedProjectIds, onOpenCreateProject, projects, projectSessions, sidebarItems, sortedProjects, projectById, activeProjectId, activeSessionId, onNewSession, onNewSessionInProject, onProjectSelect, onRenameSession, onCreateProject, onOpenSettings, accountMenu, resumeResource, toggleProjectResource, selectSearchResult, renderMenu }) {
|
|
24771
24859
|
const searchThreads = useMemo22(() => sortSessions(projectSessions).map((session) => ({
|
|
24772
24860
|
id: session.sessionId,
|
|
24773
24861
|
title: sessionLabel(session, projectSessions),
|
|
@@ -24812,7 +24900,7 @@ function SessionSidebarNavigation({ brandMenuOpen, setBrandMenuOpen, searchOpen,
|
|
|
24812
24900
|
label: "Add project",
|
|
24813
24901
|
onClick: () => {
|
|
24814
24902
|
setBrandMenuOpen(false);
|
|
24815
|
-
|
|
24903
|
+
onOpenCreateProject();
|
|
24816
24904
|
}
|
|
24817
24905
|
}) : null,
|
|
24818
24906
|
/* @__PURE__ */ jsx7(SidebarMenuItem, {
|
|
@@ -24926,7 +25014,7 @@ function SessionSidebarNavigation({ brandMenuOpen, setBrandMenuOpen, searchOpen,
|
|
|
24926
25014
|
setProjectActionsOpen,
|
|
24927
25015
|
expandedProjectIds,
|
|
24928
25016
|
setExpandedProjectIds,
|
|
24929
|
-
|
|
25017
|
+
onOpenCreateProject,
|
|
24930
25018
|
projects,
|
|
24931
25019
|
projectSessions,
|
|
24932
25020
|
sidebarItems,
|
|
@@ -25002,23 +25090,7 @@ function useSessionSidebarState(activeProjectId) {
|
|
|
25002
25090
|
query: "",
|
|
25003
25091
|
expandedProjectIds: readExpandedProjects(initialActiveProjectId),
|
|
25004
25092
|
revealedProjectIds: /* @__PURE__ */ new Set(),
|
|
25005
|
-
|
|
25006
|
-
renameTitle: "",
|
|
25007
|
-
renameProjectTarget: null,
|
|
25008
|
-
renameProjectName: "",
|
|
25009
|
-
deleteTarget: null,
|
|
25010
|
-
unregisterTarget: null,
|
|
25011
|
-
createOpen: false,
|
|
25012
|
-
createPath: "",
|
|
25013
|
-
createName: "",
|
|
25014
|
-
directoryToken: void 0,
|
|
25015
|
-
directoryBrowser: null,
|
|
25016
|
-
directoryBrowseLoading: false,
|
|
25017
|
-
directoryBrowseError: null,
|
|
25018
|
-
createSubmitting: false,
|
|
25019
|
-
createSubmitError: null,
|
|
25020
|
-
forkTarget: null,
|
|
25021
|
-
forkProjectId: void 0
|
|
25093
|
+
activeDialog: null
|
|
25022
25094
|
}));
|
|
25023
25095
|
const setField = useCallback12(function setSidebarField(key, value) {
|
|
25024
25096
|
dispatch({
|
|
@@ -25044,23 +25116,8 @@ function useSessionSidebarState(activeProjectId) {
|
|
|
25044
25116
|
const setQuery = useCallback12((value) => setField("query", value), [setField]);
|
|
25045
25117
|
const setExpandedProjectIds = useCallback12((value) => typeof value === "function" ? updateField("expandedProjectIds", value) : setField("expandedProjectIds", value), [setField, updateField]);
|
|
25046
25118
|
const setRevealedProjectIds = useCallback12((value) => typeof value === "function" ? updateField("revealedProjectIds", value) : setField("revealedProjectIds", value), [setField, updateField]);
|
|
25047
|
-
const
|
|
25048
|
-
const
|
|
25049
|
-
const setRenameProjectTarget = useCallback12((value) => setField("renameProjectTarget", value), [setField]);
|
|
25050
|
-
const setRenameProjectName = useCallback12((value) => setField("renameProjectName", value), [setField]);
|
|
25051
|
-
const setDeleteTarget = useCallback12((value) => setField("deleteTarget", value), [setField]);
|
|
25052
|
-
const setUnregisterTarget = useCallback12((value) => setField("unregisterTarget", value), [setField]);
|
|
25053
|
-
const setCreateOpen = useCallback12((value) => setField("createOpen", value), [setField]);
|
|
25054
|
-
const setCreatePath = useCallback12((value) => setField("createPath", value), [setField]);
|
|
25055
|
-
const setCreateName = useCallback12((value) => setField("createName", value), [setField]);
|
|
25056
|
-
const setDirectoryToken = useCallback12((value) => setField("directoryToken", value), [setField]);
|
|
25057
|
-
const setDirectoryBrowser = useCallback12((value) => setField("directoryBrowser", value), [setField]);
|
|
25058
|
-
const setDirectoryBrowseLoading = useCallback12((value) => setField("directoryBrowseLoading", value), [setField]);
|
|
25059
|
-
const setDirectoryBrowseError = useCallback12((value) => setField("directoryBrowseError", value), [setField]);
|
|
25060
|
-
const setCreateSubmitting = useCallback12((value) => setField("createSubmitting", value), [setField]);
|
|
25061
|
-
const setCreateSubmitError = useCallback12((value) => setField("createSubmitError", value), [setField]);
|
|
25062
|
-
const setForkTarget = useCallback12((value) => setField("forkTarget", value), [setField]);
|
|
25063
|
-
const setForkProjectId = useCallback12((value) => setField("forkProjectId", value), [setField]);
|
|
25119
|
+
const setActiveDialog = useCallback12((value) => setField("activeDialog", value), [setField]);
|
|
25120
|
+
const closeDialog = useCallback12(() => setField("activeDialog", null), [setField]);
|
|
25064
25121
|
return {
|
|
25065
25122
|
...state,
|
|
25066
25123
|
setBrandMenuOpen,
|
|
@@ -25069,23 +25126,8 @@ function useSessionSidebarState(activeProjectId) {
|
|
|
25069
25126
|
setQuery,
|
|
25070
25127
|
setExpandedProjectIds,
|
|
25071
25128
|
setRevealedProjectIds,
|
|
25072
|
-
|
|
25073
|
-
|
|
25074
|
-
setRenameProjectTarget,
|
|
25075
|
-
setRenameProjectName,
|
|
25076
|
-
setDeleteTarget,
|
|
25077
|
-
setUnregisterTarget,
|
|
25078
|
-
setCreateOpen,
|
|
25079
|
-
setCreatePath,
|
|
25080
|
-
setCreateName,
|
|
25081
|
-
setDirectoryToken,
|
|
25082
|
-
setDirectoryBrowser,
|
|
25083
|
-
setDirectoryBrowseLoading,
|
|
25084
|
-
setDirectoryBrowseError,
|
|
25085
|
-
setCreateSubmitting,
|
|
25086
|
-
setCreateSubmitError,
|
|
25087
|
-
setForkTarget,
|
|
25088
|
-
setForkProjectId
|
|
25129
|
+
setActiveDialog,
|
|
25130
|
+
closeDialog
|
|
25089
25131
|
};
|
|
25090
25132
|
}
|
|
25091
25133
|
var PANEL_ACTIONS = [
|
|
@@ -25113,42 +25155,7 @@ function MenuItem({ icon: Icon, label, destructive = false, onClick }) {
|
|
|
25113
25155
|
children: [/* @__PURE__ */ jsx7(Icon, { className: "size-3.5" }), label]
|
|
25114
25156
|
});
|
|
25115
25157
|
}
|
|
25116
|
-
function useSessionSidebarViewModel({ sessions, projects = EMPTY_PROJECTS, projectSessions = sessions, activeProjectId, activeSessionId, onNewSession, onNewSessionInProject, onProjectSelect, onResumeSession,
|
|
25117
|
-
const createOpenRef = useRef39(false);
|
|
25118
|
-
const loadDirectories = useCallback12(async (input) => {
|
|
25119
|
-
if (!onBrowseDirectories) return false;
|
|
25120
|
-
setDirectoryBrowseLoading(true);
|
|
25121
|
-
setDirectoryBrowseError(null);
|
|
25122
|
-
try {
|
|
25123
|
-
const response = await onBrowseDirectories(input);
|
|
25124
|
-
setDirectoryBrowser(response);
|
|
25125
|
-
setDirectoryToken(response.directoryToken);
|
|
25126
|
-
setCreatePath(response.pathLabel);
|
|
25127
|
-
return true;
|
|
25128
|
-
} catch (error2) {
|
|
25129
|
-
setDirectoryBrowseError(directoryErrorMessage(error2, "Could not browse this directory."));
|
|
25130
|
-
return false;
|
|
25131
|
-
} finally {
|
|
25132
|
-
setDirectoryBrowseLoading(false);
|
|
25133
|
-
}
|
|
25134
|
-
}, [
|
|
25135
|
-
onBrowseDirectories,
|
|
25136
|
-
setCreatePath,
|
|
25137
|
-
setDirectoryBrowseError,
|
|
25138
|
-
setDirectoryBrowseLoading,
|
|
25139
|
-
setDirectoryBrowser,
|
|
25140
|
-
setDirectoryToken
|
|
25141
|
-
]);
|
|
25142
|
-
useEffect8(() => {
|
|
25143
|
-
const opened = createOpen && !createOpenRef.current;
|
|
25144
|
-
createOpenRef.current = createOpen;
|
|
25145
|
-
if (!opened || !onBrowseDirectories) return;
|
|
25146
|
-
loadDirectories({});
|
|
25147
|
-
}, [
|
|
25148
|
-
createOpen,
|
|
25149
|
-
loadDirectories,
|
|
25150
|
-
onBrowseDirectories
|
|
25151
|
-
]);
|
|
25158
|
+
function useSessionSidebarViewModel({ sessions, projects = EMPTY_PROJECTS, projectSessions = sessions, activeProjectId, activeSessionId, onNewSession, onNewSessionInProject, onProjectSelect, onResumeSession, onForkSessionIntoProject, onOpenPanelAction, expandedProjectIds, revealedProjectIds, setExpandedProjectIds, setRevealedProjectIds, setSearchOpen, setActiveDialog }) {
|
|
25152
25159
|
const projectById = useMemo22(() => new Map(projects.map((project) => [project.projectId, project])), [projects]);
|
|
25153
25160
|
const sortedProjects = useMemo22(() => sortProjectsByActivity(projects, projectSessions), [projectSessions, projects]);
|
|
25154
25161
|
useEffect8(() => {
|
|
@@ -25233,203 +25240,173 @@ function useSessionSidebarViewModel({ sessions, projects = EMPTY_PROJECTS, proje
|
|
|
25233
25240
|
onNewSessionInProject,
|
|
25234
25241
|
onProjectSelect
|
|
25235
25242
|
]);
|
|
25236
|
-
const resumeResource = useCallback12((id) => {
|
|
25237
|
-
const toggleProjectId = idValue(id, "toggle:");
|
|
25238
|
-
if (toggleProjectId) {
|
|
25239
|
-
setRevealedProjectIds((current) => {
|
|
25240
|
-
const next = new Set(current);
|
|
25241
|
-
if (next.has(toggleProjectId)) next.delete(toggleProjectId);
|
|
25242
|
-
else next.add(toggleProjectId);
|
|
25243
|
-
return next;
|
|
25244
|
-
});
|
|
25245
|
-
return;
|
|
25246
|
-
}
|
|
25247
|
-
const newSessionProjectId = idValue(id, NEW_SESSION_PREFIX);
|
|
25248
|
-
if (newSessionProjectId) {
|
|
25249
|
-
openSessionInProject(newSessionProjectId);
|
|
25250
|
-
return;
|
|
25251
|
-
}
|
|
25252
|
-
const sessionId = idValue(id, SESSION_PREFIX);
|
|
25253
|
-
if (!sessionId) return;
|
|
25254
|
-
const session = projectSessions.find((entry) => entry.sessionId === sessionId);
|
|
25255
|
-
if (session) onResumeSession(session);
|
|
25256
|
-
}, [
|
|
25257
|
-
openSessionInProject,
|
|
25258
|
-
onResumeSession,
|
|
25259
|
-
projectSessions,
|
|
25260
|
-
setRevealedProjectIds
|
|
25261
|
-
]);
|
|
25262
|
-
const toggleProjectResource = useCallback12((id) => {
|
|
25263
|
-
setExpandedProjectIds((current) => current.includes(id) ? current.filter((entry) => entry !== id) : [...current, id]);
|
|
25264
|
-
}, [setExpandedProjectIds]);
|
|
25265
|
-
const selectSearchResult = useCallback12((value) => {
|
|
25266
|
-
const projectId = idValue(value, "search-project:");
|
|
25267
|
-
if (projectId) {
|
|
25268
|
-
const resourceId = projectResourceId(projectId);
|
|
25269
|
-
setExpandedProjectIds((current) => current.includes(resourceId) ? current : [...current, resourceId]);
|
|
25270
|
-
onProjectSelect?.(projectId);
|
|
25271
|
-
setSearchOpen(false);
|
|
25272
|
-
return;
|
|
25273
|
-
}
|
|
25274
|
-
const sessionId = idValue(value, "search-session:");
|
|
25275
|
-
const session = sessionId ? projectSessions.find((entry) => entry.sessionId === sessionId) : void 0;
|
|
25276
|
-
if (!session) return;
|
|
25277
|
-
if (session.projectId) {
|
|
25278
|
-
const resourceId = projectResourceId(session.projectId);
|
|
25279
|
-
setExpandedProjectIds((current) => current.includes(resourceId) ? current : [...current, resourceId]);
|
|
25280
|
-
}
|
|
25281
|
-
onResumeSession(session);
|
|
25282
|
-
setSearchOpen(false);
|
|
25283
|
-
}, [
|
|
25284
|
-
onProjectSelect,
|
|
25285
|
-
onResumeSession,
|
|
25286
|
-
projectSessions,
|
|
25287
|
-
setExpandedProjectIds,
|
|
25288
|
-
setSearchOpen
|
|
25289
|
-
]);
|
|
25290
|
-
const renderMenu = useCallback12((item, controls) => {
|
|
25291
|
-
const sessionId = idValue(item.id, SESSION_PREFIX);
|
|
25292
|
-
const projectId = idValue(item.id, "project:");
|
|
25293
|
-
if (sessionId) {
|
|
25294
|
-
const session = projectSessions.find((entry) => entry.sessionId === sessionId);
|
|
25295
|
-
if (!session) return null;
|
|
25296
|
-
const sessionProjectId = session.projectId ?? void 0;
|
|
25297
|
-
return /* @__PURE__ */ jsxs3(Fragment$1, { children: [
|
|
25298
|
-
/* @__PURE__ */ jsx7(MenuItem, {
|
|
25299
|
-
icon: Pencil,
|
|
25300
|
-
label: "Rename",
|
|
25301
|
-
onClick: () => {
|
|
25302
|
-
controls.close();
|
|
25303
|
-
setRenameTarget(session);
|
|
25304
|
-
setRenameTitle(sessionLabel(session));
|
|
25305
|
-
}
|
|
25306
|
-
}),
|
|
25307
|
-
onForkSessionIntoProject && projects.length > 1 ? /* @__PURE__ */ jsx7(MenuItem, {
|
|
25308
|
-
icon: FolderTree,
|
|
25309
|
-
label: "Fork into project",
|
|
25310
|
-
onClick: () => {
|
|
25311
|
-
controls.close();
|
|
25312
|
-
setForkTarget(session);
|
|
25313
|
-
setForkProjectId(projects.find((project) => project.projectId !== session.projectId)?.projectId);
|
|
25314
|
-
}
|
|
25315
|
-
}) : null,
|
|
25316
|
-
onOpenPanelAction && sessionProjectId ? /* @__PURE__ */ jsxs3(Fragment$1, { children: [/* @__PURE__ */ jsx7("div", { className: "my-1 border-t" }), PANEL_ACTIONS.map(([panel, label, Icon]) => /* @__PURE__ */ jsx7(MenuItem, {
|
|
25317
|
-
icon: Icon,
|
|
25318
|
-
label,
|
|
25319
|
-
onClick: () => {
|
|
25320
|
-
controls.close();
|
|
25321
|
-
onOpenPanelAction({
|
|
25322
|
-
panel,
|
|
25323
|
-
projectId: sessionProjectId,
|
|
25324
|
-
focus: true
|
|
25325
|
-
});
|
|
25326
|
-
}
|
|
25327
|
-
}, panel))] }) : null,
|
|
25328
|
-
/* @__PURE__ */ jsx7(MenuItem, {
|
|
25329
|
-
icon: Trash,
|
|
25330
|
-
label: "Delete",
|
|
25331
|
-
destructive: true,
|
|
25332
|
-
onClick: () => {
|
|
25333
|
-
controls.close();
|
|
25334
|
-
setDeleteTarget(session);
|
|
25335
|
-
}
|
|
25336
|
-
})
|
|
25337
|
-
] });
|
|
25338
|
-
}
|
|
25339
|
-
if (projectId && projectId !== "unassigned") {
|
|
25340
|
-
const project = projectById.get(projectId);
|
|
25341
|
-
if (!project) return null;
|
|
25342
|
-
return /* @__PURE__ */ jsxs3(Fragment$1, { children: [
|
|
25343
|
-
/* @__PURE__ */ jsx7(MenuItem, {
|
|
25344
|
-
icon: Pencil,
|
|
25345
|
-
label: "Rename project",
|
|
25346
|
-
onClick: () => {
|
|
25347
|
-
controls.close();
|
|
25348
|
-
setRenameProjectTarget(project);
|
|
25349
|
-
setRenameProjectName(project.name);
|
|
25350
|
-
}
|
|
25351
|
-
}),
|
|
25352
|
-
/* @__PURE__ */ jsx7(MenuItem, {
|
|
25353
|
-
icon: Unplug,
|
|
25354
|
-
label: "Unregister project",
|
|
25355
|
-
destructive: true,
|
|
25356
|
-
onClick: () => {
|
|
25357
|
-
controls.close();
|
|
25358
|
-
setUnregisterTarget(project);
|
|
25359
|
-
}
|
|
25360
|
-
}),
|
|
25361
|
-
onOpenPanelAction ? /* @__PURE__ */ jsxs3(Fragment$1, { children: [/* @__PURE__ */ jsx7("div", { className: "my-1 border-t" }), PANEL_ACTIONS.map(([panel, label, Icon]) => /* @__PURE__ */ jsx7(MenuItem, {
|
|
25362
|
-
icon: Icon,
|
|
25363
|
-
label,
|
|
25364
|
-
onClick: () => {
|
|
25365
|
-
controls.close();
|
|
25366
|
-
onOpenPanelAction({
|
|
25367
|
-
panel,
|
|
25368
|
-
projectId,
|
|
25369
|
-
focus: true
|
|
25370
|
-
});
|
|
25371
|
-
}
|
|
25372
|
-
}, panel))] }) : null
|
|
25373
|
-
] });
|
|
25374
|
-
}
|
|
25375
|
-
return null;
|
|
25376
|
-
}, [
|
|
25377
|
-
onForkSessionIntoProject,
|
|
25378
|
-
onOpenPanelAction,
|
|
25379
|
-
projectById,
|
|
25380
|
-
projectSessions,
|
|
25381
|
-
projects,
|
|
25382
|
-
setDeleteTarget,
|
|
25383
|
-
setForkProjectId,
|
|
25384
|
-
setForkTarget,
|
|
25385
|
-
setRenameProjectName,
|
|
25386
|
-
setRenameProjectTarget,
|
|
25387
|
-
setRenameTarget,
|
|
25388
|
-
setRenameTitle,
|
|
25389
|
-
setUnregisterTarget
|
|
25390
|
-
]);
|
|
25391
|
-
const submitCreate = async () => {
|
|
25392
|
-
const path = createPath.trim();
|
|
25393
|
-
if (!onCreateProject || !path && !directoryToken) return;
|
|
25394
|
-
setCreateSubmitting(true);
|
|
25395
|
-
setCreateSubmitError(null);
|
|
25396
|
-
try {
|
|
25397
|
-
await onCreateProject({
|
|
25398
|
-
path: directoryToken ? void 0 : path,
|
|
25399
|
-
directoryToken,
|
|
25400
|
-
name: createName.trim() || void 0
|
|
25401
|
-
});
|
|
25402
|
-
setCreateOpen(false);
|
|
25403
|
-
setCreatePath("");
|
|
25404
|
-
setCreateName("");
|
|
25405
|
-
setDirectoryToken(void 0);
|
|
25406
|
-
setDirectoryBrowser(null);
|
|
25407
|
-
setDirectoryBrowseError(null);
|
|
25408
|
-
} catch (error2) {
|
|
25409
|
-
setCreateSubmitError(directoryErrorMessage(error2, "Could not add this project."));
|
|
25410
|
-
} finally {
|
|
25411
|
-
setCreateSubmitting(false);
|
|
25412
|
-
}
|
|
25413
|
-
};
|
|
25414
25243
|
return {
|
|
25415
|
-
loadDirectories,
|
|
25416
25244
|
projectById,
|
|
25417
25245
|
sortedProjects,
|
|
25418
25246
|
sidebarItems,
|
|
25419
|
-
resumeResource
|
|
25420
|
-
|
|
25421
|
-
|
|
25422
|
-
|
|
25423
|
-
|
|
25247
|
+
resumeResource: useCallback12((id) => {
|
|
25248
|
+
const toggleProjectId = idValue(id, "toggle:");
|
|
25249
|
+
if (toggleProjectId) {
|
|
25250
|
+
setRevealedProjectIds((current) => {
|
|
25251
|
+
const next = new Set(current);
|
|
25252
|
+
if (next.has(toggleProjectId)) next.delete(toggleProjectId);
|
|
25253
|
+
else next.add(toggleProjectId);
|
|
25254
|
+
return next;
|
|
25255
|
+
});
|
|
25256
|
+
return;
|
|
25257
|
+
}
|
|
25258
|
+
const newSessionProjectId = idValue(id, NEW_SESSION_PREFIX);
|
|
25259
|
+
if (newSessionProjectId) {
|
|
25260
|
+
openSessionInProject(newSessionProjectId);
|
|
25261
|
+
return;
|
|
25262
|
+
}
|
|
25263
|
+
const sessionId = idValue(id, SESSION_PREFIX);
|
|
25264
|
+
if (!sessionId) return;
|
|
25265
|
+
const session = projectSessions.find((entry) => entry.sessionId === sessionId);
|
|
25266
|
+
if (session) onResumeSession(session);
|
|
25267
|
+
}, [
|
|
25268
|
+
openSessionInProject,
|
|
25269
|
+
onResumeSession,
|
|
25270
|
+
projectSessions,
|
|
25271
|
+
setRevealedProjectIds
|
|
25272
|
+
]),
|
|
25273
|
+
toggleProjectResource: useCallback12((id) => {
|
|
25274
|
+
setExpandedProjectIds((current) => current.includes(id) ? current.filter((entry) => entry !== id) : [...current, id]);
|
|
25275
|
+
}, [setExpandedProjectIds]),
|
|
25276
|
+
selectSearchResult: useCallback12((value) => {
|
|
25277
|
+
const projectId = idValue(value, "search-project:");
|
|
25278
|
+
if (projectId) {
|
|
25279
|
+
const resourceId = projectResourceId(projectId);
|
|
25280
|
+
setExpandedProjectIds((current) => current.includes(resourceId) ? current : [...current, resourceId]);
|
|
25281
|
+
onProjectSelect?.(projectId);
|
|
25282
|
+
setSearchOpen(false);
|
|
25283
|
+
return;
|
|
25284
|
+
}
|
|
25285
|
+
const sessionId = idValue(value, "search-session:");
|
|
25286
|
+
const session = sessionId ? projectSessions.find((entry) => entry.sessionId === sessionId) : void 0;
|
|
25287
|
+
if (!session) return;
|
|
25288
|
+
if (session.projectId) {
|
|
25289
|
+
const resourceId = projectResourceId(session.projectId);
|
|
25290
|
+
setExpandedProjectIds((current) => current.includes(resourceId) ? current : [...current, resourceId]);
|
|
25291
|
+
}
|
|
25292
|
+
onResumeSession(session);
|
|
25293
|
+
setSearchOpen(false);
|
|
25294
|
+
}, [
|
|
25295
|
+
onProjectSelect,
|
|
25296
|
+
onResumeSession,
|
|
25297
|
+
projectSessions,
|
|
25298
|
+
setExpandedProjectIds,
|
|
25299
|
+
setSearchOpen
|
|
25300
|
+
]),
|
|
25301
|
+
renderMenu: useCallback12((item, controls) => {
|
|
25302
|
+
const sessionId = idValue(item.id, SESSION_PREFIX);
|
|
25303
|
+
const projectId = idValue(item.id, "project:");
|
|
25304
|
+
if (sessionId) {
|
|
25305
|
+
const session = projectSessions.find((entry) => entry.sessionId === sessionId);
|
|
25306
|
+
if (!session) return null;
|
|
25307
|
+
const sessionProjectId = session.projectId ?? void 0;
|
|
25308
|
+
return /* @__PURE__ */ jsxs3(Fragment$1, { children: [
|
|
25309
|
+
/* @__PURE__ */ jsx7(MenuItem, {
|
|
25310
|
+
icon: Pencil,
|
|
25311
|
+
label: "Rename",
|
|
25312
|
+
onClick: () => {
|
|
25313
|
+
controls.close();
|
|
25314
|
+
setActiveDialog({
|
|
25315
|
+
kind: "rename-session",
|
|
25316
|
+
session
|
|
25317
|
+
});
|
|
25318
|
+
}
|
|
25319
|
+
}),
|
|
25320
|
+
onForkSessionIntoProject && projects.length > 1 ? /* @__PURE__ */ jsx7(MenuItem, {
|
|
25321
|
+
icon: FolderTree,
|
|
25322
|
+
label: "Fork into project",
|
|
25323
|
+
onClick: () => {
|
|
25324
|
+
controls.close();
|
|
25325
|
+
setActiveDialog({
|
|
25326
|
+
kind: "fork-session",
|
|
25327
|
+
session
|
|
25328
|
+
});
|
|
25329
|
+
}
|
|
25330
|
+
}) : null,
|
|
25331
|
+
onOpenPanelAction && sessionProjectId ? /* @__PURE__ */ jsxs3(Fragment$1, { children: [/* @__PURE__ */ jsx7("div", { className: "my-1 border-t" }), PANEL_ACTIONS.map(([panel, label, Icon]) => /* @__PURE__ */ jsx7(MenuItem, {
|
|
25332
|
+
icon: Icon,
|
|
25333
|
+
label,
|
|
25334
|
+
onClick: () => {
|
|
25335
|
+
controls.close();
|
|
25336
|
+
onOpenPanelAction({
|
|
25337
|
+
panel,
|
|
25338
|
+
projectId: sessionProjectId,
|
|
25339
|
+
focus: true
|
|
25340
|
+
});
|
|
25341
|
+
}
|
|
25342
|
+
}, panel))] }) : null,
|
|
25343
|
+
/* @__PURE__ */ jsx7(MenuItem, {
|
|
25344
|
+
icon: Trash,
|
|
25345
|
+
label: "Delete",
|
|
25346
|
+
destructive: true,
|
|
25347
|
+
onClick: () => {
|
|
25348
|
+
controls.close();
|
|
25349
|
+
setActiveDialog({
|
|
25350
|
+
kind: "delete-session",
|
|
25351
|
+
session
|
|
25352
|
+
});
|
|
25353
|
+
}
|
|
25354
|
+
})
|
|
25355
|
+
] });
|
|
25356
|
+
}
|
|
25357
|
+
if (projectId && projectId !== "unassigned") {
|
|
25358
|
+
const project = projectById.get(projectId);
|
|
25359
|
+
if (!project) return null;
|
|
25360
|
+
return /* @__PURE__ */ jsxs3(Fragment$1, { children: [
|
|
25361
|
+
/* @__PURE__ */ jsx7(MenuItem, {
|
|
25362
|
+
icon: Pencil,
|
|
25363
|
+
label: "Rename project",
|
|
25364
|
+
onClick: () => {
|
|
25365
|
+
controls.close();
|
|
25366
|
+
setActiveDialog({
|
|
25367
|
+
kind: "rename-project",
|
|
25368
|
+
project
|
|
25369
|
+
});
|
|
25370
|
+
}
|
|
25371
|
+
}),
|
|
25372
|
+
/* @__PURE__ */ jsx7(MenuItem, {
|
|
25373
|
+
icon: Unplug,
|
|
25374
|
+
label: "Unregister project",
|
|
25375
|
+
destructive: true,
|
|
25376
|
+
onClick: () => {
|
|
25377
|
+
controls.close();
|
|
25378
|
+
setActiveDialog({
|
|
25379
|
+
kind: "unregister-project",
|
|
25380
|
+
project
|
|
25381
|
+
});
|
|
25382
|
+
}
|
|
25383
|
+
}),
|
|
25384
|
+
onOpenPanelAction ? /* @__PURE__ */ jsxs3(Fragment$1, { children: [/* @__PURE__ */ jsx7("div", { className: "my-1 border-t" }), PANEL_ACTIONS.map(([panel, label, Icon]) => /* @__PURE__ */ jsx7(MenuItem, {
|
|
25385
|
+
icon: Icon,
|
|
25386
|
+
label,
|
|
25387
|
+
onClick: () => {
|
|
25388
|
+
controls.close();
|
|
25389
|
+
onOpenPanelAction({
|
|
25390
|
+
panel,
|
|
25391
|
+
projectId,
|
|
25392
|
+
focus: true
|
|
25393
|
+
});
|
|
25394
|
+
}
|
|
25395
|
+
}, panel))] }) : null
|
|
25396
|
+
] });
|
|
25397
|
+
}
|
|
25398
|
+
return null;
|
|
25399
|
+
}, [
|
|
25400
|
+
onForkSessionIntoProject,
|
|
25401
|
+
onOpenPanelAction,
|
|
25402
|
+
projectById,
|
|
25403
|
+
projectSessions,
|
|
25404
|
+
projects.length,
|
|
25405
|
+
setActiveDialog
|
|
25406
|
+
])
|
|
25424
25407
|
};
|
|
25425
25408
|
}
|
|
25426
|
-
var LazySessionSidebarCreateDialog = lazy2(() => import("./create-project-dialog-
|
|
25427
|
-
function SessionSidebarDialogs(props) {
|
|
25428
|
-
return /* @__PURE__ */ jsxs3(Fragment$1, { children: [props.createOpen ? /* @__PURE__ */ jsx7(Suspense2, {
|
|
25429
|
-
fallback: null,
|
|
25430
|
-
children: /* @__PURE__ */ jsx7(LazySessionSidebarCreateDialog, { ...props })
|
|
25431
|
-
}) : null, /* @__PURE__ */ jsx7(SessionSidebarActionDialogs, { ...props })] });
|
|
25432
|
-
}
|
|
25409
|
+
var LazySessionSidebarCreateDialog = lazy2(() => import("./create-project-dialog-CReZdM5g-2V7C5J67.js").then(({ SessionSidebarCreateDialog }) => ({ default: SessionSidebarCreateDialog })));
|
|
25433
25410
|
function SessionSidebar({ data, sessionActions, projectActions = {}, navigationActions = {}, slots = {} }) {
|
|
25434
25411
|
const { sessions, projects = EMPTY_PROJECTS, projectSessions = sessions, activeProjectId, activeSessionId } = data;
|
|
25435
25412
|
const { onNewSession, onNewSessionInProject, onResumeSession, onRenameSession, onDeleteSession } = sessionActions;
|
|
@@ -25437,7 +25414,7 @@ function SessionSidebar({ data, sessionActions, projectActions = {}, navigationA
|
|
|
25437
25414
|
const { onOpenPanelAction, onBrowseDirectories, onOpenSettings } = navigationActions;
|
|
25438
25415
|
const { accountMenu } = slots;
|
|
25439
25416
|
const state = useSessionSidebarState(activeProjectId);
|
|
25440
|
-
const {
|
|
25417
|
+
const { projectById, sortedProjects, sidebarItems, resumeResource, toggleProjectResource, selectSearchResult, renderMenu } = useSessionSidebarViewModel({
|
|
25441
25418
|
sessions,
|
|
25442
25419
|
projects,
|
|
25443
25420
|
projectSessions,
|
|
@@ -25447,112 +25424,74 @@ function SessionSidebar({ data, sessionActions, projectActions = {}, navigationA
|
|
|
25447
25424
|
onNewSessionInProject,
|
|
25448
25425
|
onProjectSelect,
|
|
25449
25426
|
onResumeSession,
|
|
25450
|
-
onCreateProject,
|
|
25451
25427
|
onForkSessionIntoProject,
|
|
25452
25428
|
onOpenPanelAction,
|
|
25453
|
-
onBrowseDirectories,
|
|
25454
|
-
createOpen: state.createOpen,
|
|
25455
25429
|
expandedProjectIds: state.expandedProjectIds,
|
|
25456
25430
|
revealedProjectIds: state.revealedProjectIds,
|
|
25457
25431
|
setExpandedProjectIds: state.setExpandedProjectIds,
|
|
25458
25432
|
setRevealedProjectIds: state.setRevealedProjectIds,
|
|
25459
25433
|
setSearchOpen: state.setSearchOpen,
|
|
25460
|
-
|
|
25461
|
-
|
|
25462
|
-
|
|
25463
|
-
|
|
25464
|
-
|
|
25465
|
-
|
|
25466
|
-
|
|
25467
|
-
|
|
25468
|
-
|
|
25469
|
-
|
|
25470
|
-
|
|
25471
|
-
|
|
25472
|
-
|
|
25473
|
-
|
|
25474
|
-
|
|
25475
|
-
|
|
25476
|
-
|
|
25477
|
-
|
|
25478
|
-
|
|
25479
|
-
|
|
25480
|
-
|
|
25481
|
-
|
|
25482
|
-
|
|
25483
|
-
|
|
25484
|
-
|
|
25485
|
-
|
|
25486
|
-
|
|
25487
|
-
|
|
25488
|
-
|
|
25489
|
-
|
|
25490
|
-
|
|
25491
|
-
|
|
25492
|
-
|
|
25493
|
-
|
|
25494
|
-
|
|
25495
|
-
|
|
25496
|
-
|
|
25497
|
-
|
|
25498
|
-
|
|
25499
|
-
|
|
25500
|
-
|
|
25501
|
-
|
|
25502
|
-
|
|
25503
|
-
|
|
25504
|
-
|
|
25505
|
-
|
|
25506
|
-
|
|
25507
|
-
|
|
25508
|
-
|
|
25509
|
-
|
|
25510
|
-
|
|
25511
|
-
|
|
25512
|
-
|
|
25513
|
-
|
|
25514
|
-
|
|
25515
|
-
|
|
25516
|
-
|
|
25517
|
-
|
|
25518
|
-
|
|
25519
|
-
createOpen: state.createOpen,
|
|
25520
|
-
setCreateOpen: state.setCreateOpen,
|
|
25521
|
-
directoryBrowser: state.directoryBrowser,
|
|
25522
|
-
setDirectoryBrowser: state.setDirectoryBrowser,
|
|
25523
|
-
directoryBrowseLoading: state.directoryBrowseLoading,
|
|
25524
|
-
directoryBrowseError: state.directoryBrowseError,
|
|
25525
|
-
setDirectoryBrowseError: state.setDirectoryBrowseError,
|
|
25526
|
-
directoryToken: state.directoryToken,
|
|
25527
|
-
setDirectoryToken: state.setDirectoryToken,
|
|
25528
|
-
createName: state.createName,
|
|
25529
|
-
setCreateName: state.setCreateName,
|
|
25530
|
-
createPath: state.createPath,
|
|
25531
|
-
setCreatePath: state.setCreatePath,
|
|
25532
|
-
renameTarget: state.renameTarget,
|
|
25533
|
-
setRenameTarget: state.setRenameTarget,
|
|
25534
|
-
renameTitle: state.renameTitle,
|
|
25535
|
-
setRenameTitle: state.setRenameTitle,
|
|
25536
|
-
renameProjectTarget: state.renameProjectTarget,
|
|
25537
|
-
setRenameProjectTarget: state.setRenameProjectTarget,
|
|
25538
|
-
renameProjectName: state.renameProjectName,
|
|
25539
|
-
setRenameProjectName: state.setRenameProjectName,
|
|
25540
|
-
deleteTarget: state.deleteTarget,
|
|
25541
|
-
setDeleteTarget: state.setDeleteTarget,
|
|
25542
|
-
unregisterTarget: state.unregisterTarget,
|
|
25543
|
-
setUnregisterTarget: state.setUnregisterTarget,
|
|
25544
|
-
forkTarget: state.forkTarget,
|
|
25545
|
-
setForkTarget: state.setForkTarget,
|
|
25546
|
-
forkProjectId: state.forkProjectId,
|
|
25547
|
-
setForkProjectId: state.setForkProjectId,
|
|
25548
|
-
createSubmitting: state.createSubmitting,
|
|
25549
|
-
createSubmitError: state.createSubmitError,
|
|
25550
|
-
setCreateSubmitError: state.setCreateSubmitError,
|
|
25551
|
-
loadDirectories,
|
|
25552
|
-
submitCreate
|
|
25553
|
-
})] });
|
|
25434
|
+
setActiveDialog: state.setActiveDialog
|
|
25435
|
+
});
|
|
25436
|
+
const setActiveDialog = state.setActiveDialog;
|
|
25437
|
+
const handleOpenCreateProject = useCallback12(() => {
|
|
25438
|
+
setActiveDialog({ kind: "create-project" });
|
|
25439
|
+
}, [setActiveDialog]);
|
|
25440
|
+
const isCreateOpen = state.activeDialog?.kind === "create-project";
|
|
25441
|
+
return /* @__PURE__ */ jsxs3(Fragment$1, { children: [
|
|
25442
|
+
/* @__PURE__ */ jsx7(SessionSidebarNavigation, {
|
|
25443
|
+
brandMenuOpen: state.brandMenuOpen,
|
|
25444
|
+
setBrandMenuOpen: state.setBrandMenuOpen,
|
|
25445
|
+
searchOpen: state.searchOpen,
|
|
25446
|
+
setSearchOpen: state.setSearchOpen,
|
|
25447
|
+
query: state.query,
|
|
25448
|
+
setQuery: state.setQuery,
|
|
25449
|
+
projectActionsOpen: state.projectActionsOpen,
|
|
25450
|
+
setProjectActionsOpen: state.setProjectActionsOpen,
|
|
25451
|
+
expandedProjectIds: state.expandedProjectIds,
|
|
25452
|
+
setExpandedProjectIds: state.setExpandedProjectIds,
|
|
25453
|
+
onOpenCreateProject: handleOpenCreateProject,
|
|
25454
|
+
projects,
|
|
25455
|
+
projectSessions,
|
|
25456
|
+
sidebarItems,
|
|
25457
|
+
sortedProjects,
|
|
25458
|
+
projectById,
|
|
25459
|
+
activeProjectId,
|
|
25460
|
+
activeSessionId,
|
|
25461
|
+
onNewSession,
|
|
25462
|
+
onNewSessionInProject,
|
|
25463
|
+
onProjectSelect,
|
|
25464
|
+
onRenameSession,
|
|
25465
|
+
onCreateProject,
|
|
25466
|
+
onOpenSettings,
|
|
25467
|
+
accountMenu,
|
|
25468
|
+
resumeResource,
|
|
25469
|
+
toggleProjectResource,
|
|
25470
|
+
selectSearchResult,
|
|
25471
|
+
renderMenu
|
|
25472
|
+
}),
|
|
25473
|
+
isCreateOpen ? /* @__PURE__ */ jsx7(Suspense2, {
|
|
25474
|
+
fallback: null,
|
|
25475
|
+
children: /* @__PURE__ */ jsx7(LazySessionSidebarCreateDialog, {
|
|
25476
|
+
open: isCreateOpen,
|
|
25477
|
+
onClose: state.closeDialog,
|
|
25478
|
+
onBrowseDirectories,
|
|
25479
|
+
onCreateProject
|
|
25480
|
+
})
|
|
25481
|
+
}) : null,
|
|
25482
|
+
/* @__PURE__ */ jsx7(SessionSidebarActionDialogs, {
|
|
25483
|
+
activeDialog: state.activeDialog,
|
|
25484
|
+
onClose: state.closeDialog,
|
|
25485
|
+
projects,
|
|
25486
|
+
onRenameSession,
|
|
25487
|
+
onDeleteSession,
|
|
25488
|
+
onRenameProject,
|
|
25489
|
+
onUnregisterProject,
|
|
25490
|
+
onForkSessionIntoProject
|
|
25491
|
+
})
|
|
25492
|
+
] });
|
|
25554
25493
|
}
|
|
25555
|
-
var LazySubagentChatPanel = lazy2(() => import("./subagent-chat-panel-
|
|
25494
|
+
var LazySubagentChatPanel = lazy2(() => import("./subagent-chat-panel-B0pmAxCp-DKXNAOUU.js").then(({ SubagentChatPanel }) => ({ default: SubagentChatPanel })));
|
|
25556
25495
|
function ChatWorkspaceShell() {
|
|
25557
25496
|
const { session, conversation, composer, panels, dialogs, chrome, agentTabs } = useChatWorkspaceData();
|
|
25558
25497
|
const toggleCommandPalette = useCallback12(() => {
|
|
@@ -25746,6 +25685,7 @@ function ChatWorkspaceShell() {
|
|
|
25746
25685
|
panel: /* @__PURE__ */ jsx7(UiErrorBoundary, { children: /* @__PURE__ */ jsx7(RightPanelShell, {
|
|
25747
25686
|
handleResourceCanvasResizeStart: panels.handleResourceCanvasResizeStart,
|
|
25748
25687
|
onClose: closeRightPanel,
|
|
25688
|
+
onResourceCanvasWidthChange: panels.handleResourceCanvasWidthChange,
|
|
25749
25689
|
resourceCanvasWidth: panels.resourceCanvasWidth
|
|
25750
25690
|
}) }),
|
|
25751
25691
|
children: /* @__PURE__ */ jsx7("div", {
|
|
@@ -25834,6 +25774,7 @@ export {
|
|
|
25834
25774
|
rlmStatusIcon,
|
|
25835
25775
|
RIGHT_PANEL_LAUNCHER_DEFINITIONS,
|
|
25836
25776
|
pathEntryLabel,
|
|
25777
|
+
directoryErrorMessage,
|
|
25837
25778
|
AlertDialog$1,
|
|
25838
25779
|
AlertDialogContent,
|
|
25839
25780
|
AlertDialogTitle,
|