zen-gitsync 2.16.27 → 2.16.28
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/package.json +1 -1
- package/src/ui/public/assets/{AppVersionBadge-BW4vXJxH.js → AppVersionBadge-DTsgbuSQ.js} +1 -1
- package/src/ui/public/assets/{BranchSelector-DsLQi1AR.js → BranchSelector-C9OPOmaJ.js} +1 -1
- package/src/ui/public/assets/{CommitForm-CmmxW73q.js → CommitForm-Cr5Ajewf.js} +1 -1
- package/src/ui/public/assets/{EditorView-CtygNTuz.js → EditorView-BYoWEp7_.js} +1 -1
- package/src/ui/public/assets/{FlowOrchestrationWorkspace-DtTItIzf.js → FlowOrchestrationWorkspace--Sguba2_.js} +1 -1
- package/src/ui/public/assets/{LogList-Cwem9ONv.js → LogList-CF47CGZw.js} +1 -1
- package/src/ui/public/assets/{RemoteRepoCard-DJ7ficOj.js → RemoteRepoCard-CGn4tRy-.js} +1 -1
- package/src/ui/public/assets/{SourceMapView-CSVCaU8d.js → SourceMapView-DhxMPULM.js} +1 -1
- package/src/ui/public/assets/{WorkbenchView-Cl9H5uXg.js → WorkbenchView-CJwU_MsO.js} +1 -1
- package/src/ui/public/assets/{index-D89M9m30.js → index-BgKFctmf.js} +16 -16
- package/src/ui/public/assets/toolsStore-D9gXnqwO.js +1 -0
- package/src/ui/public/index.html +2 -2
- package/src/ui/server/routes/fileOpen.js +53 -1
- package/src/ui/public/assets/toolsStore-RkALTxME.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{lr as e}from"./element-plus-B3pTS_5R.js";import{p as t}from"./vendor-Cx8PA1NP.js";function n(e){if(!e)return`Zen GitSync`;let t=e.replace(/\\/g,`/`).split(`/`).filter(e=>e);return t.length>0?t[t.length-1]:`Zen GitSync`}function r(e){return(e||``).trim().replace(/^([a-z])(?=:)/,e=>e.toUpperCase())}var i=600*1e3,a=t(`tools`,()=>{let t=e(!1),n=e(!1),r=e(!1),a=e(!1),o=e(!1),s=e(!1),c=e(!1),l=e(null),u=e(!1),d=e(``),f=e({}),p=null;function m(){return p||(u.value=!0,p=(async()=>{try{let e=await(await fetch(`/api/check-tools`)).json();e.success&&(t.value=!!e.vscode,n.value=!!e.claude,r.value=!!e.codex,a.value=!!e.opencode,o.value=!!e.kimi,s.value=!!e.zcode,c.value=!!e.dsh,d.value=typeof e.platform==`string`?e.platform:``,f.value=e.installers&&typeof e.installers==`object`?e.installers:{},l.value=Date.now())}catch{}finally{u.value=!1,p=null}})(),p)}function h(e){switch(e){case`vscode`:return t.value;case`claude`:return n.value;case`codex`:return r.value;case`opencode`:return a.value;case`kimi`:return o.value;case`zcode`:return s.value;case`dsh`:return c.value}}let g=null;function _(){g||=(m(),setInterval(()=>{m()},i))}function v(){g&&=(clearInterval(g),null)}return{vscodeAvailable:t,claudeAvailable:n,codexAvailable:r,opencodeAvailable:a,kimiAvailable:o,zcodeAvailable:s,dshAvailable:c,lastCheckedAt:l,isChecking:u,platform:d,installers:f,isToolAvailable:h,checkTools:m,startPolling:_,stopPolling:v}});export{r as n,n as r,a as t};
|
package/src/ui/public/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
11
11
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
12
12
|
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-BgKFctmf.js"></script>
|
|
14
14
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-CMxvf4Kt.js">
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/monaco-BFLoT2VD.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/element-plus-B3pTS_5R.js">
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<link rel="modulepreload" crossorigin href="/assets/SvgIcon-CL2qPswh.js">
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/CommonDialog-CQz6iEqp.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/configStore-Cqnbpz5-.js">
|
|
25
|
-
<link rel="modulepreload" crossorigin href="/assets/toolsStore-
|
|
25
|
+
<link rel="modulepreload" crossorigin href="/assets/toolsStore-D9gXnqwO.js">
|
|
26
26
|
<link rel="stylesheet" crossorigin href="/assets/monaco-B2lPvkrc.css">
|
|
27
27
|
<link rel="stylesheet" crossorigin href="/assets/element-plus-CQrjg9us.css">
|
|
28
28
|
<link rel="stylesheet" crossorigin href="/assets/vendor-BkgN6wPK.css">
|
|
@@ -22,6 +22,7 @@ const TOOL_INSTALL_PACKAGES = Object.freeze({
|
|
|
22
22
|
claude: '@anthropic-ai/claude-code',
|
|
23
23
|
codex: '@openai/codex',
|
|
24
24
|
opencode: 'opencode-ai',
|
|
25
|
+
dsh: '@deepseek-ai/dsh',
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
const TOOL_DOCS_URLS = Object.freeze({
|
|
@@ -31,6 +32,7 @@ const TOOL_DOCS_URLS = Object.freeze({
|
|
|
31
32
|
opencode: 'https://opencode.ai/docs',
|
|
32
33
|
kimi: 'https://moonshotai.github.io/kimi-code/en/guides/getting-started',
|
|
33
34
|
zcode: 'https://zcode.z.ai/',
|
|
35
|
+
dsh: 'https://github.com/deepseek-ai/deepseek-harness',
|
|
34
36
|
});
|
|
35
37
|
|
|
36
38
|
function commandExists(command, platform = process.platform) {
|
|
@@ -265,6 +267,41 @@ async function launchKimiCode(dirPath) {
|
|
|
265
267
|
return launchInTerminal(dirPath, 'kimi');
|
|
266
268
|
}
|
|
267
269
|
|
|
270
|
+
async function launchDsh(dirPath) {
|
|
271
|
+
const executable = await findDshExecutable();
|
|
272
|
+
if (!executable) throw new Error('未检测到 DeepSeek Harness,请先全局安装 dsh CLI');
|
|
273
|
+
if (process.platform === 'win32') {
|
|
274
|
+
// 编码 PowerShell 命令,避免 cmd start 对 dsh.cmd 完整路径中的引号进行二次解析。
|
|
275
|
+
const escapedExecutable = executable.replace(/'/g, "''");
|
|
276
|
+
const script = `& '${escapedExecutable}' web`;
|
|
277
|
+
const encoded = Buffer.from(script, 'utf16le').toString('base64');
|
|
278
|
+
return spawnDetached('cmd.exe', [
|
|
279
|
+
'/c', 'start', '""', 'powershell.exe', '-NoLogo', '-NoExit',
|
|
280
|
+
'-ExecutionPolicy', 'Bypass', '-EncodedCommand', encoded,
|
|
281
|
+
], { cwd: dirPath });
|
|
282
|
+
}
|
|
283
|
+
return launchInTerminal(dirPath, executable, ['web']);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
async function findDshExecutable() {
|
|
287
|
+
if (process.platform !== 'win32') return commandExists('dsh') ? 'dsh' : null;
|
|
288
|
+
|
|
289
|
+
const candidates = [path.join(process.env.APPDATA || '', 'npm', 'dsh.cmd')];
|
|
290
|
+
const npmPrefix = spawnSync('npm.cmd', ['prefix', '-g'], {
|
|
291
|
+
encoding: 'utf8',
|
|
292
|
+
windowsHide: true,
|
|
293
|
+
}).stdout?.trim();
|
|
294
|
+
if (npmPrefix) candidates.push(path.join(npmPrefix, 'dsh.cmd'));
|
|
295
|
+
|
|
296
|
+
for (const candidate of candidates.filter(Boolean)) {
|
|
297
|
+
try {
|
|
298
|
+
const stat = await fs.stat(candidate);
|
|
299
|
+
if (stat.isFile()) return candidate;
|
|
300
|
+
} catch {}
|
|
301
|
+
}
|
|
302
|
+
return null;
|
|
303
|
+
}
|
|
304
|
+
|
|
268
305
|
async function findKimiExecutable() {
|
|
269
306
|
if (process.platform !== 'win32') return commandExists('kimi') ? 'kimi' : null;
|
|
270
307
|
|
|
@@ -669,6 +706,19 @@ export function registerFileOpenRoutes({
|
|
|
669
706
|
}
|
|
670
707
|
}));
|
|
671
708
|
|
|
709
|
+
// 用 DeepSeek Harness 打开目录
|
|
710
|
+
app.post('/api/open-directory-with-dsh', asyncRoute(async (req, res) => {
|
|
711
|
+
const { path: dirPath } = req.body || {};
|
|
712
|
+
if (!dirPath) throw new HttpError(400, '目录路径不能为空');
|
|
713
|
+
try {
|
|
714
|
+
await fs.access(dirPath);
|
|
715
|
+
await launchDsh(dirPath);
|
|
716
|
+
res.json({ success: true, message: '已启动 DeepSeek Harness' });
|
|
717
|
+
} catch (error) {
|
|
718
|
+
res.status(400).json({ success: false, error: error.message || '无法启动 DeepSeek Harness,请确认已安装 Node.js' });
|
|
719
|
+
}
|
|
720
|
+
}));
|
|
721
|
+
|
|
672
722
|
// 用 ZCode 打开目录
|
|
673
723
|
app.post('/api/open-directory-with-zcode', asyncRoute(async (req, res) => {
|
|
674
724
|
const { path: dirPath } = req.body || {};
|
|
@@ -725,13 +775,14 @@ export function registerFileOpenRoutes({
|
|
|
725
775
|
setTimeout(() => finish(false), 15000);
|
|
726
776
|
});
|
|
727
777
|
|
|
728
|
-
const [vscode, claude, codex, opencode, kimiExecutable, zcodeExecutable] = await Promise.all([
|
|
778
|
+
const [vscode, claude, codex, opencode, kimiExecutable, zcodeExecutable, dshExecutable] = await Promise.all([
|
|
729
779
|
checkCmd('code'),
|
|
730
780
|
checkCmd('claude'),
|
|
731
781
|
checkCmd('codex'),
|
|
732
782
|
checkCmd('opencode'),
|
|
733
783
|
findKimiExecutable(),
|
|
734
784
|
findZCodeExecutable(),
|
|
785
|
+
findDshExecutable(),
|
|
735
786
|
]);
|
|
736
787
|
|
|
737
788
|
const installers = getToolInstallers();
|
|
@@ -745,6 +796,7 @@ export function registerFileOpenRoutes({
|
|
|
745
796
|
opencode,
|
|
746
797
|
kimi: !!kimiExecutable,
|
|
747
798
|
zcode: !!zcodeExecutable,
|
|
799
|
+
dsh: !!dshExecutable,
|
|
748
800
|
});
|
|
749
801
|
}));
|
|
750
802
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{lr as e}from"./element-plus-B3pTS_5R.js";import{p as t}from"./vendor-Cx8PA1NP.js";function n(e){if(!e)return`Zen GitSync`;let t=e.replace(/\\/g,`/`).split(`/`).filter(e=>e);return t.length>0?t[t.length-1]:`Zen GitSync`}function r(e){return(e||``).trim().replace(/^([a-z])(?=:)/,e=>e.toUpperCase())}var i=600*1e3,a=t(`tools`,()=>{let t=e(!1),n=e(!1),r=e(!1),a=e(!1),o=e(!1),s=e(!1),c=e(null),l=e(!1),u=e(``),d=e({}),f=null;function p(){return f||(l.value=!0,f=(async()=>{try{let e=await(await fetch(`/api/check-tools`)).json();e.success&&(t.value=!!e.vscode,n.value=!!e.claude,r.value=!!e.codex,a.value=!!e.opencode,o.value=!!e.kimi,s.value=!!e.zcode,u.value=typeof e.platform==`string`?e.platform:``,d.value=e.installers&&typeof e.installers==`object`?e.installers:{},c.value=Date.now())}catch{}finally{l.value=!1,f=null}})(),f)}function m(e){switch(e){case`vscode`:return t.value;case`claude`:return n.value;case`codex`:return r.value;case`opencode`:return a.value;case`kimi`:return o.value;case`zcode`:return s.value}}let h=null;function g(){h||=(p(),setInterval(()=>{p()},i))}function _(){h&&=(clearInterval(h),null)}return{vscodeAvailable:t,claudeAvailable:n,codexAvailable:r,opencodeAvailable:a,kimiAvailable:o,zcodeAvailable:s,lastCheckedAt:c,isChecking:l,platform:u,installers:d,isToolAvailable:m,checkTools:p,startPolling:g,stopPolling:_}});export{r as n,n as r,a as t};
|