Hacker News new | ask | show | jobs
by gabrielsroka 78 days ago
You can download your conversations.json file.

Or JS to call Claude's APIs (from the browser) to see/search/download old conversations. there's more to it than this, but it's a start:

    const search = 'fetch =';
    
    console.clear();
    const org = intercomSettings.lastActiveOrgUuid;
    for (var o = 0; ; o += 30) {
        const r = await fetch(`/api/organizations/${org}/chat_conversations_v2?limit=30&offset=${o}&consistency=eventual`);
        const ccs = await r.json();
        ccs.data.forEach(async cc => {
            const r = await fetch(`/api/organizations/${org}/chat_conversations/${cc.uuid}?tree=True&rendering_mode=messages&render_all_tools=true&consistency=strong`);
            const c = await r.json();
            for (const cm of c.chat_messages) {
                for (const co of cm.content) {
                    if (co.text?.includes(search)) {
                        console.log('https://claude.ai/chat/' + c.uuid, c.name);
                        console.log(co.text);
                    }
                }
            }
        });
        if (!ccs.has_more) break;
    }
1 comments

Nice, that works well for Claude on its own. My itch was more the cross-tool problem, not knowing which LLM a conversation was even in before I could search it.