mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
fix(navigation): show Assistant sessions in the sidebar and repo switcher (#368)
This commit is contained in:
1 parent
a1b7f58aae
commit
e80016cc22
11 files changed
+69
-26
No files matched your search
@@ -135,11 +135,13 @@ function getPathBaseName(filePath: string): string {
|
||||
}
|
||||
|
||||
export function getRepoDisplayName(repo: {
|
||||
id?: number
|
||||
name?: string | null
|
||||
repoUrl?: string | null
|
||||
localPath?: string | null
|
||||
sourcePath?: string | null
|
||||
}): string {
|
||||
if (repo.id === ASSISTANT_REPO_ID) return ASSISTANT_REPO_NAME
|
||||
if (repo.name && repo.name.trim()) return repo.name.trim()
|
||||
const fromLocalPath = repo.localPath ? getPathBaseName(repo.localPath) : ''
|
||||
if (repo.repoUrl) return getRepoNameFromUrl(repo.repoUrl) || fromLocalPath || 'Repository'
|
||||
|
||||
Reference in new issue
Block a user