mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-19 03:13:25 +00:00
fix(tui): show worktree names in session list (#42108)
This commit is contained in:
parent
3251bff6ff
commit
dff6eb631b
1 changed files with 5 additions and 5 deletions
|
|
@ -141,11 +141,11 @@ export function DialogSessionList() {
|
|||
const option = (session: SessionInfo, category: string) => {
|
||||
const directory = session.location.directory
|
||||
const project = data.project.get(session.projectID)
|
||||
const relative = path.relative(project?.canonical ?? directory, directory)
|
||||
const footer = allProjects()
|
||||
? Locale.truncate(projectName(project, directory) ?? "", 20)
|
||||
: relative.startsWith("..") || path.isAbsolute(relative)
|
||||
? Locale.truncate(path.basename(directory), 20)
|
||||
const root = session.subpath ? path.resolve(directory, ...session.subpath.split("/").map(() => "..")) : directory
|
||||
const relative = path.relative(project?.canonical ?? root, root)
|
||||
const footer =
|
||||
relative.startsWith("..") || path.isAbsolute(relative)
|
||||
? Locale.truncate(path.basename(relative), 25)
|
||||
: undefined
|
||||
const slot = sessionTabs.enabled() ? undefined : slotByID.get(session.id)
|
||||
const deleting = toDelete() === session.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue