claude-bridge-cli 1.2.8 → 1.2.9
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/lib/bridge.js +4 -4
- package/package.json +1 -1
package/lib/bridge.js
CHANGED
|
@@ -139,13 +139,13 @@ function parseSessionFile(filePath) {
|
|
|
139
139
|
if (!preview && !looksLikeInternal(text)) preview = text.slice(0, 200);
|
|
140
140
|
}
|
|
141
141
|
if (obj.type === "result" && obj.result?.metadata?.title?.value) aiTitle = aiTitle || obj.result.metadata.title.value;
|
|
142
|
-
if (obj.type === "ai-title"
|
|
142
|
+
if (obj.type === "ai-title") aiTitle = obj.aiTitle || obj.title || aiTitle;
|
|
143
|
+
if (obj.type === "custom-title") customTitle = obj.customTitle || obj.title || customTitle;
|
|
143
144
|
} catch {}
|
|
144
145
|
}
|
|
145
146
|
if (stat.size > CHUNK) {
|
|
146
147
|
const tailBuf = Buffer.alloc(CHUNK);
|
|
147
148
|
fs.readSync(fd, tailBuf, 0, CHUNK, stat.size - CHUNK);
|
|
148
|
-
// Skip first (possibly partial) line
|
|
149
149
|
const tail = tailBuf.toString("utf8");
|
|
150
150
|
const tailLines = tail.split("\n");
|
|
151
151
|
if (tailLines.length > 1) tailLines.shift();
|
|
@@ -157,8 +157,8 @@ function parseSessionFile(filePath) {
|
|
|
157
157
|
const text = typeof obj.message.content === "string" ? obj.message.content : JSON.stringify(obj.message.content);
|
|
158
158
|
if (!looksLikeInternal(text)) lastPrompt = text.slice(0, 200);
|
|
159
159
|
}
|
|
160
|
-
if (obj.type === "
|
|
161
|
-
if (obj.type === "
|
|
160
|
+
if (obj.type === "ai-title") aiTitle = obj.aiTitle || obj.title || aiTitle;
|
|
161
|
+
if (obj.type === "custom-title") customTitle = obj.customTitle || obj.title || customTitle;
|
|
162
162
|
} catch {}
|
|
163
163
|
}
|
|
164
164
|
}
|
package/package.json
CHANGED