Skip to content

Commit 9dfb09e

Browse files
committed
docs: 为解析日志目录的临时目录逻辑添加注释
添加注释说明允许通过环境变量中的 'tmp' 或 'temp' 关键字使用系统临时目录,这通常用于测试场景。
1 parent 12dae53 commit 9dfb09e

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

findcc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ function resolveLogDir() {
1313
const envDir = process.env.CCV_LOG_DIR;
1414
if (typeof envDir === 'string' && envDir.trim()) {
1515
const raw = envDir.trim();
16+
// 允许通过 'tmp' 或 'temp' 关键字使用系统临时目录(常用于测试)
1617
if (raw === 'tmp' || raw === 'temp') {
1718
return join(tmpdir(), 'cc-viewer-test', `${process.pid}-${threadId}`);
1819
}

lib/interceptor-core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { appendFileSync, existsSync, readdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from 'node:fs';
22
import { join } from 'node:path';
33

4-
const SUBAGENT_SYSTEM_RE = /command execution specialist|file search specialist|planning specialist|general-purpose agent/i;
4+
const SUBAGENT_SYSTEM_RE = /(?:command execution|file search|planning) specialist|general-purpose agent/i;
55

66
export function getSystemText(body) {
77
const system = body?.system;

0 commit comments

Comments
 (0)