Skip to content

Commit b98df9b

Browse files
committed
fix: list all sessions regardless of git context (anomalyco#15678)
Use Session.listGlobal instead of Session.list to show all sessions regardless of current project/git context.
1 parent 2a20822 commit b98df9b

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎packages/opencode/src/cli/cmd/export.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const ExportCommand = cmd({
2727
})
2828

2929
const sessions = []
30-
for await (const session of Session.list()) {
30+
for await (const session of Session.listGlobal()) {
3131
sessions.push(session)
3232
}
3333

‎packages/opencode/src/cli/cmd/session.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ export const SessionListCommand = cmd({
8787
},
8888
handler: async (args) => {
8989
await bootstrap(process.cwd(), async () => {
90-
const sessions = [...Session.list({ roots: true, limit: args.maxCount })]
90+
// Use listGlobal to show all sessions regardless of current project/git context
91+
const sessions = [...Session.listGlobal({ roots: true, limit: args.maxCount })]
9192

9293
if (sessions.length === 0) {
9394
return

0 commit comments

Comments
 (0)