* feat: discover local repos and reconnect OpenCode sessions

Replace one-by-one local repo setup with parent-folder discovery and path-aware repo linking so first-time installs can recover existing OpenCode chats. Add first-run import support and onboarding docs for standalone OpenCode users, including Docker path-matching guidance.

* fix: address session discovery review feedback

* fix: improve delete/unlink messaging for local vs cloned repos

* feat: discover local repos and reconnect OpenCode sessions (#158)

---------

Co-authored-by: itz4blitz <justinscroggins@outlook.com>
Co-authored-by: itz4blitz <60281870+itz4blitz@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-03-20 21:06:09 -04:00
1 parent 8d9a8ba36a
commit 21a2094cfd
30 files changed
+1073 -312

No files matched your search

+9
View File
@@ -1,6 +1,7 @@
import type { Repo } from './types'
import { FetchError, fetchWrapper, fetchWrapperVoid, fetchWrapperBlob } from './fetchWrapper'
import { API_BASE_URL } from '@/config'
import type { DiscoverReposResponse } from '@opencode-manager/shared/types'
export async function createRepo(
repoUrl?: string,
@@ -21,6 +22,14 @@ export async function listRepos(): Promise<Repo[]> {
return fetchWrapper(`${API_BASE_URL}/api/repos`)
}
export async function discoverRepos(rootPath: string, maxDepth?: number): Promise<DiscoverReposResponse> {
return fetchWrapper(`${API_BASE_URL}/api/repos/discover`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ rootPath, maxDepth }),
})
}
export async function getRepo(id: number): Promise<Repo> {
return fetchWrapper(`${API_BASE_URL}/api/repos/${id}`)
}
+3 -1
View File
@@ -1,8 +1,9 @@
export interface Repo {
id: number
repoUrl: string
repoUrl?: string
localPath: string
fullPath: string
sourcePath?: string
branch?: string
currentBranch?: string
defaultBranch: string
@@ -11,6 +12,7 @@ export interface Repo {
lastPulled?: number
openCodeConfigName?: string
isWorktree?: boolean
isLocal?: boolean
}
import type { components } from './opencode-types'