claude-bridge-cli 2.0.18 → 2.0.19
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 +10 -3
- package/package.json +1 -1
package/lib/bridge.js
CHANGED
|
@@ -443,7 +443,7 @@ function searchSessions(query, limit = 30) {
|
|
|
443
443
|
const snippetEnd = Math.min(content.length, idx + q.length + 80);
|
|
444
444
|
const snippet = content.slice(snippetStart, snippetEnd).replace(/\n/g, " ").trim();
|
|
445
445
|
|
|
446
|
-
let aiTitle = "", msgCount = 0, realCwd = "";
|
|
446
|
+
let aiTitle = "", customTitle = "", msgCount = 0, realCwd = "";
|
|
447
447
|
try {
|
|
448
448
|
const lines = content.split("\n").filter(Boolean);
|
|
449
449
|
msgCount = lines.length;
|
|
@@ -454,11 +454,18 @@ function searchSessions(query, limit = 30) {
|
|
|
454
454
|
if (obj.type === "result" && obj.result?.metadata?.title?.value) {
|
|
455
455
|
aiTitle = obj.result.metadata.title.value;
|
|
456
456
|
}
|
|
457
|
-
|
|
458
|
-
|
|
457
|
+
// The records carry `aiTitle` / `customTitle` — NOT `title`. Reading
|
|
458
|
+
// obj.title (as this did) matched nothing, so every search result
|
|
459
|
+
// rendered untitled and renames were invisible here even though the
|
|
460
|
+
// session LIST resolved them correctly. Track the two separately:
|
|
461
|
+
// a user rename must WIN, because the CLI re-appends its ai-title
|
|
462
|
+
// after every turn and last-record-wins would revert it.
|
|
463
|
+
if (obj.type === "ai-title") aiTitle = obj.aiTitle || obj.title || aiTitle;
|
|
464
|
+
if (obj.type === "custom-title") customTitle = obj.customTitle || obj.title || customTitle;
|
|
459
465
|
} catch {}
|
|
460
466
|
}
|
|
461
467
|
} catch {}
|
|
468
|
+
aiTitle = customTitle || aiTitle;
|
|
462
469
|
|
|
463
470
|
results.push({
|
|
464
471
|
id, project,
|
package/package.json
CHANGED