@kimuson/claude-code-viewer 0.7.1 → 0.7.2

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/main.js CHANGED
@@ -12,7 +12,7 @@ import { Effect as Effect73 } from "effect";
12
12
  // package.json
13
13
  var package_default = {
14
14
  name: "@kimuson/claude-code-viewer",
15
- version: "0.7.1",
15
+ version: "0.7.2",
16
16
  description: "A full-featured web-based Claude Code client that provides complete interactive functionality for managing Claude Code projects.",
17
17
  homepage: "https://github.com/d-kimuson/claude-code-viewer",
18
18
  license: "MIT",
@@ -2135,6 +2135,20 @@ var LayerImpl9 = Effect13.gen(function* () {
2135
2135
  }
2136
2136
  const fileNames = yield* fs.readDirectory(projectPath).pipe(Effect13.catchAll(() => Effect13.succeed([])));
2137
2137
  const sessionFiles = fileNames.filter(isRegularSessionFile);
2138
+ const existingProject = db.select().from(projects).where(eq2(projects.id, projectId)).get();
2139
+ if (existingProject === void 0) {
2140
+ const projectCwd = yield* extractProjectCwd(projectPath, sessionFiles);
2141
+ const dirStat = yield* fs.stat(projectPath).pipe(Effect13.catchAll(() => Effect13.succeed(null)));
2142
+ const dirMtimeMs = dirStat ? Option.getOrElse(dirStat.mtime, () => /* @__PURE__ */ new Date(0)).getTime() : 0;
2143
+ db.insert(projects).values({
2144
+ id: projectId,
2145
+ name: projectCwd !== null ? path.basename(projectCwd) : null,
2146
+ path: projectCwd,
2147
+ sessionCount: 0,
2148
+ dirMtimeMs,
2149
+ syncedAt: Date.now()
2150
+ }).onConflictDoNothing().run();
2151
+ }
2138
2152
  const knownSessions = db.select().from(sessions).where(eq2(sessions.projectId, projectId)).all();
2139
2153
  const knownSessionPaths = new Set(knownSessions.map((s) => s.filePath));
2140
2154
  const seenFilePaths = /* @__PURE__ */ new Set();