@codexhost/cli-darwin-arm64 0.18.0-beta.1 → 0.18.0-beta.3
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 +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +103 -93
- package/app/console-web.js +104 -94
- package/app/desktop-controller.mjs +103 -109
- package/app/host-runtime.mjs +10067 -8374
- package/app/plugins/antigravity/plugin.mjs +103 -93
- package/app/plugins/claude-code/plugin.mjs +103 -93
- package/app/plugins/codebuddy/plugin.mjs +103 -93
- package/app/plugins/codex-usage/plugin.mjs +103 -93
- package/app/plugins/copilot/plugin.mjs +103 -93
- package/app/plugins/cursor-cli/plugin.mjs +103 -93
- package/app/plugins/deepseek-harness/plugin.mjs +103 -93
- package/app/plugins/devin/plugin.mjs +103 -93
- package/app/plugins/enabled.json +0 -1
- package/app/plugins/grok/plugin.mjs +103 -93
- package/app/plugins/hermes/plugin.mjs +103 -93
- package/app/plugins/kimi-code/plugin.mjs +103 -93
- package/app/plugins/kiro-cli/plugin.mjs +103 -93
- package/app/plugins/omp/plugin.mjs +103 -93
- package/app/plugins/opencode/plugin.mjs +103 -93
- package/app/plugins/pi/plugin.mjs +103 -93
- package/app/plugins/qoder/plugin.mjs +103 -93
- package/app/plugins/qoder-cn/plugin.mjs +103 -93
- package/app/plugins/qwen-code/plugin.mjs +103 -93
- package/app/plugins/workbuddy/plugin.mjs +103 -93
- package/app/plugins/zcode/plugin.mjs +103 -93
- package/app/renderer-extension.js +122 -149
- package/app/web/assets/index-C3lniEH1.css +1 -0
- package/app/web/assets/index-aKvkfNJN.js +199 -0
- package/app/web/codexhost-settings.js +104 -94
- package/app/web/index.html +2 -2
- package/app/web/plugins/deepseek-ai__dsh-api-gateway/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +64 -64
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +69 -69
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +63 -62
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +85 -85
- package/app/web/plugins/deepseek-ai__dsh-client-ui-directory-picker-browse/client.js +10 -10
- package/app/web/plugins/deepseek-ai__dsh-client-ui-input-trigger/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +3 -3
- package/app/web/plugins/deepseek-ai__dsh-client-ui-model-selection/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-permission-presets/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-right/client.js +55 -55
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +8 -8
- package/app/web/sw.js +55 -24
- package/app/web-modules/server.mjs +1091 -680
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
- package/app/plugins/codex-cli/manifest.json +0 -16
- package/app/plugins/codex-cli/plugin.mjs +0 -20374
- package/app/web/assets/index-CIeTchMu.css +0 -1
- package/app/web/assets/index-DeAPBQbV.js +0 -199
- /package/app/{plugins/codex-cli/assets/icon.png → web/codex.png} +0 -0
package/app/web/sw.js
CHANGED
|
@@ -12,9 +12,11 @@ self.addEventListener("fetch", (event) => {
|
|
|
12
12
|
if (event.request.mode === "navigate") event.respondWith(navigate(event.request));
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
+
const requestTimeout = 10_000;
|
|
16
|
+
|
|
15
17
|
async function navigate(request) {
|
|
16
18
|
const controller = new AbortController();
|
|
17
|
-
const timer = setTimeout(() => controller.abort(),
|
|
19
|
+
const timer = setTimeout(() => controller.abort(), requestTimeout);
|
|
18
20
|
try {
|
|
19
21
|
const response = await fetch(request, { signal: controller.signal });
|
|
20
22
|
return [502, 503, 504].includes(response.status) ? offlineResponse() : response;
|
|
@@ -27,25 +29,32 @@ async function navigate(request) {
|
|
|
27
29
|
|
|
28
30
|
function offlineResponse() {
|
|
29
31
|
const zh = navigator.language.startsWith("zh");
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
const title = zh ? "正在连接…" : "Connecting…";
|
|
33
|
+
const connecting = zh
|
|
34
|
+
? "正在自动重连,连接恢复后将继续打开。"
|
|
35
|
+
: "Reconnecting automatically. Your page will open when ready.";
|
|
33
36
|
const network = zh
|
|
34
|
-
?
|
|
35
|
-
:
|
|
37
|
+
? "等待网络恢复,将自动重连。"
|
|
38
|
+
: "Waiting for your network. We'll reconnect automatically.";
|
|
39
|
+
const help = zh
|
|
40
|
+
? "连接耗时较长,请检查网络并确认电脑上的 Web 正在运行。"
|
|
41
|
+
: "This is taking longer than expected. Check your network and that Web is running on your computer.";
|
|
36
42
|
return new Response(
|
|
37
43
|
`<!doctype html>
|
|
38
44
|
<html lang="${zh ? "zh" : "en"}">
|
|
39
45
|
<head>
|
|
40
46
|
<meta charset="utf-8">
|
|
41
47
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
42
|
-
<title>${
|
|
48
|
+
<title>${title}</title>
|
|
43
49
|
<style>
|
|
44
50
|
:root { color-scheme: light dark; font-family: system-ui, sans-serif; color: #202124; background: #f7f7f8; }
|
|
45
51
|
* { box-sizing: border-box; }
|
|
46
52
|
body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
|
|
47
|
-
main { width: 100%; max-width: 440px; }
|
|
48
|
-
h1 { font-size: 1.
|
|
53
|
+
main { width: 100%; max-width: 440px; text-align: center; }
|
|
54
|
+
h1 { font-size: 1.25rem; }
|
|
55
|
+
.spinner { width: 28px; height: 28px; margin: auto; border: 3px solid #8884; border-top-color: currentColor; border-radius: 50%; animation: spin 1s linear infinite; }
|
|
56
|
+
@keyframes spin { to { transform: rotate(360deg); } }
|
|
57
|
+
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
|
|
49
58
|
p { line-height: 1.6; }
|
|
50
59
|
#address { overflow-wrap: anywhere; font-size: 0.875rem; color: #5f6368; }
|
|
51
60
|
button { font: inherit; padding: 12px 24px; border: 1px solid #767676; border-radius: 8px; color: inherit; background: transparent; cursor: pointer; }
|
|
@@ -57,42 +66,64 @@ function offlineResponse() {
|
|
|
57
66
|
</head>
|
|
58
67
|
<body>
|
|
59
68
|
<main>
|
|
60
|
-
<
|
|
61
|
-
<
|
|
62
|
-
<p id="
|
|
69
|
+
<div class="spinner" aria-hidden="true"></div>
|
|
70
|
+
<h1>${title}</h1>
|
|
71
|
+
<p id="description" role="status"></p>
|
|
72
|
+
<div id="help" hidden>
|
|
73
|
+
<p>${help}</p>
|
|
74
|
+
<p id="address"></p>
|
|
75
|
+
</div>
|
|
63
76
|
<button type="button" id="retry">${zh ? "重试" : "Retry"}</button>
|
|
64
77
|
</main>
|
|
65
78
|
<script>
|
|
79
|
+
let pending = false;
|
|
80
|
+
let navigating = false;
|
|
81
|
+
let retryTimer;
|
|
82
|
+
let retryDelay = 1000;
|
|
66
83
|
function updateDescription() {
|
|
67
|
-
|
|
68
|
-
? ${JSON.stringify(
|
|
84
|
+
document.getElementById("description").textContent = navigator.onLine
|
|
85
|
+
? ${JSON.stringify(connecting)}
|
|
69
86
|
: ${JSON.stringify(network)};
|
|
70
|
-
document.title = title;
|
|
71
|
-
document.getElementById("title").textContent = title;
|
|
72
|
-
document.getElementById("description").textContent = description;
|
|
73
87
|
}
|
|
74
88
|
async function probe() {
|
|
89
|
+
if (pending || navigating) return;
|
|
90
|
+
clearTimeout(retryTimer);
|
|
91
|
+
pending = true;
|
|
75
92
|
const controller = new AbortController();
|
|
76
|
-
const timer = setTimeout(() => controller.abort(),
|
|
93
|
+
const timer = setTimeout(() => controller.abort(), ${requestTimeout});
|
|
77
94
|
try {
|
|
78
95
|
const response = await fetch(location.href, { cache: "no-store", signal: controller.signal });
|
|
79
|
-
|
|
96
|
+
void response.body?.cancel().catch(() => {});
|
|
97
|
+
if (![502, 503, 504].includes(response.status)) {
|
|
98
|
+
navigating = true;
|
|
99
|
+
location.reload();
|
|
100
|
+
}
|
|
80
101
|
} catch {
|
|
81
|
-
//
|
|
102
|
+
// Keep the loading state while the connection recovers.
|
|
82
103
|
} finally {
|
|
83
104
|
clearTimeout(timer);
|
|
105
|
+
pending = false;
|
|
106
|
+
if (!navigating) {
|
|
107
|
+
retryTimer = setTimeout(probe, retryDelay);
|
|
108
|
+
retryDelay = Math.min(retryDelay * 2, 10000);
|
|
109
|
+
}
|
|
84
110
|
}
|
|
85
111
|
}
|
|
112
|
+
function retry() {
|
|
113
|
+
retryDelay = 1000;
|
|
114
|
+
probe();
|
|
115
|
+
}
|
|
86
116
|
document.getElementById("address").textContent = location.href;
|
|
87
|
-
document.getElementById("retry").addEventListener("click",
|
|
117
|
+
document.getElementById("retry").addEventListener("click", retry);
|
|
88
118
|
updateDescription();
|
|
89
|
-
|
|
119
|
+
setTimeout(() => { document.getElementById("help").hidden = false; }, 30000);
|
|
120
|
+
probe();
|
|
90
121
|
document.addEventListener("visibilitychange", () => {
|
|
91
|
-
if (document.visibilityState === "visible")
|
|
122
|
+
if (document.visibilityState === "visible") retry();
|
|
92
123
|
});
|
|
93
124
|
window.addEventListener("online", () => {
|
|
94
125
|
updateDescription();
|
|
95
|
-
|
|
126
|
+
retry();
|
|
96
127
|
});
|
|
97
128
|
window.addEventListener("offline", updateDescription);
|
|
98
129
|
navigator.serviceWorker.addEventListener("message", (event) => {
|