@dreamlake/dreamlake-cli 0.97.1 → 0.97.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.
@@ -97,6 +97,17 @@ export function transcriptFacts(provider, path, headBytes = 256 * 1024, tailByte
97
97
  } });
98
98
  const facts = { cwd: null, nativeSessionId: null, createdAt: null, lastRole: null, lastAt: stat.mtimeMs, messages: 0, title: null };
99
99
  const stamp = (value) => typeof value === 'string' && Number.isFinite(Date.parse(value)) ? Date.parse(value) : null;
100
+ // Claude writes `{type:'ai-title',aiTitle}` (many, last wins) and `{type:'custom-title',customTitle}` on rename (always wins); `title` is kept as a fallback for older exports.
101
+ let renamed = false;
102
+ const title = (row) => { if (row.type === 'custom-title' && typeof row.customTitle === 'string') {
103
+ facts.title = row.customTitle;
104
+ renamed = true;
105
+ }
106
+ else if (row.type === 'ai-title' && !renamed) {
107
+ const t = typeof row.aiTitle === 'string' ? row.aiTitle : row.title;
108
+ if (typeof t === 'string')
109
+ facts.title = t;
110
+ } };
100
111
  for (const row of rows(head)) {
101
112
  if (provider === 'codex' && row.type === 'session_meta') {
102
113
  facts.cwd ??= typeof row.payload?.cwd === 'string' ? row.payload.cwd : null;
@@ -109,8 +120,7 @@ export function transcriptFacts(provider, path, headBytes = 256 * 1024, tailByte
109
120
  facts.createdAt ??= stamp(row.timestamp);
110
121
  if (typeof row.sessionId === 'string')
111
122
  facts.nativeSessionId ??= row.sessionId;
112
- if (row.type === 'ai-title' && typeof row.title === 'string')
113
- facts.title = row.title;
123
+ title(row);
114
124
  }
115
125
  }
116
126
  // The tail may start mid-line; the first fragment is dropped by the JSON parse.
@@ -122,8 +132,8 @@ export function transcriptFacts(provider, path, headBytes = 256 * 1024, tailByte
122
132
  facts.lastRole = role;
123
133
  facts.messages++;
124
134
  }
125
- if (provider === 'claude' && row.type === 'ai-title' && typeof row.title === 'string')
126
- facts.title = row.title;
135
+ if (provider === 'claude')
136
+ title(row);
127
137
  }
128
138
  return facts;
129
139
  }
@@ -1 +1 @@
1
- export declare const VERSION = "0.97.1";
1
+ export declare const VERSION = "0.97.2";
@@ -6,4 +6,4 @@
6
6
  // value means a binary that re-installs the same version forever.
7
7
  //
8
8
  // Editing this by hand does nothing for a release; bump package.json.
9
- export const VERSION = "0.97.1";
9
+ export const VERSION = "0.97.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamlake/dreamlake-cli",
3
- "version": "0.97.1",
3
+ "version": "0.97.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dreamlake-ai/dreamlake-cli.git"
@@ -35,13 +35,13 @@
35
35
  "node": ">=18"
36
36
  },
37
37
  "optionalDependencies": {
38
- "@dreamlake/dreamlake-cli-darwin-arm64": "0.97.1",
39
- "@dreamlake/dreamlake-cli-darwin-x64": "0.97.1",
40
- "@dreamlake/dreamlake-cli-linux-x64": "0.97.1",
41
- "@dreamlake/dreamlake-cli-linux-arm64": "0.97.1",
42
- "@dreamlake/dreamlake-cli-linux-x64-musl": "0.97.1",
43
- "@dreamlake/dreamlake-cli-linux-arm64-musl": "0.97.1",
44
- "@dreamlake/dreamlake-cli-win32-x64": "0.97.1",
45
- "@dreamlake/dreamlake-cli-win32-arm64": "0.97.1"
38
+ "@dreamlake/dreamlake-cli-darwin-arm64": "0.97.2",
39
+ "@dreamlake/dreamlake-cli-darwin-x64": "0.97.2",
40
+ "@dreamlake/dreamlake-cli-linux-x64": "0.97.2",
41
+ "@dreamlake/dreamlake-cli-linux-arm64": "0.97.2",
42
+ "@dreamlake/dreamlake-cli-linux-x64-musl": "0.97.2",
43
+ "@dreamlake/dreamlake-cli-linux-arm64-musl": "0.97.2",
44
+ "@dreamlake/dreamlake-cli-win32-x64": "0.97.2",
45
+ "@dreamlake/dreamlake-cli-win32-arm64": "0.97.2"
46
46
  }
47
47
  }