chatccc 0.2.75 → 0.2.77
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 +2 -2
- package/src/config.ts +9 -1
- package/src/wechat-platform.ts +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chatccc",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.77",
|
|
4
4
|
"description": "Feishu bot bridge for Claude Code",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@types/qrcode-terminal": "^0.12.2",
|
|
56
56
|
"@types/ws": "^8.18.1",
|
|
57
57
|
"typescript": "^5.0.0",
|
|
58
|
-
"vitest": "^
|
|
58
|
+
"vitest": "^3.2.4"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=20"
|
package/src/config.ts
CHANGED
|
@@ -613,7 +613,15 @@ export async function getRecentDirs(): Promise<string[]> {
|
|
|
613
613
|
try {
|
|
614
614
|
const raw = await readFile(RECENT_DIRS_FILE, "utf-8");
|
|
615
615
|
const arr = JSON.parse(raw);
|
|
616
|
-
if (Array.isArray(arr))
|
|
616
|
+
if (Array.isArray(arr)) {
|
|
617
|
+
const seen = new Set<string>();
|
|
618
|
+
return arr.filter((d: unknown): d is string => {
|
|
619
|
+
if (typeof d !== "string") return false;
|
|
620
|
+
if (seen.has(d)) return false;
|
|
621
|
+
seen.add(d);
|
|
622
|
+
return true;
|
|
623
|
+
});
|
|
624
|
+
}
|
|
617
625
|
} catch { /* file doesn't exist or corrupted */ }
|
|
618
626
|
return [];
|
|
619
627
|
}
|
package/src/wechat-platform.ts
CHANGED
|
@@ -153,7 +153,10 @@ function printScanMaterial(content: string): void {
|
|
|
153
153
|
platformLog(content);
|
|
154
154
|
platformLog("========== 终端二维码 ==========");
|
|
155
155
|
terminalQr.generate(content, { small: true }, (renderedQr) => {
|
|
156
|
-
platformLog
|
|
156
|
+
// 逐行用裸 console.log 输出,避免 platformLog 前缀导致首行错位
|
|
157
|
+
for (const line of renderedQr.split("\n")) {
|
|
158
|
+
console.log(` ${line}`);
|
|
159
|
+
}
|
|
157
160
|
});
|
|
158
161
|
platformLog("========== 请使用微信扫描上方二维码登录 ==========\n");
|
|
159
162
|
}
|