session-navigation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSession navigation
会话导航
Find your way around past Droid sessions. Maybe you want to pick up where you left off, find that thing you did last week, or just see what's been happening in a project.
查找过往Droid会话的相关内容。你可能想从中断处继续工作、找到上周处理的事项,或者查看某个项目的进展情况。
Where sessions live
会话存储位置
Sessions are in , organized by project folder. Each project gets its own directory with the path encoded (slashes become dashes):
~/.factory/sessions/~/.factory/sessions/
├── -Users-enoreyes-code-work-myapp/
│ ├── <uuid>.jsonl
│ └── <uuid>.settings.json
├── -Users-enoreyes-code-projects-api/
│ ├── <uuid>.jsonl
│ └── <uuid>.settings.json
└── ...Two files per session:
The conversation (): Each line is a JSON object. First line has metadata (session id, title, working directory). Rest is the back-and-forth: user messages, assistant responses, tool calls.
.jsonlThe settings (): Stats about the session. Which model, how long it ran, token counts, autonomy mode.
.settings.json会话存储在 目录下,按项目文件夹组织。每个项目都有自己的目录,路径中的斜杠会替换为短横线:
~/.factory/sessions/~/.factory/sessions/
├── -Users-enoreyes-code-work-myapp/
│ ├── <uuid>.jsonl
│ └── <uuid>.settings.json
├── -Users-enoreyes-code-projects-api/
│ ├── <uuid>.jsonl
│ └── <uuid>.settings.json
└── ...每个会话对应两个文件:
会话对话文件():每一行是一个JSON对象。第一行包含元数据(会话ID、标题、工作目录),其余行是对话内容:用户消息、助手回复、工具调用记录。
.jsonl会话设置文件():会话相关统计信息,包括使用的模型、运行时长、令牌数量、自主模式等。
.settings.jsonFinding sessions
查找会话
List project folders
列出项目文件夹
bash
undefinedbash
undefinedSee all project folders with sessions
查看所有包含会话的项目文件夹
ls ~/.factory/sessions/
ls ~/.factory/sessions/
Find folders for a specific project (partial match)
查找特定项目的文件夹(支持部分匹配)
ls ~/.factory/sessions/ | grep "myapp"
undefinedls ~/.factory/sessions/ | grep "myapp"
undefinedRecent sessions in a project
项目中的近期会话
bash
undefinedbash
undefinedList sessions by date for a project
按日期列出项目的会话
ls -lt ~/.factory/sessions/-Users-enoreyes-code-work-myapp/
ls -lt ~/.factory/sessions/-Users-enoreyes-code-work-myapp/
Get titles of recent sessions
获取近期会话的标题
for f in $(ls -t ~/.factory/sessions/-Users-enoreyes-code-work-myapp/*.jsonl | head -10); do
echo "=== $f ==="
head -1 "$f" | jq -r '.title // "Untitled"'
done
undefinedfor f in $(ls -t ~/.factory/sessions/-Users-enoreyes-code-work-myapp/*.jsonl | head -10); do
echo "=== $f ==="
head -1 "$f" | jq -r '.title // "Untitled"'
done
undefinedSearch by content
按内容搜索
bash
undefinedbash
undefinedSearch across ALL sessions
在所有会话中搜索
rg "authentication" ~/.factory/sessions/
rg "authentication" ~/.factory/sessions/
Search within a specific project
在特定项目中搜索
rg "bug fix" ~/.factory/sessions/-Users-enoreyes-code-work-myapp/
rg "bug fix" ~/.factory/sessions/-Users-enoreyes-code-work-myapp/
See matches in context
查看匹配内容的上下文
rg -C 2 "login" ~/.factory/sessions/-Users-enoreyes-code-projects-api/
undefinedrg -C 2 "login" ~/.factory/sessions/-Users-enoreyes-code-projects-api/
undefinedFind which project has sessions about something
查找包含特定内容的项目会话
bash
undefinedbash
undefinedWhich projects have sessions mentioning "redis"?
哪些项目的会话中提到了 "redis"?
rg -l "redis" ~/.factory/sessions/ | cut -d'/' -f1-5 | sort -u
undefinedrg -l "redis" ~/.factory/sessions/ | cut -d'/' -f1-5 | sort -u
undefinedReading a session
读取会话内容
Once you've found a session file:
bash
undefined找到会话文件后:
bash
undefinedThe metadata (title, working directory)
查看元数据(标题、工作目录)
head -1 ~/.factory/sessions/-Users-enoreyes-code-work-myapp/<uuid>.jsonl | jq .
head -1 ~/.factory/sessions/-Users-enoreyes-code-work-myapp/<uuid>.jsonl | jq .
Session stats (model, tokens, duration)
查看会话统计信息(模型、令牌数、时长)
cat ~/.factory/sessions/-Users-enoreyes-code-work-myapp/<uuid>.settings.json | jq .
cat ~/.factory/sessions/-Users-enoreyes-code-work-myapp/<uuid>.settings.json | jq .
How long was this conversation?
查看对话的行数(即会话长度)
wc -l ~/.factory/sessions/-Users-enoreyes-code-work-myapp/<uuid>.jsonl
User messages have `"role": "user"`, assistant responses have `"role": "assistant"`. Tool calls show what commands ran and what files got touched.wc -l ~/.factory/sessions/-Users-enoreyes-code-work-myapp/<uuid>.jsonl
用户消息的`"role"`字段为`"user"`,助手回复的`"role"`字段为`"assistant"`。工具调用记录会显示运行的命令和操作的文件。Common situations
常见场景
"What did I work on in this project?"
List that project's session folder, check dates, read through the conversation files.
"Find that session where we fixed the login bug"
Search for "login" or "auth" across sessions. Once you find it, read the conversation.
"Resume what I was doing"
Find the session, read through what happened, summarize the key decisions before continuing.
"How much have I been using Droid?"
The settings files have token counts and active time. Sum across sessions if needed.
“我在这个项目中做了什么?”
列出该项目的会话文件夹,查看日期,阅读对话文件。
“找到修复登录bug的那个会话”
在所有会话中搜索“login”或“auth”关键词。找到后,阅读对话内容。
“从中断处继续工作”
找到对应的会话,回顾之前的内容,总结关键决策后再继续。
“我使用Droid的频率有多高?”
设置文件中包含令牌数量和活跃时长,如有需要可汇总所有会话的数据。
Tips
小贴士
Use (ripgrep) instead of grep. It's faster and handles nested folders better.
rgProject paths have slashes replaced with dashes. becomes .
/Users/me/code/app-Users-me-code-appThe session title isn't always helpful. Sometimes you need to read the conversation to know what it was about.
Sessions can contain sensitive stuff. Be careful about what you surface.
使用(ripgrep)替代grep,它速度更快,更适合处理嵌套文件夹。
rg项目路径中的斜杠会被替换为短横线,例如会变为。
/Users/me/code/app-Users-me-code-app会话标题有时不够直观,可能需要阅读对话内容才能了解会话主题。
会话中可能包含敏感信息,查看时需谨慎。