sessions: OpenCode's and Pi's sessions are listed too (貌似没有opencode和pi的session,能支持一下么) — Usage → Sessions, magpie sessions and the TUI read OpenCode's opencode.db (or $OPENCODE_DB) read-only, or its older storage/ JSON files when there is no database, under $XDG_DATA_HOME/opencode or ~/.local/share/opencode, a subagent's session counted under the one that started it; and Pi's JSONL sessions under $PI_CODING_AGENT_DIR or ~/.pi/agent, plus $PI_CODING_AGENT_SESSION_DIR or settings.json's sessionDir, a forked session not counting again what it copied from its parent. Each gets its title, folder, times, tokens per model with cache reads and writes, cost, and a resume command (opencode --session <id>, pi --session <id>); the folders note names only the agents that are there
This commit is contained in:
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "msg_0001",
|
||||
"sessionID": "ses_1a2b3c4d5e6fAAAAAAAAAAAAAA",
|
||||
"role": "user",
|
||||
"time": {
|
||||
"created": 1790416805000
|
||||
},
|
||||
"agent": "build",
|
||||
"model": {
|
||||
"providerID": "openai",
|
||||
"modelID": "gpt-6-astra"
|
||||
}
|
||||
}
|
||||
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"id": "msg_0002",
|
||||
"sessionID": "ses_1a2b3c4d5e6fAAAAAAAAAAAAAA",
|
||||
"role": "assistant",
|
||||
"parentID": "msg_0001",
|
||||
"modelID": "gpt-6-astra",
|
||||
"providerID": "openai",
|
||||
"mode": "build",
|
||||
"agent": "build",
|
||||
"cost": 0.01,
|
||||
"path": {
|
||||
"cwd": "/work/oc",
|
||||
"root": "/work/oc"
|
||||
},
|
||||
"tokens": {
|
||||
"input": 1000,
|
||||
"output": 100,
|
||||
"reasoning": 20,
|
||||
"cache": {
|
||||
"read": 5000,
|
||||
"write": 0
|
||||
}
|
||||
},
|
||||
"time": {
|
||||
"created": 1790416806000,
|
||||
"completed": 1790416830000
|
||||
},
|
||||
"finish": "tool-calls"
|
||||
}
|
||||
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"id": "msg_0003",
|
||||
"sessionID": "ses_1a2b3c4d5e6fAAAAAAAAAAAAAA",
|
||||
"role": "assistant",
|
||||
"parentID": "msg_0001",
|
||||
"modelID": "codex/gpt-6-luna",
|
||||
"providerID": "magpie",
|
||||
"mode": "build",
|
||||
"agent": "build",
|
||||
"cost": 0,
|
||||
"path": {
|
||||
"cwd": "/work/oc",
|
||||
"root": "/work/oc"
|
||||
},
|
||||
"tokens": {
|
||||
"total": 2360,
|
||||
"input": 300,
|
||||
"output": 50,
|
||||
"reasoning": 10,
|
||||
"cache": {
|
||||
"read": 2000,
|
||||
"write": 0
|
||||
}
|
||||
},
|
||||
"time": {
|
||||
"created": 1790416890000,
|
||||
"completed": 1790416980000
|
||||
},
|
||||
"finish": "stop"
|
||||
}
|
||||
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"id": "msg_0004",
|
||||
"sessionID": "ses_1a2b3c4d5e6fBBBBBBBBBBBBBB",
|
||||
"role": "assistant",
|
||||
"parentID": "msg_0000",
|
||||
"modelID": "claude-opus-5-5",
|
||||
"providerID": "anthropic",
|
||||
"mode": "general",
|
||||
"agent": "general",
|
||||
"cost": 0,
|
||||
"path": {
|
||||
"cwd": "/work/oc",
|
||||
"root": "/work/oc"
|
||||
},
|
||||
"tokens": {
|
||||
"input": 40,
|
||||
"output": 60,
|
||||
"reasoning": 0,
|
||||
"cache": {
|
||||
"read": 700,
|
||||
"write": 300
|
||||
}
|
||||
},
|
||||
"time": {
|
||||
"created": 1790416860000,
|
||||
"completed": 1790416890000
|
||||
},
|
||||
"finish": "stop"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"id": "prt_0001",
|
||||
"sessionID": "ses_1a2b3c4d5e6fAAAAAAAAAAAAAA",
|
||||
"messageID": "msg_0001",
|
||||
"type": "text",
|
||||
"text": "Why does the login test\nflake?"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "prt_0002",
|
||||
"sessionID": "ses_1a2b3c4d5e6fAAAAAAAAAAAAAA",
|
||||
"messageID": "msg_0001",
|
||||
"type": "text",
|
||||
"synthetic": true,
|
||||
"text": "Called the Read tool with the following input"
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "ses_1a2b3c4d5e6fAAAAAAAAAAAAAA",
|
||||
"slug": "brave-otter",
|
||||
"version": "1.1.53",
|
||||
"projectID": "0f3a",
|
||||
"directory": "/work/oc",
|
||||
"title": "Flaky test hunt",
|
||||
"time": {
|
||||
"created": 1790416800000,
|
||||
"updated": 1790416980000
|
||||
}
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "ses_1a2b3c4d5e6fBBBBBBBBBBBBBB",
|
||||
"slug": "calm-heron",
|
||||
"version": "1.1.53",
|
||||
"projectID": "0f3a",
|
||||
"parentID": "ses_1a2b3c4d5e6fAAAAAAAAAAAAAA",
|
||||
"directory": "/work/oc",
|
||||
"title": "Child session - 2026-09-26T10:01:00.000Z",
|
||||
"time": {
|
||||
"created": 1790416860000,
|
||||
"updated": 1790416890000
|
||||
}
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "ses_1a2b3c4d5e6fCCCCCCCCCCCCCC",
|
||||
"slug": "idle-crow",
|
||||
"version": "1.1.53",
|
||||
"projectID": "0f3a",
|
||||
"directory": "/work/oc",
|
||||
"title": "New session - 2026-09-26T09:00:00.000Z",
|
||||
"time": {
|
||||
"created": 1790413200000,
|
||||
"updated": 1790413200000
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user