mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
fix(navigation): show Assistant sessions in the sidebar and repo switcher
This commit is contained in:
1 parent
68b13c8e35
commit
3e5a20faa4
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