mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
Add local repository support and permission request handling
This commit is contained in:
1 parent
9a2ebc9652
commit
83834e7ed7
22 files changed
+685
-120
No files matched your search
@@ -4,7 +4,7 @@ export const RepoStatusSchema = z.enum(['cloning', 'ready', 'error'])
|
||||
|
||||
export const RepoSchema = z.object({
|
||||
id: z.number(),
|
||||
repoUrl: z.string().url(),
|
||||
repoUrl: z.string().url().optional(),
|
||||
localPath: z.string(),
|
||||
fullPath: z.string(),
|
||||
branch: z.string().optional(),
|
||||
@@ -14,11 +14,19 @@ export const RepoSchema = z.object({
|
||||
lastPulled: z.number().optional(),
|
||||
openCodeConfigName: z.string().optional(),
|
||||
isWorktree: z.boolean().optional(),
|
||||
isLocal: z.boolean().optional(),
|
||||
})
|
||||
|
||||
export const CreateRepoRequestSchema = z.object({
|
||||
repoUrl: z.string().url(),
|
||||
repoUrl: z.string().url().optional(),
|
||||
localPath: z.string().optional(),
|
||||
branch: z.string().optional(),
|
||||
openCodeConfigName: z.string().optional(),
|
||||
useWorktree: z.boolean().optional(),
|
||||
})
|
||||
}).refine(
|
||||
(data) => data.repoUrl || data.localPath,
|
||||
{
|
||||
message: "Either repoUrl or localPath must be provided",
|
||||
path: ["repoUrl"],
|
||||
}
|
||||
)
|
||||
Reference in new issue
Block a user