ds-harness-remote 0.4.5 → 0.4.7
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/README.md +18 -31
- package/dist/client-runtime.d.ts +1 -0
- package/dist/client-runtime.d.ts.map +1 -1
- package/dist/client-runtime.js +34 -2
- package/dist/client-runtime.js.map +1 -1
- package/dist/client.github.js +130 -79
- package/dist/client.js +130 -79
- package/dist/client.js.map +1 -1
- package/dist/codex/domain.d.ts +1 -0
- package/dist/codex/domain.d.ts.map +1 -1
- package/dist/codex/domain.js +51 -20
- package/dist/codex/domain.js.map +1 -1
- package/dist/codex/method-policy.d.ts +24 -1
- package/dist/codex/method-policy.d.ts.map +1 -1
- package/dist/codex/method-policy.js +8 -0
- package/dist/codex/method-policy.js.map +1 -1
- package/dist/codex/virtual-harness.d.ts +1 -0
- package/dist/codex/virtual-harness.d.ts.map +1 -1
- package/dist/codex/virtual-harness.js +53 -11
- package/dist/codex/virtual-harness.js.map +1 -1
- package/dist/harness-api-bridge.d.ts +2 -0
- package/dist/harness-api-bridge.d.ts.map +1 -1
- package/dist/harness-api-bridge.js +34 -6
- package/dist/harness-api-bridge.js.map +1 -1
- package/dist/harness-remote-bridge.d.ts +2 -1
- package/dist/harness-remote-bridge.d.ts.map +1 -1
- package/dist/harness-remote-bridge.js +51 -2
- package/dist/harness-remote-bridge.js.map +1 -1
- package/dist/index.js +295 -81
- package/dist/index.js.map +3 -3
- package/dist/remote-typert-gateway.js +2 -2
- package/dist/remote-typert-gateway.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dsh-plugin.json +1 -1
- package/package.json +15 -9
package/dist/client.github.js
CHANGED
|
@@ -1849,6 +1849,11 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
1849
1849
|
activeRemote: "{name}",
|
|
1850
1850
|
exitRemote: "Exit",
|
|
1851
1851
|
addRemoteWorkspace: "Add remote workspace",
|
|
1852
|
+
addCodexWorkspace: "Add CodeX workspace",
|
|
1853
|
+
noCodexWorkspaces: "No CodeX workspaces yet.",
|
|
1854
|
+
cancelAddWorkspace: "Cancel",
|
|
1855
|
+
confirmAddWorkspace: "Add and open",
|
|
1856
|
+
showAllCodexWorkspaces: "Show all CodeX workspaces",
|
|
1852
1857
|
remoteModeLabel: "Remote mode \xB7 {name}",
|
|
1853
1858
|
remoteNetworkP2p: "P2P",
|
|
1854
1859
|
remoteNetworkTurn: "TURN",
|
|
@@ -2052,6 +2057,11 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2052
2057
|
activeRemote: "{name}",
|
|
2053
2058
|
exitRemote: "\u9000\u51FA",
|
|
2054
2059
|
addRemoteWorkspace: "\u6DFB\u52A0\u8FDC\u7A0B\u5DE5\u4F5C\u533A",
|
|
2060
|
+
addCodexWorkspace: "\u6DFB\u52A0 CodeX \u5DE5\u4F5C\u533A",
|
|
2061
|
+
noCodexWorkspaces: "\u8FD8\u6CA1\u6709 CodeX \u5DE5\u4F5C\u533A\u3002",
|
|
2062
|
+
cancelAddWorkspace: "\u53D6\u6D88",
|
|
2063
|
+
confirmAddWorkspace: "\u786E\u8BA4\u5E76\u6253\u5F00",
|
|
2064
|
+
showAllCodexWorkspaces: "\u663E\u793A\u5168\u90E8 CodeX \u5DE5\u4F5C\u533A",
|
|
2055
2065
|
remoteModeLabel: "\u8FDC\u7A0B\u6A21\u5F0F \xB7 {name}",
|
|
2056
2066
|
remoteNetworkP2p: "P2P",
|
|
2057
2067
|
remoteNetworkTurn: "TURN",
|
|
@@ -2545,7 +2555,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2545
2555
|
);
|
|
2546
2556
|
}
|
|
2547
2557
|
function RemoteWorkspaceAction(props) {
|
|
2548
|
-
let { t } = props, [open, setOpen] = React.useState(!1), [status, setStatus] = React.useState(void 0), [devices, setDevices] = React.useState([]), [selectedHost, setSelectedHost] = React.useState(void 0), [workspaces, setWorkspaces] = React.useState([]), [codexWorkspaces, setCodexWorkspaces] = React.useState([]), [workspaceBackend, setWorkspaceBackend] = React.useState("harness"), [codexWorkspaceId, setCodexWorkspaceId] = React.useState(void 0), [directory, setDirectory] = React.useState(void 0), [path, setPath] = React.useState(""), [addingWorkspace, setAddingWorkspace] = React.useState(!1), [busy, setBusy] = React.useState(!1), [needsAuthorization, setNeedsAuthorization] = React.useState(!1), [email, setEmail] = React.useState(""), [password, setPassword] = React.useState(""), [loginMethod, setLoginMethod] = React.useState(props.preferredQrProvider), [loginMethodManuallySelected, setLoginMethodManuallySelected] = React.useState(!1), [qrSession, setQrSession] = React.useState(void 0), [qrImage, setQrImage] = React.useState(void 0), [qrExpired, setQrExpired] = React.useState(!1), [progress, setProgress] = React.useState(void 0), progressRun = React.useRef(0), qrFlowRun = React.useRef(0), [notice, setNotice] = React.useState(void 0), [error, setError] = React.useState(void 0);
|
|
2558
|
+
let { t } = props, [open, setOpen] = React.useState(!1), [status, setStatus] = React.useState(void 0), [devices, setDevices] = React.useState([]), [selectedHost, setSelectedHost] = React.useState(void 0), [workspaces, setWorkspaces] = React.useState([]), [codexWorkspaces, setCodexWorkspaces] = React.useState([]), [workspaceBackend, setWorkspaceBackend] = React.useState("harness"), [codexWorkspaceId, setCodexWorkspaceId] = React.useState(void 0), [directory, setDirectory] = React.useState(void 0), [path, setPath] = React.useState(""), [addingWorkspace, setAddingWorkspace] = React.useState(!1), [showAllCodexWorkspaces, setShowAllCodexWorkspaces] = React.useState(!1), codexWorkspaceHeadingId = "dsh-remote-codex-workspace-heading", codexWorkspaceListId = "dsh-remote-codex-workspace-list", [busy, setBusy] = React.useState(!1), [needsAuthorization, setNeedsAuthorization] = React.useState(!1), [email, setEmail] = React.useState(""), [password, setPassword] = React.useState(""), [loginMethod, setLoginMethod] = React.useState(props.preferredQrProvider), [loginMethodManuallySelected, setLoginMethodManuallySelected] = React.useState(!1), [qrSession, setQrSession] = React.useState(void 0), [qrImage, setQrImage] = React.useState(void 0), [qrExpired, setQrExpired] = React.useState(!1), [progress, setProgress] = React.useState(void 0), progressRun = React.useRef(0), qrFlowRun = React.useRef(0), [notice, setNotice] = React.useState(void 0), [error, setError] = React.useState(void 0);
|
|
2549
2559
|
React.useEffect(() => {
|
|
2550
2560
|
if (!open) return;
|
|
2551
2561
|
let closeOnEscape = (event) => {
|
|
@@ -2624,7 +2634,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2624
2634
|
disabled: busy,
|
|
2625
2635
|
onClick: () => selectLoginMethod(provider)
|
|
2626
2636
|
}, t(provider === "github" ? "githubLogin" : "zhihuLogin")), selectHost = async (host) => {
|
|
2627
|
-
setBusy(!0), setError(void 0), setCodexWorkspaces([]);
|
|
2637
|
+
setBusy(!0), setError(void 0), setCodexWorkspaces([]), setShowAllCodexWorkspaces(!1);
|
|
2628
2638
|
try {
|
|
2629
2639
|
let result = await runRemoteProgress(
|
|
2630
2640
|
connectHostProgressSteps(status?.preferredTransports),
|
|
@@ -2655,29 +2665,33 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2655
2665
|
targetDeviceId: selectedHost.deviceId,
|
|
2656
2666
|
...nextPath === void 0 ? {} : { path: nextPath }
|
|
2657
2667
|
});
|
|
2658
|
-
setDirectory(listing),
|
|
2668
|
+
setDirectory(listing), setCodexWorkspaceId(void 0), setPath(listing.path);
|
|
2659
2669
|
} catch (reason) {
|
|
2660
2670
|
setError(messageOf(reason));
|
|
2661
2671
|
} finally {
|
|
2662
2672
|
setBusy(!1);
|
|
2663
2673
|
}
|
|
2664
2674
|
}
|
|
2675
|
+
}, startAddingWorkspace = (backend) => {
|
|
2676
|
+
setAddingWorkspace(!0), setWorkspaceBackend(backend), setCodexWorkspaceId(void 0), setShowAllCodexWorkspaces(!1), setDirectory(void 0), setPath(""), browseDirectory();
|
|
2677
|
+
}, cancelAddingWorkspace = () => {
|
|
2678
|
+
setAddingWorkspace(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setDirectory(void 0), setPath("");
|
|
2665
2679
|
}, refreshRemote = async () => {
|
|
2666
2680
|
setBusy(!0), setNotice(void 0), setError(void 0);
|
|
2667
2681
|
try {
|
|
2668
2682
|
let nextStatus = await props.control("status");
|
|
2669
2683
|
if (setStatus(nextStatus), !nextStatus.available) {
|
|
2670
|
-
setDevices([]), setNeedsAuthorization(!1), setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setPath(""), setAddingWorkspace(!1), setDirectory(void 0);
|
|
2684
|
+
setDevices([]), setNeedsAuthorization(!1), setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setShowAllCodexWorkspaces(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setPath(""), setAddingWorkspace(!1), setDirectory(void 0);
|
|
2671
2685
|
return;
|
|
2672
2686
|
}
|
|
2673
2687
|
try {
|
|
2674
2688
|
let nextDevices = await props.control("devices");
|
|
2675
2689
|
if (setDevices(nextDevices), setNeedsAuthorization(!1), selectedHost !== void 0) {
|
|
2676
2690
|
let nextSelectedHost = nextDevices.find((device) => device.deviceId === selectedHost.deviceId);
|
|
2677
|
-
nextSelectedHost === void 0 ? (setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setPath(""), setAddingWorkspace(!1), setDirectory(void 0)) : setSelectedHost(nextSelectedHost);
|
|
2691
|
+
nextSelectedHost === void 0 ? (setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setShowAllCodexWorkspaces(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setPath(""), setAddingWorkspace(!1), setDirectory(void 0)) : setSelectedHost(nextSelectedHost);
|
|
2678
2692
|
}
|
|
2679
2693
|
} catch {
|
|
2680
|
-
setDevices([]), setNeedsAuthorization(!0), setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setPath(""), setAddingWorkspace(!1), setDirectory(void 0);
|
|
2694
|
+
setDevices([]), setNeedsAuthorization(!0), setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setShowAllCodexWorkspaces(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setPath(""), setAddingWorkspace(!1), setDirectory(void 0);
|
|
2681
2695
|
}
|
|
2682
2696
|
} catch (reason) {
|
|
2683
2697
|
setError(messageOf(reason));
|
|
@@ -2685,7 +2699,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2685
2699
|
setBusy(!1);
|
|
2686
2700
|
}
|
|
2687
2701
|
}, show = async () => {
|
|
2688
|
-
setOpen(!0), await refreshRemote();
|
|
2702
|
+
setShowAllCodexWorkspaces(!1), setOpen(!0), await refreshRemote();
|
|
2689
2703
|
}, signInClient = async () => {
|
|
2690
2704
|
if (!(email.trim() === "" || password === "")) {
|
|
2691
2705
|
setBusy(!0), setError(void 0);
|
|
@@ -2723,14 +2737,17 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2723
2737
|
setBusy(!1);
|
|
2724
2738
|
}
|
|
2725
2739
|
}, openWorkspace = async () => {
|
|
2726
|
-
if (!(selectedHost === void 0 ||
|
|
2740
|
+
if (!(selectedHost === void 0 || path.trim() === "" || !addingWorkspace && workspaceBackend === "codex" && codexWorkspaceId === void 0)) {
|
|
2727
2741
|
setBusy(!0), setError(void 0);
|
|
2728
2742
|
try {
|
|
2729
2743
|
let nextStatus = await runRemoteProgress(
|
|
2730
2744
|
openWorkspaceProgressSteps,
|
|
2731
2745
|
setProgress,
|
|
2732
2746
|
progressRun,
|
|
2733
|
-
() => workspaceBackend === "codex" ? props.control("codex.workspace.
|
|
2747
|
+
() => workspaceBackend === "codex" ? addingWorkspace ? props.control("codex.workspace.create", {
|
|
2748
|
+
targetDeviceId: selectedHost.deviceId,
|
|
2749
|
+
path: path.trim()
|
|
2750
|
+
}) : props.control("codex.workspace.open", {
|
|
2734
2751
|
targetDeviceId: selectedHost.deviceId,
|
|
2735
2752
|
workspaceId: codexWorkspaceId
|
|
2736
2753
|
}) : props.control("workspace.open", {
|
|
@@ -2744,7 +2761,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2744
2761
|
setError(messageOf(reason)), setBusy(!1);
|
|
2745
2762
|
}
|
|
2746
2763
|
}
|
|
2747
|
-
}, remoteLabel = status?.mode === "remote" ? t("activeRemote", { name: status.target?.name ?? t("host") }) : t("remoteEntry");
|
|
2764
|
+
}, remoteLabel = status?.mode === "remote" ? t("activeRemote", { name: status.target?.name ?? t("host") }) : t("remoteEntry"), visibleCodexWorkspaces = showAllCodexWorkspaces ? codexWorkspaces : codexWorkspaces.slice(0, 3), codexAvailable = status?.remoteFeatures?.codex === !0;
|
|
2748
2765
|
return React.createElement(
|
|
2749
2766
|
React.Fragment,
|
|
2750
2767
|
null,
|
|
@@ -2961,7 +2978,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2961
2978
|
React.createElement("button", {
|
|
2962
2979
|
type: "button",
|
|
2963
2980
|
onClick: () => {
|
|
2964
|
-
setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setDirectory(void 0), setPath(""), setAddingWorkspace(!1), setError(void 0);
|
|
2981
|
+
setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setShowAllCodexWorkspaces(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setDirectory(void 0), setPath(""), setAddingWorkspace(!1), setError(void 0);
|
|
2965
2982
|
}
|
|
2966
2983
|
}, t("backToHosts"))
|
|
2967
2984
|
)
|
|
@@ -2998,72 +3015,26 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2998
3015
|
{ className: "dshRemoteBrowser", "aria-label": t("chooseDirectory") },
|
|
2999
3016
|
React.createElement(
|
|
3000
3017
|
"div",
|
|
3001
|
-
{ className: "dshRemoteSectionHeading" },
|
|
3002
|
-
React.createElement("strong", null, t("existingWorkspaces")),
|
|
3003
|
-
React.createElement("button", {
|
|
3018
|
+
{ className: "dshRemoteSectionHeading dshRemoteWorkspaceHeading" },
|
|
3019
|
+
React.createElement("strong", null, t(addingWorkspace ? workspaceBackend === "codex" ? "addCodexWorkspace" : "addRemoteWorkspace" : "existingWorkspaces")),
|
|
3020
|
+
addingWorkspace ? React.createElement("button", {
|
|
3021
|
+
type: "button",
|
|
3022
|
+
className: "dshRemoteCancelWorkspace",
|
|
3023
|
+
disabled: busy,
|
|
3024
|
+
onClick: cancelAddingWorkspace
|
|
3025
|
+
}, t("cancelAddWorkspace")) : React.createElement("button", {
|
|
3004
3026
|
type: "button",
|
|
3005
3027
|
className: "dshRemoteAddWorkspace",
|
|
3028
|
+
disabled: busy,
|
|
3006
3029
|
title: t("addRemoteWorkspace"),
|
|
3007
3030
|
"aria-label": t("addRemoteWorkspace"),
|
|
3008
|
-
"
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
}
|
|
3016
|
-
}, "+")
|
|
3017
|
-
),
|
|
3018
|
-
React.createElement(
|
|
3019
|
-
"div",
|
|
3020
|
-
{ className: "dshRemoteWorkspaceLists" },
|
|
3021
|
-
React.createElement("div", { className: "dshRemoteDirectoryList" }, workspaces.length === 0 ? React.createElement("p", null, t("noRemoteWorkspaces")) : workspaces.map((workspace) => React.createElement(
|
|
3022
|
-
"button",
|
|
3023
|
-
{
|
|
3024
|
-
type: "button",
|
|
3025
|
-
key: workspace.workspaceId,
|
|
3026
|
-
disabled: busy,
|
|
3027
|
-
className: workspaceBackend === "harness" && !addingWorkspace && path === workspace.path ? "isSelected" : "",
|
|
3028
|
-
"aria-pressed": workspaceBackend === "harness" && !addingWorkspace && path === workspace.path,
|
|
3029
|
-
onClick: () => {
|
|
3030
|
-
setAddingWorkspace(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setPath(workspace.path);
|
|
3031
|
-
}
|
|
3032
|
-
},
|
|
3033
|
-
React.createElement("span", { "aria-hidden": !0 }, "\u25B1"),
|
|
3034
|
-
React.createElement("span", null, workspace.title),
|
|
3035
|
-
React.createElement("small", null, workspace.path)
|
|
3036
|
-
))),
|
|
3037
|
-
codexWorkspaces.length === 0 ? null : React.createElement(
|
|
3038
|
-
React.Fragment,
|
|
3039
|
-
null,
|
|
3040
|
-
React.createElement(
|
|
3041
|
-
"div",
|
|
3042
|
-
{ className: "dshRemoteWorkspaceSourceHeading" },
|
|
3043
|
-
React.createElement("strong", null, t("codexVirtualWorkspace")),
|
|
3044
|
-
React.createElement("small", null, t("codexVirtualSessions"))
|
|
3045
|
-
),
|
|
3046
|
-
React.createElement(
|
|
3047
|
-
"div",
|
|
3048
|
-
{ className: "dshRemoteDirectoryList dshRemoteCodexWorkspaceList" },
|
|
3049
|
-
codexWorkspaces.map((workspace) => React.createElement(
|
|
3050
|
-
"button",
|
|
3051
|
-
{
|
|
3052
|
-
type: "button",
|
|
3053
|
-
key: workspace.workspaceId,
|
|
3054
|
-
disabled: busy,
|
|
3055
|
-
className: workspaceBackend === "codex" && codexWorkspaceId === workspace.workspaceId ? "isSelected" : "",
|
|
3056
|
-
"aria-pressed": workspaceBackend === "codex" && codexWorkspaceId === workspace.workspaceId,
|
|
3057
|
-
onClick: () => {
|
|
3058
|
-
setAddingWorkspace(!1), setWorkspaceBackend("codex"), setCodexWorkspaceId(workspace.workspaceId), setPath(workspace.path);
|
|
3059
|
-
}
|
|
3060
|
-
},
|
|
3061
|
-
React.createElement("span", { className: "dshRemoteCodexMark", "aria-hidden": !0 }, "C"),
|
|
3062
|
-
React.createElement("span", null, workspace.title),
|
|
3063
|
-
React.createElement("small", null, `${workspace.path} \xB7 ${workspace.sessionCount}`)
|
|
3064
|
-
))
|
|
3065
|
-
)
|
|
3066
|
-
)
|
|
3031
|
+
onClick: () => startAddingWorkspace("harness")
|
|
3032
|
+
}, React.createElement("svg", {
|
|
3033
|
+
className: "dshRemoteAddWorkspaceIcon",
|
|
3034
|
+
viewBox: "0 0 16 16",
|
|
3035
|
+
"aria-hidden": !0,
|
|
3036
|
+
focusable: !1
|
|
3037
|
+
}, React.createElement("path", { d: "M8 3v10M3 8h10", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" })))
|
|
3067
3038
|
),
|
|
3068
3039
|
addingWorkspace ? React.createElement(
|
|
3069
3040
|
"div",
|
|
@@ -3089,16 +3060,96 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3089
3060
|
}, React.createElement("span", { "aria-hidden": !0 }, "\u25B1"), React.createElement("span", null, entry.name)))),
|
|
3090
3061
|
directory.truncated ? React.createElement("small", null, t("directoryTruncated")) : null
|
|
3091
3062
|
)
|
|
3092
|
-
) :
|
|
3063
|
+
) : React.createElement(
|
|
3064
|
+
React.Fragment,
|
|
3065
|
+
null,
|
|
3066
|
+
React.createElement(
|
|
3067
|
+
"div",
|
|
3068
|
+
{ className: "dshRemoteWorkspaceLists" },
|
|
3069
|
+
React.createElement("div", { className: "dshRemoteDirectoryList" }, workspaces.length === 0 ? React.createElement("p", null, t("noRemoteWorkspaces")) : workspaces.map((workspace) => React.createElement(
|
|
3070
|
+
"button",
|
|
3071
|
+
{
|
|
3072
|
+
type: "button",
|
|
3073
|
+
key: workspace.workspaceId,
|
|
3074
|
+
disabled: busy,
|
|
3075
|
+
className: workspaceBackend === "harness" && path === workspace.path ? "isSelected" : "",
|
|
3076
|
+
"aria-pressed": workspaceBackend === "harness" && path === workspace.path,
|
|
3077
|
+
onClick: () => {
|
|
3078
|
+
setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setPath(workspace.path);
|
|
3079
|
+
}
|
|
3080
|
+
},
|
|
3081
|
+
React.createElement("span", { "aria-hidden": !0 }, "\u25B1"),
|
|
3082
|
+
React.createElement("span", null, workspace.title),
|
|
3083
|
+
React.createElement("small", null, workspace.path)
|
|
3084
|
+
)))
|
|
3085
|
+
),
|
|
3086
|
+
!codexAvailable && codexWorkspaces.length === 0 ? null : React.createElement(
|
|
3087
|
+
"section",
|
|
3088
|
+
{ className: "dshRemoteCodexWorkspaceGroup" },
|
|
3089
|
+
React.createElement(
|
|
3090
|
+
"div",
|
|
3091
|
+
{
|
|
3092
|
+
id: codexWorkspaceHeadingId,
|
|
3093
|
+
className: "dshRemoteWorkspaceSourceHeading"
|
|
3094
|
+
},
|
|
3095
|
+
React.createElement(
|
|
3096
|
+
"span",
|
|
3097
|
+
{ className: "dshRemoteWorkspaceSourceText" },
|
|
3098
|
+
React.createElement("strong", null, t("codexVirtualWorkspace"))
|
|
3099
|
+
),
|
|
3100
|
+
codexAvailable ? React.createElement("button", {
|
|
3101
|
+
type: "button",
|
|
3102
|
+
className: "dshRemoteAddWorkspace",
|
|
3103
|
+
disabled: busy,
|
|
3104
|
+
title: t("addCodexWorkspace"),
|
|
3105
|
+
"aria-label": t("addCodexWorkspace"),
|
|
3106
|
+
onClick: () => startAddingWorkspace("codex")
|
|
3107
|
+
}, React.createElement("svg", {
|
|
3108
|
+
className: "dshRemoteAddWorkspaceIcon",
|
|
3109
|
+
viewBox: "0 0 16 16",
|
|
3110
|
+
"aria-hidden": !0,
|
|
3111
|
+
focusable: !1
|
|
3112
|
+
}, React.createElement("path", { d: "M8 3v10M3 8h10", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }))) : null
|
|
3113
|
+
),
|
|
3114
|
+
React.createElement("div", {
|
|
3115
|
+
id: codexWorkspaceListId,
|
|
3116
|
+
className: "dshRemoteDirectoryList dshRemoteCodexWorkspaceList",
|
|
3117
|
+
"aria-labelledby": codexWorkspaceHeadingId
|
|
3118
|
+
}, visibleCodexWorkspaces.length === 0 ? React.createElement("p", null, t("noCodexWorkspaces")) : visibleCodexWorkspaces.map((workspace) => React.createElement(
|
|
3119
|
+
"button",
|
|
3120
|
+
{
|
|
3121
|
+
type: "button",
|
|
3122
|
+
key: workspace.workspaceId,
|
|
3123
|
+
disabled: busy,
|
|
3124
|
+
className: workspaceBackend === "codex" && codexWorkspaceId === workspace.workspaceId ? "isSelected" : "",
|
|
3125
|
+
"aria-pressed": workspaceBackend === "codex" && codexWorkspaceId === workspace.workspaceId,
|
|
3126
|
+
onClick: () => {
|
|
3127
|
+
setWorkspaceBackend("codex"), setCodexWorkspaceId(workspace.workspaceId), setPath(workspace.path);
|
|
3128
|
+
}
|
|
3129
|
+
},
|
|
3130
|
+
React.createElement("span", { className: "dshRemoteCodexMark", "aria-hidden": !0 }, "C"),
|
|
3131
|
+
React.createElement("span", null, workspace.title),
|
|
3132
|
+
React.createElement("small", null, `${workspace.path} \xB7 ${workspace.sessionCount}`)
|
|
3133
|
+
))),
|
|
3134
|
+
codexWorkspaces.length <= 3 || showAllCodexWorkspaces ? null : React.createElement("button", {
|
|
3135
|
+
type: "button",
|
|
3136
|
+
className: "dshRemoteCodexWorkspaceMore",
|
|
3137
|
+
disabled: busy,
|
|
3138
|
+
"aria-controls": codexWorkspaceListId,
|
|
3139
|
+
"aria-label": t("showAllCodexWorkspaces"),
|
|
3140
|
+
onClick: () => setShowAllCodexWorkspaces(!0)
|
|
3141
|
+
}, "\u2026")
|
|
3142
|
+
)
|
|
3143
|
+
),
|
|
3093
3144
|
React.createElement(
|
|
3094
3145
|
"footer",
|
|
3095
3146
|
{ className: "dshRemoteOpenBar" },
|
|
3096
3147
|
React.createElement("div", null, React.createElement("span", null, t("currentDirectory")), React.createElement("strong", null, path || "\u2014")),
|
|
3097
3148
|
React.createElement("button", {
|
|
3098
3149
|
type: "button",
|
|
3099
|
-
disabled: busy ||
|
|
3150
|
+
disabled: busy || path.trim() === "" || !addingWorkspace && workspaceBackend === "codex" && codexWorkspaceId === void 0,
|
|
3100
3151
|
onClick: () => void openWorkspace()
|
|
3101
|
-
}, t(busy ? "openingWorkspace" : "openWorkspace"))
|
|
3152
|
+
}, t(busy ? "openingWorkspace" : addingWorkspace ? "confirmAddWorkspace" : "openWorkspace"))
|
|
3102
3153
|
)
|
|
3103
3154
|
)
|
|
3104
3155
|
)
|
|
@@ -3453,14 +3504,14 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3453
3504
|
".dshRemotePageHeader{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:14px 24px;border-bottom:1px solid var(--dsw-alias-border-l2)}.dshRemotePageIntro{min-width:0;flex:1}.dshRemotePageHeader strong{display:block;font-size:18px;line-height:1.4}.dshRemotePageHeader p{min-width:0;max-width:70ch;margin:3px 0 0;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1.5}.dshRemotePageActions{flex:0 0 auto;display:flex;align-items:center;gap:4px}.dshRemotePageActions>button{height:40px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border:0;border-radius:8px;background:transparent;color:inherit;line-height:1;cursor:pointer}.dshRemotePageActions>button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.dshRemotePageActions>button:disabled{opacity:.45;cursor:default}.dshRemotePageRefresh{min-width:48px;padding:0 10px;font:inherit;font-size:13px}.dshRemotePageActions>button:not(.dshRemotePageRefresh){width:40px;padding:0;font-size:24px}",
|
|
3454
3505
|
".dshRemotePageBody{padding:24px;overflow:auto;display:flex;flex-direction:column;gap:24px}.dshRemotePageBody button{font:inherit;color:inherit}",
|
|
3455
3506
|
".dshRemoteSectionHeading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:10px}.dshRemoteSectionTitle{min-width:0;display:flex;align-items:center;gap:10px}.dshRemoteSectionTitle>strong{font-size:14px}.dshRemoteSectionActions{display:flex;align-items:center;gap:14px}.dshRemoteSectionActions>button{border:0;background:transparent;color:var(--dsw-alias-label-secondary);cursor:pointer;padding:5px 0;font-size:12px}.dshRemoteSectionActions>button:hover:not(:disabled){color:var(--dsw-alias-label-primary);text-decoration:underline}",
|
|
3456
|
-
".
|
|
3507
|
+
".dshRemoteCancelWorkspace{min-height:36px;border:0;background:transparent;color:var(--dsw-alias-label-secondary);padding:6px 0;cursor:pointer}.dshRemoteCancelWorkspace:hover:not(:disabled){color:var(--dsw-alias-label-primary);text-decoration:underline}.dshRemoteCancelWorkspace:disabled{opacity:.5;cursor:default}",
|
|
3457
3508
|
".dshRemoteHostList{display:flex;flex-direction:column;border-top:1px solid var(--dsw-alias-border-l2)}.dshRemoteHostList>button{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left;border:0;border-bottom:1px solid var(--dsw-alias-border-l2);background:transparent;padding:10px 4px;cursor:pointer}.dshRemoteHostList>button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteHostList>button:disabled{opacity:.5;cursor:default}.dshRemoteHostList>button>span{min-width:0;display:flex;flex-direction:column;gap:3px}.dshRemoteHostList>button strong{font-size:14px;font-weight:500}.dshRemoteHostList small,.dshRemoteSelectedHost small{color:var(--dsw-alias-label-secondary);font-size:12px}",
|
|
3458
3509
|
".dshRemoteSelectedHost{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border-radius:10px;background:var(--dsw-alias-bg-layer-2)}",
|
|
3459
3510
|
'.dshRemoteProgress{display:flex;flex-direction:column;gap:8px;margin:12px 0;padding:12px 14px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-layer-2)}.dshRemoteProgressHeader{display:flex;align-items:center;justify-content:space-between;gap:12px}.dshRemoteProgressHeader strong{font-size:13px;font-weight:600}.dshRemoteProgressHeader span{color:var(--dsw-alias-label-secondary);font-size:12px}.dshRemoteProgressBar{height:6px;overflow:hidden;border-radius:999px;background:var(--dsw-alias-bg-layer-3)}.dshRemoteProgressBar>span{display:block;width:100%;height:100%;border-radius:inherit;background:var(--dsw-alias-brand-primary);transform-origin:left center;transition:transform .22s ease-out}[dir="rtl"] .dshRemoteProgressBar>span{transform-origin:right center}.dshRemoteProgress p{margin:0;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.45}.dshRemoteProgressRoute{font-weight:500}.dshRemoteProgressRoute .isActive{color:var(--dsw-alias-state-success-primary);font-weight:700}.dshRemoteProgressRouteArrow{color:var(--dsw-alias-label-tertiary)}@media(prefers-reduced-motion:reduce){.dshRemoteProgressBar>span{transition:none}}',
|
|
3460
3511
|
'.dshRemoteBrowser{display:flex;flex-direction:column}.dshRemoteCrumbs{display:flex;align-items:center;gap:4px;overflow:auto;padding:2px 0 10px}.dshRemoteCrumbs>button{flex:0 0 auto;border:0;background:transparent;color:var(--dsw-alias-label-secondary);padding:5px 7px;border-radius:6px;cursor:pointer}.dshRemoteCrumbs>button:not(:last-child)::after{content:" /";color:var(--dsw-alias-label-tertiary)}.dshRemoteCrumbs>button:disabled{color:var(--dsw-alias-label-primary);font-weight:600}',
|
|
3461
3512
|
".dshRemoteWorkspaceLists{max-height:min(360px,42vh);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:var(--dsw-alias-label-tertiary) transparent}.dshRemoteWorkspaceLists::-webkit-scrollbar{width:8px}.dshRemoteWorkspaceLists::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:8px;background:var(--dsw-alias-label-tertiary);background-clip:padding-box}.dshRemoteWorkspaceLists::-webkit-scrollbar-track{background:transparent}",
|
|
3462
3513
|
".dshRemoteDirectoryList{min-height:72px;display:flex;flex-direction:column;border-top:1px solid var(--dsw-alias-border-l2)}.dshRemoteDirectoryList>button{min-height:52px;display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:10px;text-align:left;border:0;border-bottom:1px solid var(--dsw-alias-border-l2);background:transparent;padding:8px 4px;cursor:pointer}.dshRemoteDirectoryList>button:hover,.dshRemoteDirectoryList>button.isSelected{background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteDirectoryList>button.isSelected{color:var(--dsw-alias-label-primary)}.dshRemoteDirectoryList>button>span:first-child{grid-row:1/3}.dshRemoteDirectoryList>button>span:not(:first-child),.dshRemoteDirectoryList>button>small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dshRemoteDirectoryList>button>small{grid-column:2;color:var(--dsw-alias-label-secondary)}.dshRemoteDirectoryList>p,.dshRemoteHint{margin:12px 0;color:var(--dsw-alias-label-secondary);font-size:13px}",
|
|
3463
|
-
".
|
|
3514
|
+
".dshRemoteAddWorkspace{box-sizing:border-box;width:40px;height:40px;display:inline-grid;place-items:center;flex:0 0 auto;border:0;border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary);padding:0;cursor:pointer}.dshRemoteAddWorkspace:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteAddWorkspace:disabled{opacity:.5;cursor:default}.dshRemoteAddWorkspaceIcon{width:20px;height:20px}.dshRemoteCodexWorkspaceGroup{margin-top:16px}.dshRemoteWorkspaceSourceHeading{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 4px 7px}.dshRemoteWorkspaceSourceText{min-width:0;display:flex;flex-direction:column;gap:2px}.dshRemoteWorkspaceSourceText>strong{font-size:13px}.dshRemoteWorkspaceSourceText>small{color:var(--dsw-alias-label-secondary);font-size:11px}.dshRemoteCodexWorkspaceList{min-height:0;max-height:min(260px,32vh);overflow-y:auto;overscroll-behavior:contain}.dshRemoteCodexWorkspaceMore{width:100%;min-height:48px;border:0;border-bottom:1px solid var(--dsw-alias-border-l2);background:transparent;color:var(--dsw-alias-label-secondary);padding:8px 4px;text-align:center;font-size:12px;cursor:pointer}.dshRemoteCodexWorkspaceMore:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteCodexWorkspaceMore:disabled{opacity:.5;cursor:default}.dshRemoteCodexMark{box-sizing:border-box;width:22px;height:22px;display:grid;place-items:center;border:1px solid var(--dsw-alias-border-l2);border-radius:6px;color:var(--dsw-alias-label-primary);font-size:11px;font-weight:650}",
|
|
3464
3515
|
".dshRemoteFolderBrowser{margin-top:14px}.dshRemoteFolderBrowser>p,.dshRemoteFolderList>p{margin:12px 0;color:var(--dsw-alias-label-secondary);font-size:13px}.dshRemoteFolderList{max-height:260px;overflow:auto;border-block:1px solid var(--dsw-alias-border-l2)}.dshRemoteFolderList>button{width:100%;min-height:42px;display:flex;align-items:center;gap:9px;border:0;border-bottom:1px solid var(--dsw-alias-border-l2);background:transparent;padding:7px 6px;text-align:left;cursor:pointer}.dshRemoteFolderList>button:hover{background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteFolderBrowser>small{display:block;margin-top:8px;color:var(--dsw-alias-state-warn-label)}",
|
|
3465
3516
|
".dshRemotePathField{display:flex;flex-direction:column;gap:6px;margin-top:20px}.dshRemotePathField>span{font-size:13px;font-weight:600}.dshRemotePathField>input{min-height:40px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-3);color:inherit;padding:0 12px;font:inherit}.dshRemotePathField>small{color:var(--dsw-alias-label-secondary)}",
|
|
3466
3517
|
".dshRemoteOpenBar{position:sticky;bottom:-96px;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:20px;padding:14px 0;background:var(--dsw-alias-bg-layer-1);border-top:1px solid var(--dsw-alias-border-l2)}.dshRemoteOpenBar>div{min-width:0;display:flex;flex-direction:column;gap:3px}.dshRemoteOpenBar span{color:var(--dsw-alias-label-secondary);font-size:12px}.dshRemoteOpenBar strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.dshRemoteOpenBar>button,.dshRemoteEnable>button{min-height:40px;flex:0 0 auto;border:0;border-radius:8px;background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-1);padding:8px 16px;cursor:pointer}.dshRemoteOpenBar>button:disabled,.dshRemoteEnable>button:disabled{opacity:.5;cursor:default}",
|
|
@@ -3472,7 +3523,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3472
3523
|
'.dshRemoteHostControlToggle{display:flex;align-items:center;gap:7px;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px;white-space:nowrap;cursor:default}.dshRemoteHostControlToggle>input{appearance:none;box-sizing:border-box;position:relative;width:32px;height:18px;flex:0 0 auto;margin:0;border:1px solid var(--dsw-alias-label-secondary);border-radius:999px;background:var(--dsw-alias-bg-layer-3);cursor:pointer;box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l2);transition:background .16s ease-out,border-color .16s ease-out,box-shadow .16s ease-out}.dshRemoteHostControlToggle>input::after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--dsw-alias-label-secondary);transition:transform .16s ease-out,background .16s ease-out}.dshRemoteHostControlToggle>input:checked{border-color:var(--dsw-alias-state-success-primary);background:var(--dsw-alias-state-success-primary);box-shadow:none}.dshRemoteHostControlToggle>input:checked::after{transform:translateX(14px);background:var(--dsw-alias-bg-layer-1)}.dshRemoteHostControlToggle>input:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.dshRemoteHostControlToggle>input:disabled{opacity:.5;cursor:default}@media(prefers-reduced-motion:reduce){.dshRemoteHostControlToggle>input,.dshRemoteHostControlToggle>input::after{transition:none}}',
|
|
3473
3524
|
".dshRemoteAccountExit{flex:0 0 auto;border:0;background:transparent;color:var(--dsw-alias-label-secondary);cursor:pointer;padding:5px 0;font-size:12px;line-height:1.5;white-space:nowrap}.dshRemoteAccountExit:hover:not(:disabled){color:var(--dsw-alias-label-primary);text-decoration:underline}.dshRemoteAccountExit:disabled{opacity:.5;cursor:default;text-decoration:none}",
|
|
3474
3525
|
".dshRemoteLocalLink{align-self:flex-start;border:0;background:transparent;color:var(--dsw-alias-label-secondary);padding:4px 0;cursor:pointer}.dshRemoteLocalLink:hover{color:var(--dsw-alias-label-primary)}",
|
|
3475
|
-
"@keyframes dshRemotePageIn{from{opacity:0;transform:translateY(6px) scale(.99)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.dshRemotePage{animation:none}}@media(max-width:620px){.dshRemoteBackdrop{padding:12px}.dshRemotePage{max-height:calc(100vh - 24px)}.dshRemotePageHeader{padding:12px 16px}.dshRemoteSectionHeading{align-items:flex-start;flex-direction:column;gap:8px}.dshRemoteSectionActions{width:100%;justify-content:space-between}.dshRemotePageBody{padding:20px 16px}.dshRemoteOpenBar{align-items:flex-end}.dshRemoteOpenBar>button{min-height:48px}}",
|
|
3526
|
+
"@keyframes dshRemotePageIn{from{opacity:0;transform:translateY(6px) scale(.99)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.dshRemotePage{animation:none}}@media(max-width:620px){.dshRemoteBackdrop{padding:12px}.dshRemotePage{max-height:calc(100vh - 24px)}.dshRemotePageHeader{padding:12px 16px}.dshRemoteSectionHeading{align-items:flex-start;flex-direction:column;gap:8px}.dshRemoteWorkspaceHeading{align-items:center;flex-direction:row}.dshRemoteSectionActions{width:100%;justify-content:space-between}.dshRemotePageBody{padding:20px 16px}.dshRemoteOpenBar{align-items:flex-end}.dshRemoteOpenBar>button{min-height:48px}}",
|
|
3476
3527
|
".dshRemoteBackdrop{position:fixed;inset:0;z-index:1000;background:var(--dsw-alias-bg-mask-3);display:grid;place-items:center;padding:20px}",
|
|
3477
3528
|
".dshRemoteDialog{width:min(460px,100%);max-height:80vh;overflow:auto;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l2);border-radius:14px;padding:18px;display:grid;gap:12px;box-shadow:var(--dsw-shadow-lv2)}",
|
|
3478
3529
|
".dshRemoteDialog button,.dshRemoteDialog input{font:inherit;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;padding:9px 10px;background:transparent;color:inherit}",
|