zidane-gui 7.0.27 → 7.0.29
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/out/main/index.js
CHANGED
|
@@ -89,13 +89,18 @@ function saveKeybindings(map) {
|
|
|
89
89
|
function keybindingsFilePath() {
|
|
90
90
|
return keybindingsPath(userDataDir());
|
|
91
91
|
}
|
|
92
|
-
function openFileInEditor(path) {
|
|
92
|
+
async function openFileInEditor(path) {
|
|
93
93
|
const spec = (process.env.VISUAL ?? "").trim() || (process.env.EDITOR ?? "").trim();
|
|
94
94
|
const tokens = spec ? parseEditorCommand(spec) : [];
|
|
95
95
|
if (tokens.length === 0) {
|
|
96
|
-
|
|
96
|
+
const error = await shell.openPath(path);
|
|
97
|
+
if (error) throw new Error(error);
|
|
98
|
+
return;
|
|
97
99
|
}
|
|
98
100
|
const [cmd, ...args] = tokens;
|
|
101
|
+
if (/(?:^|[/\\])(?:vi|vim|nvim|nano|pico)(?:\.exe)?$/i.test(cmd) && !args.includes("-g") || /(?:^|[/\\])emacs(?:client)?(?:\.exe)?$/i.test(cmd) && (args.includes("-nw") || args.includes("-t"))) {
|
|
102
|
+
throw new Error("Set $VISUAL to a graphical editor for the GUI, or open this artifact in the TUI.");
|
|
103
|
+
}
|
|
99
104
|
return spawnDetached(cmd, [...args, path]);
|
|
100
105
|
}
|
|
101
106
|
function openKeybindingsInEditor() {
|
|
@@ -3810,6 +3815,15 @@ function registerChatIpc() {
|
|
|
3810
3815
|
});
|
|
3811
3816
|
ipcMain.handle("chat:interrupt", (_e, sessionId) => interruptChat(sessionId));
|
|
3812
3817
|
ipcMain.handle("chat:isRunning", (_e, sessionId) => isRuntimeSessionRunning(sessionId));
|
|
3818
|
+
ipcMain.handle("system:openPath", async (_e, path) => {
|
|
3819
|
+
if (typeof path !== "string" || !isAbsolute(path)) return false;
|
|
3820
|
+
const stat$1 = await stat(path).catch(() => null);
|
|
3821
|
+
if (!stat$1) return false;
|
|
3822
|
+
if (stat$1.isDirectory()) return await shell.openPath(path) === "";
|
|
3823
|
+
if (!stat$1.isFile()) return false;
|
|
3824
|
+
await openFileInEditor(path);
|
|
3825
|
+
return true;
|
|
3826
|
+
});
|
|
3813
3827
|
ipcMain.handle("system:revealPath", async (_e, raw) => {
|
|
3814
3828
|
const path = typeof raw === "string" ? raw.replace(/^file:\/\//, "") : "";
|
|
3815
3829
|
if (!isAbsolute(path)) return false;
|
package/out/preload/index.mjs
CHANGED
|
@@ -97,6 +97,7 @@ const api = {
|
|
|
97
97
|
searchAll: (query, sessionIds, excerptLimit) => ipcRenderer.invoke("history:searchAll", query, sessionIds, excerptLimit)
|
|
98
98
|
},
|
|
99
99
|
system: {
|
|
100
|
+
openPath: (path) => ipcRenderer.invoke("system:openPath", path),
|
|
100
101
|
revealPath: (path) => ipcRenderer.invoke("system:revealPath", path)
|
|
101
102
|
},
|
|
102
103
|
shell: {
|
|
@@ -76440,13 +76440,24 @@ function ArtifactRow({ row, onFocus, onRemove }) {
|
|
|
76440
76440
|
const isUrl2 = href !== void 0 && /^https?:\/\//.test(href);
|
|
76441
76441
|
const subtitle = view.subtitle && view.subtitle !== view.title ? view.subtitle : void 0;
|
|
76442
76442
|
const [menu, setMenu] = reactExports.useState(null);
|
|
76443
|
+
const [openError, setOpenError] = reactExports.useState(null);
|
|
76444
|
+
const open = async () => {
|
|
76445
|
+
setOpenError(null);
|
|
76446
|
+
try {
|
|
76447
|
+
if (href && !await window.api.system.openPath(href)) setOpenError("Path unavailable.");
|
|
76448
|
+
} catch (err) {
|
|
76449
|
+
setOpenError(err instanceof Error ? err.message : String(err));
|
|
76450
|
+
}
|
|
76451
|
+
};
|
|
76443
76452
|
const menuItems = reactExports.useMemo(
|
|
76444
76453
|
() => [
|
|
76445
76454
|
{
|
|
76446
76455
|
id: "copy",
|
|
76447
|
-
label: isUrl2 ? "Copy link" : "Copy path",
|
|
76456
|
+
label: artifact.kind === "commit" ? "Copy SHA" : isUrl2 ? "Copy link" : "Copy path",
|
|
76448
76457
|
shortcut: "c",
|
|
76449
|
-
onSelect: () => void navigator.clipboard.writeText(
|
|
76458
|
+
onSelect: () => void navigator.clipboard.writeText(
|
|
76459
|
+
artifact.kind === "commit" ? artifact.uri.replace(/^git:commit:/, "") : href ?? artifact.uri
|
|
76460
|
+
)
|
|
76450
76461
|
},
|
|
76451
76462
|
...href && !isUrl2 ? [
|
|
76452
76463
|
{
|
|
@@ -76458,7 +76469,7 @@ function ArtifactRow({ row, onFocus, onRemove }) {
|
|
|
76458
76469
|
] : [],
|
|
76459
76470
|
{ id: "remove", label: "Remove from session", shortcut: "r", destructive: true, onSelect: onRemove }
|
|
76460
76471
|
],
|
|
76461
|
-
[isUrl2, href, artifact.uri, onRemove]
|
|
76472
|
+
[isUrl2, href, artifact.kind, artifact.uri, onRemove]
|
|
76462
76473
|
);
|
|
76463
76474
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
76464
76475
|
"li",
|
|
@@ -76488,15 +76499,14 @@ function ArtifactRow({ row, onFocus, onRemove }) {
|
|
|
76488
76499
|
}
|
|
76489
76500
|
)
|
|
76490
76501
|
) : href ? (
|
|
76491
|
-
//
|
|
76492
|
-
// folder, directory opened). Rendered as a button, not a link.
|
|
76502
|
+
// Editor launch stays in main; directories use the OS file manager.
|
|
76493
76503
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76494
76504
|
"button",
|
|
76495
76505
|
{
|
|
76496
76506
|
type: "button",
|
|
76497
|
-
onClick: () => void
|
|
76507
|
+
onClick: () => void open(),
|
|
76498
76508
|
className: "truncate text-left text-[13px] text-[var(--zg-text)] bg-transparent border-0 p-0 cursor-pointer hover:underline",
|
|
76499
|
-
title: `
|
|
76509
|
+
title: `Open ${href}`,
|
|
76500
76510
|
children: view.title
|
|
76501
76511
|
}
|
|
76502
76512
|
)
|
|
@@ -76510,6 +76520,7 @@ function ArtifactRow({ row, onFocus, onRemove }) {
|
|
|
76510
76520
|
}
|
|
76511
76521
|
)
|
|
76512
76522
|
] }),
|
|
76523
|
+
openError && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { role: "alert", className: "text-xs text-[var(--zg-warn)]", children: openError }),
|
|
76513
76524
|
subtitle && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "truncate text-[11px] text-[var(--zg-text-muted)] font-mono", title: subtitle, children: subtitle }),
|
|
76514
76525
|
view.badges && view.badges.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-1 flex flex-wrap items-center gap-1.5 text-[10px] leading-4 tabular-nums", children: view.badges.map(
|
|
76515
76526
|
(badge) => badge.tone === "diff" ? /* @__PURE__ */ jsxRuntimeExports.jsx(DiffBadge, { text: badge.text, title: badge.title }, badge.text) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
package/out/renderer/index.html
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
pointer-events: none;
|
|
62
62
|
}
|
|
63
63
|
</style>
|
|
64
|
-
<script type="module" crossorigin src="./assets/index-
|
|
64
|
+
<script type="module" crossorigin src="./assets/index-Dz5Ybpow.js"></script>
|
|
65
65
|
<link rel="stylesheet" crossorigin href="./assets/index-D3KopBrL.css">
|
|
66
66
|
</head>
|
|
67
67
|
<body>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zidane-gui",
|
|
3
3
|
"productName": "Zidane",
|
|
4
|
-
"version": "7.0.
|
|
4
|
+
"version": "7.0.29",
|
|
5
5
|
"description": "Zidane Desktop",
|
|
6
6
|
"author": "StackBlitz",
|
|
7
7
|
"type": "module",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"shiki": "^4.1.0",
|
|
60
60
|
"electron": "^41.7.0",
|
|
61
61
|
"tippy.js": "^6.3.7",
|
|
62
|
-
"zidane": "7.0.
|
|
62
|
+
"zidane": "7.0.29",
|
|
63
63
|
"zod": "^4.4.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|