mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
tui: show all project sessions from any working directory
Previously sessions were only listed if they were created in the current working directory or its subdirectories. Users can now view and switch to any session in the project regardless of which directory they're in.
This commit is contained in:
parent
179c40749d
commit
b020758446
@ -507,8 +507,8 @@ export namespace Session {
|
||||
|
||||
export function* list() {
|
||||
const project = Instance.project
|
||||
const rel = path.relative(Instance.worktree, Instance.directory)
|
||||
const suffix = path.sep + rel
|
||||
// const rel = path.relative(Instance.worktree, Instance.directory)
|
||||
// const suffix = path.sep + rel
|
||||
const rows = Database.use((db) =>
|
||||
db
|
||||
.select()
|
||||
@ -516,7 +516,7 @@ export namespace Session {
|
||||
.where(
|
||||
and(
|
||||
eq(SessionTable.project_id, project.id),
|
||||
or(eq(SessionTable.directory, Instance.directory), like(SessionTable.directory, `%${suffix}`)),
|
||||
// or(eq(SessionTable.directory, Instance.directory), like(SessionTable.directory, `%${suffix}`)),
|
||||
),
|
||||
)
|
||||
.all(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user