mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
Pr 158 (#161)
* 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:
30 files changed
+1073
-312
No files matched your search
@@ -7,6 +7,7 @@ export const RepoSchema = z.object({
|
||||
repoUrl: z.string().url().optional(),
|
||||
localPath: z.string(),
|
||||
fullPath: z.string(),
|
||||
sourcePath: z.string().optional(),
|
||||
branch: z.string().optional(),
|
||||
defaultBranch: z.string(),
|
||||
cloneStatus: RepoStatusSchema,
|
||||
@@ -31,3 +32,20 @@ export const CreateRepoRequestSchema = z.object({
|
||||
path: ["repoUrl"],
|
||||
}
|
||||
)
|
||||
|
||||
export const DiscoverReposRequestSchema = z.object({
|
||||
rootPath: z.string().trim().min(1),
|
||||
maxDepth: z.number().int().min(0).max(8).optional(),
|
||||
})
|
||||
|
||||
export const DiscoverReposResponseSchema = z.object({
|
||||
repos: z.array(RepoSchema),
|
||||
discoveredCount: z.number().int().nonnegative(),
|
||||
existingCount: z.number().int().nonnegative(),
|
||||
errors: z.array(
|
||||
z.object({
|
||||
path: z.string(),
|
||||
error: z.string(),
|
||||
})
|
||||
),
|
||||
})
|
||||
@@ -13,6 +13,8 @@ import {
|
||||
import {
|
||||
RepoSchema,
|
||||
CreateRepoRequestSchema,
|
||||
DiscoverReposRequestSchema,
|
||||
DiscoverReposResponseSchema,
|
||||
RepoStatusSchema,
|
||||
} from '../schemas/repo'
|
||||
import {
|
||||
@@ -48,6 +50,8 @@ export type OpenCodeConfigResponse = z.infer<typeof OpenCodeConfigResponseSchema
|
||||
|
||||
export type Repo = z.infer<typeof RepoSchema>
|
||||
export type CreateRepoRequest = z.infer<typeof CreateRepoRequestSchema>
|
||||
export type DiscoverReposRequest = z.infer<typeof DiscoverReposRequestSchema>
|
||||
export type DiscoverReposResponse = z.infer<typeof DiscoverReposResponseSchema>
|
||||
export type RepoStatus = z.infer<typeof RepoStatusSchema>
|
||||
|
||||
export type FileInfo = z.infer<typeof FileInfoSchema>
|
||||
|
||||
Reference in new issue
Block a user