Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Import your AI chat sessions into a local database, then browse and search them
| **Amp** | `~/.local/share/amp/threads/` |
| **Junie** | `~/.junie/sessions/` |
| **Kilocode** | `~/.kilocode/cli/` |
| **Gemini** | `~/.gemini/tmp/{project}/chats/` |

## Tech Stack

Expand Down
24 changes: 24 additions & 0 deletions src/adapters/gemini/__tests__/fixtures/assistant_simple.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"sessionId": "test-gemini-simple-123",
"projectHash": "78e0c7326cf29ebec3d3e54ec35141c0af295bdb67fc76f00e79dc9cff73ba00",
"startTime": "2026-02-08T17:00:00.000Z",
"lastUpdated": "2026-02-08T17:01:00.000Z",
"messages": [
{
"id": "msg-gemini-001",
"timestamp": "2026-02-08T17:01:00.000Z",
"type": "gemini",
"content": "This is a simple assistant response without thoughts or tool calls.",
"thoughts": [],
"tokens": {
"input": 100,
"output": 50,
"cached": 0,
"thoughts": 0,
"tool": 0,
"total": 150
},
"model": "gemini-3-flash-preview"
}
]
}
14 changes: 14 additions & 0 deletions src/adapters/gemini/__tests__/fixtures/error_message.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"sessionId": "test-error-123",
"projectHash": "78e0c7326cf29ebec3d3e54ec35141c0af295bdb67fc76f00e79dc9cff73ba00",
"startTime": "2026-02-08T17:00:00.000Z",
"lastUpdated": "2026-02-08T17:00:30.000Z",
"messages": [
{
"id": "msg-error-001",
"timestamp": "2026-02-08T17:00:30.000Z",
"type": "error",
"content": "An error occurred while processing your request"
}
]
}
14 changes: 14 additions & 0 deletions src/adapters/gemini/__tests__/fixtures/info_message.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"sessionId": "test-info-123",
"projectHash": "78e0c7326cf29ebec3d3e54ec35141c0af295bdb67fc76f00e79dc9cff73ba00",
"startTime": "2026-02-08T17:00:00.000Z",
"lastUpdated": "2026-02-08T17:00:10.000Z",
"messages": [
{
"id": "msg-info-001",
"timestamp": "2026-02-08T17:00:10.000Z",
"type": "info",
"content": "Gemini CLI update available! 0.25.1 → 0.27.3"
}
]
}
83 changes: 83 additions & 0 deletions src/adapters/gemini/__tests__/fixtures/mixed_conversation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"sessionId": "26d30166-6e7c-4881-bd90-233138784e9d",
"projectHash": "78e0c7326cf29ebec3d3e54ec35141c0af295bdb67fc76f00e79dc9cff73ba00",
"startTime": "2026-02-08T17:31:42.123Z",
"lastUpdated": "2026-02-08T17:34:00.665Z",
"messages": [
{
"id": "dd659bea-ce51-4962-892d-db3487116dcf",
"timestamp": "2026-02-08T17:31:42.123Z",
"type": "error",
"content": "Automatic update failed. Please try updating manually"
},
{
"id": "4632e760-f590-4410-b0c7-fcbfb5ff3d34",
"timestamp": "2026-02-08T17:33:08.759Z",
"type": "user",
"content": "welches project bin ich?"
},
{
"id": "76009b7d-3590-43f2-9b6a-9f02f19fef03",
"timestamp": "2026-02-08T17:33:43.688Z",
"type": "gemini",
"content": "I investigate the project's identity by examining `package.json` and `README.md`.",
"thoughts": [
{
"subject": "Determining Project Identity",
"description": "I'm zeroing in on the project. My current focus is the working directory: `/home/daniel/projects/my-mega-memory`. Initial clues point towards a Node.js project.",
"timestamp": "2026-02-08T17:33:43.197Z"
}
],
"tokens": {
"input": 8262,
"output": 47,
"cached": 0,
"thoughts": 102,
"tool": 0,
"total": 8411
},
"model": "gemini-3-flash-preview",
"toolCalls": [
{
"id": "read_file-1770572023519-b9f3f344bf8a2",
"name": "read_file",
"args": {
"file_path": "package.json"
},
"result": [
{
"functionResponse": {
"id": "read_file-1770572023519-b9f3f344bf8a2",
"name": "read_file",
"response": {
"output": "{\"name\": \"my-mega-memory\"}"
}
}
}
],
"status": "success",
"timestamp": "2026-02-08T17:33:43.742Z",
"resultDisplay": "",
"displayName": "ReadFile",
"description": "Reads and returns the content of a specified file"
}
]
},
{
"id": "e9dc2a09-495f-464e-9d8d-2f8f16629eee",
"timestamp": "2026-02-08T17:34:00.665Z",
"type": "gemini",
"content": "Du arbeitest am Projekt **My Mega Memory**.",
"thoughts": [],
"tokens": {
"input": 10485,
"output": 175,
"cached": 6625,
"thoughts": 0,
"tool": 0,
"total": 10660
},
"model": "gemini-3-flash-preview"
}
]
}
14 changes: 14 additions & 0 deletions src/adapters/gemini/__tests__/fixtures/user_message.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"sessionId": "test-user-simple-123",
"projectHash": "78e0c7326cf29ebec3d3e54ec35141c0af295bdb67fc76f00e79dc9cff73ba00",
"startTime": "2026-02-08T17:00:00.000Z",
"lastUpdated": "2026-02-08T17:01:00.000Z",
"messages": [
{
"id": "msg-user-001",
"timestamp": "2026-02-08T17:00:00.000Z",
"type": "user",
"content": "Hello, this is a simple user message"
}
]
}
140 changes: 140 additions & 0 deletions src/adapters/gemini/__tests__/fixtures/with_file_diff.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"sessionId": "1899196a-4467-45bb-98c2-382d29e32edc",
"projectHash": "78e0c7326cf29ebec3d3e54ec35141c0af295bdb67fc76f00e79dc9cff73ba00",
"startTime": "2026-02-11T17:39:50.911Z",
"lastUpdated": "2026-02-11T17:44:33.198Z",
"messages": [
{
"id": "d8b98385-ef3b-4233-b90f-69f50a66c731",
"timestamp": "2026-02-11T17:39:50.911Z",
"type": "user",
"content": [
{
"text": "hello world please read readme.md and create an simple hello file matching the project language"
}
]
},
{
"id": "6755075f-6ebd-4cce-bef9-cfda4d1d9bbe",
"timestamp": "2026-02-11T17:40:50.202Z",
"type": "gemini",
"content": "",
"toolCalls": [
{
"id": "read_file-1770831650172-144884a402315",
"name": "read_file",
"args": {
"file_path": "README.md"
},
"result": [
{
"functionResponse": {
"id": "read_file-1770831650172-144884a402315",
"name": "read_file",
"response": {
"output": "# My Mega Memory\n\nAI Chat Session Importer and Viewer"
}
}
}
],
"status": "success",
"timestamp": "2026-02-11T17:40:50.201Z",
"resultDisplay": "",
"displayName": "ReadFile"
}
],
"thoughts": [
{
"subject": "Starting Project Analysis",
"description": "I've begun by reading the project's documentation.",
"timestamp": "2026-02-11T17:40:50.049Z"
}
],
"model": "gemini-3-flash-preview",
"tokens": {
"input": 8477,
"output": 13,
"cached": 0,
"thoughts": 39,
"tool": 0,
"total": 8529
}
},
{
"id": "7dd4db6a-3a0e-426c-8560-e05a27191b70",
"timestamp": "2026-02-11T17:42:18.950Z",
"type": "gemini",
"content": "",
"toolCalls": [
{
"id": "write_file-1770831711720-1ec9ef3343b46",
"name": "write_file",
"args": {
"file_path": "src/hello.ts",
"content": "console.log(\"Hello, World!\");\n"
},
"result": [
{
"functionResponse": {
"id": "write_file-1770831711720-1ec9ef3343b46",
"name": "write_file",
"response": {
"output": "Successfully created and wrote to new file: /home/daniel/projects/my-mega-memory/src/hello.ts."
}
}
}
],
"status": "success",
"timestamp": "2026-02-11T17:42:18.950Z",
"resultDisplay": {
"fileDiff": "Index: hello.ts\n===================================================================\n--- hello.ts\tOriginal\n+++ hello.ts\tWritten\n@@ -0,0 +1,1 @@\n+console.log(\"Hello, World!\");\n",
"fileName": "hello.ts",
"filePath": "/home/daniel/projects/my-mega-memory/src/hello.ts",
"originalContent": "",
"newContent": "console.log(\"Hello, World!\");\n",
"isNewFile": true
},
"displayName": "WriteFile"
}
],
"thoughts": [
{
"subject": "Considering Initial Setup",
"description": "I've decided to start this project with a Node.js and TypeScript application.",
"timestamp": "2026-02-11T17:41:51.721Z"
}
],
"model": "gemini-3-flash-preview",
"tokens": {
"input": 10207,
"output": 25,
"cached": 0,
"thoughts": 35,
"tool": 0,
"total": 10267
}
},
{
"id": "44dfac0f-1f5c-4bc2-b678-27c2e537a187",
"timestamp": "2026-02-11T17:44:33.198Z",
"type": "gemini",
"content": "The `README.md` has been reviewed, and a `src/hello.ts` file has been created and verified.\n\n```typescript\n// src/hello.ts\nconsole.log(\"Hello, World!\");\n```\n\nYou can run it with `npx ts-node src/hello.ts`.",
"thoughts": [
{
"subject": "Creating a Basic Script",
"description": "I've successfully created and executed the `hello.ts` file.",
"timestamp": "2026-02-11T17:44:33.107Z"
}
],
"model": "gemini-3-flash-preview",
"tokens": {
"input": 10932,
"output": 65,
"cached": 0,
"thoughts": 41,
"tool": 0,
"total": 11038
}
}
]
}
Loading