Skip to content

Commit 8c7a95a

Browse files
sedelevclaude
andcommitted
feed-memex: emit ai-title record so memex shows readable chat names
Memex's importer reads ai-title records from inbox JSONLs to give each imported chat a human-readable title in list_conversations / search. We had session.title in scope already (extracted by the scanner), but weren't passing it through — so every Claude Code/Cowork chat in memex appeared as 'Claude Code · <8-char-file-stem>'. Now feed-memex prepends one ai-title line to each output JSONL. Existing memex installations pick this up via upsertConversation's ON CONFLICT update on the next feed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3202869 commit 8c7a95a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

claude_backup/cli.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,18 @@ def feed_memex_cmd(ctx: click.Context, inbox: Path, dry_run: bool) -> None:
396396
)
397397
else:
398398
with target.open("w", encoding="utf-8") as f:
399+
# Memex looks for an `ai-title` record to give the chat
400+
# a human-readable name in list_conversations / search.
401+
# Without this it falls back to the first user message
402+
# (or the file stem if there is none).
403+
if session.title:
404+
f.write(
405+
json.dumps(
406+
{"type": "ai-title", "aiTitle": session.title},
407+
ensure_ascii=False,
408+
)
409+
+ "\n"
410+
)
399411
for line in lines:
400412
f.write(json.dumps(line, ensure_ascii=False) + "\n")
401413
written += 1

0 commit comments

Comments
 (0)