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/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-y8P6-0gv.js"></script>
10
- <link rel="stylesheet" crossorigin href="/assets/index-Ca-rDbHa.css">
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-viewer",
3
- "version": "1.6.11",
3
+ "version": "1.6.13",
4
4
  "description": "Claude Code Logger visualization management tool",
5
5
  "license": "MIT",
6
6
  "main": "server.js",
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
- console.error(`[CC-Viewer Proxy] ${extractApiErrorMessage(response.status, errorText)}`);
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
- console.error('[CC-Viewer Proxy] Failed to read error body:', err);
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 concise error unless debugging
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(); });