chatccc 0.2.75 → 0.2.76

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.ts +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatccc",
3
- "version": "0.2.75",
3
+ "version": "0.2.76",
4
4
  "description": "Feishu bot bridge for Claude Code",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
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)) return arr.filter((d: unknown) => typeof d === "string");
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
  }