zen-gitsync 2.10.18 → 2.10.21
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/index-OJy1G6pO.js +108 -0
- package/src/ui/public/assets/index-izOobFz3.css +1 -0
- package/src/ui/public/index.html +2 -2
- package/src/ui/server/routes/terminal.js +7 -0
- package/src/ui/public/assets/index-B6kiYSt_.css +0 -1
- package/src/ui/public/assets/index-DOmVR24n.js +0 -108
package/src/ui/public/index.html
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
8
|
<title>Zen GitSync</title>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-OJy1G6pO.js"></script>
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/vendor-BpNfZzQX.js">
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/assets/vendor-DpSHka1A.css">
|
|
12
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
12
|
+
<link rel="stylesheet" crossorigin href="/assets/index-izOobFz3.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="app"></div>
|
|
@@ -253,8 +253,15 @@ export function registerTerminalRoutes({
|
|
|
253
253
|
}));
|
|
254
254
|
|
|
255
255
|
if (cleanup) {
|
|
256
|
+
const PROTECT_DURATION_MS = 10000; // 刚启动的进程保护期 10 秒
|
|
257
|
+
const now = Date.now();
|
|
256
258
|
for (const s of results) {
|
|
257
259
|
if (s.pid && !s.alive) {
|
|
260
|
+
// 如果会话刚刚启动(10秒内),即使检测不到进程也不删除,给进程启动留时间
|
|
261
|
+
const lastStarted = s.lastStartedAt || s.createdAt || 0;
|
|
262
|
+
if (now - lastStarted < PROTECT_DURATION_MS) {
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
258
265
|
terminalSessions.delete(s.id);
|
|
259
266
|
}
|
|
260
267
|
}
|