mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-18 15:28:48 +03:00
fix(tui): scope session picker by directory (#42804)
This commit is contained in:
committed by
GitHub
Unverified
parent
58a36a1560
commit
55be895e14
@@ -1,6 +1,7 @@
|
||||
import { createMemo, createResource, createSignal, onMount, Show } from "solid-js"
|
||||
import path from "path"
|
||||
import type { SessionInfo } from "@opencode-ai/client"
|
||||
import { Project } from "@opencode-ai/schema/project"
|
||||
import { TextAttributes } from "@opentui/core"
|
||||
import type { RGBA } from "@opentui/core"
|
||||
import { useDialog } from "../ui/dialog"
|
||||
@@ -54,10 +55,12 @@ export function DialogSessionList() {
|
||||
const response = await client.api.session.list({
|
||||
...(allProjects
|
||||
? {}
|
||||
: {
|
||||
project: current.project.id,
|
||||
subpath: path.relative(current.project.directory, current.directory).replaceAll("\\", "/"),
|
||||
}),
|
||||
: current.project.id === Project.ID.global
|
||||
? { directory: current.directory }
|
||||
: {
|
||||
project: current.project.id,
|
||||
subpath: path.relative(current.project.directory, current.directory).replaceAll("\\", "/"),
|
||||
}),
|
||||
...(query ? { search: query } : {}),
|
||||
limit: 50,
|
||||
order: "desc",
|
||||
|
||||
Reference in New Issue
Block a user