cc-viewer 1.6.11 → 1.6.13
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 -0
- package/concepts/ar/Tool-TeamCreate.md +42 -0
- package/concepts/da/Tool-TeamCreate.md +42 -0
- package/concepts/de/Tool-TeamCreate.md +42 -0
- package/concepts/en/Tool-TeamCreate.md +42 -0
- package/concepts/es/Tool-TeamCreate.md +42 -0
- package/concepts/fr/Tool-TeamCreate.md +42 -0
- package/concepts/it/Tool-TeamCreate.md +42 -0
- package/concepts/ja/Tool-TeamCreate.md +42 -0
- package/concepts/ko/Tool-TeamCreate.md +42 -0
- package/concepts/no/Tool-TeamCreate.md +42 -0
- package/concepts/pl/Tool-TeamCreate.md +42 -0
- package/concepts/pt-BR/Tool-TeamCreate.md +42 -0
- package/concepts/ru/Tool-TeamCreate.md +42 -0
- package/concepts/th/Tool-TeamCreate.md +42 -0
- package/concepts/tr/Tool-TeamCreate.md +42 -0
- package/concepts/uk/Tool-TeamCreate.md +42 -0
- package/concepts/zh/Tool-TeamCreate.md +42 -0
- package/concepts/zh-TW/Tool-TeamCreate.md +42 -0
- package/dist/assets/{index-Ca-rDbHa.css → index-CVCiS6Zl.css} +3 -3
- package/dist/assets/{index-y8P6-0gv.js → index-DweLszVc.js} +241 -239
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/proxy.js +7 -5
- package/server.js +9 -0
package/dist/index.html
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<title>Claude Code Viewer</title>
|
|
7
7
|
<link rel="icon" href="/favicon.ico?v=1">
|
|
8
8
|
<link rel="shortcut icon" href="/favicon.ico?v=1">
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-DweLszVc.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CVCiS6Zl.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<div id="root"></div>
|
package/package.json
CHANGED
package/proxy.js
CHANGED
|
@@ -99,14 +99,18 @@ export function startProxy() {
|
|
|
99
99
|
if (!response.ok) {
|
|
100
100
|
try {
|
|
101
101
|
const errorText = await response.text();
|
|
102
|
-
|
|
102
|
+
if (process.env.CCV_DEBUG) {
|
|
103
|
+
console.error(`[CC-Viewer Proxy] ${extractApiErrorMessage(response.status, errorText)}`);
|
|
104
|
+
}
|
|
103
105
|
|
|
104
106
|
res.writeHead(response.status, responseHeaders);
|
|
105
107
|
res.end(errorText);
|
|
106
108
|
return;
|
|
107
109
|
} catch (err) {
|
|
108
110
|
// 读取 body 失败,回退到流式处理
|
|
109
|
-
|
|
111
|
+
if (process.env.CCV_DEBUG) {
|
|
112
|
+
console.error('[CC-Viewer Proxy] Failed to read error body:', err);
|
|
113
|
+
}
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
116
|
|
|
@@ -128,11 +132,9 @@ export function startProxy() {
|
|
|
128
132
|
res.end();
|
|
129
133
|
}
|
|
130
134
|
} catch (err) {
|
|
131
|
-
// Log
|
|
135
|
+
// Log proxy errors only when debugging
|
|
132
136
|
if (process.env.CCV_DEBUG) {
|
|
133
137
|
console.error('[CC-Viewer Proxy] Error:', err);
|
|
134
|
-
} else {
|
|
135
|
-
console.error(formatProxyRequestError(err));
|
|
136
138
|
}
|
|
137
139
|
|
|
138
140
|
res.statusCode = 502;
|
package/server.js
CHANGED
|
@@ -911,6 +911,15 @@ async function handleRequest(req, res) {
|
|
|
911
911
|
|
|
912
912
|
// === Editor session API (for $EDITOR intercept) ===
|
|
913
913
|
|
|
914
|
+
if (url === '/api/open-log-dir' && method === 'POST') {
|
|
915
|
+
const dir = LOG_FILE ? dirname(LOG_FILE) : LOG_DIR;
|
|
916
|
+
const cmd = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'explorer' : 'xdg-open';
|
|
917
|
+
exec(`${cmd} ${JSON.stringify(dir)}`, () => {});
|
|
918
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
919
|
+
res.end(JSON.stringify({ ok: true, dir }));
|
|
920
|
+
return;
|
|
921
|
+
}
|
|
922
|
+
|
|
914
923
|
if (url === '/api/editor-open' && method === 'POST') {
|
|
915
924
|
let body = '';
|
|
916
925
|
req.on('data', chunk => { body += chunk; if (body.length > MAX_POST_BODY) req.destroy(); });
|