mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
refactor: extract CredentialProvider service and consolidate git-auth utilities (#283)
* refactor: extract CredentialProvider service and consolidate git-auth utilities * refactor: add git-credentials route and gh env plugin, pass internal token to OpenCode * refactor: update credential provider integration and git route * refactor: integrate credential provider across git auth, routes, and IPC
This commit is contained in:
1 parent
ba08f5c24a
commit
7c8a4fe64c
31 files changed
+1136
-132
No files matched your search
@@ -15,6 +15,7 @@ export const RepoSchema = z.object({
|
||||
lastPulled: z.number().optional(),
|
||||
lastAccessedAt: z.number().optional(),
|
||||
openCodeConfigName: z.string().optional(),
|
||||
gitCredentialId: z.string().optional(),
|
||||
isWorktree: z.boolean().optional(),
|
||||
isLocal: z.boolean().optional(),
|
||||
})
|
||||
|
||||
@@ -83,6 +83,7 @@ export const DEFAULT_KEYBOARD_SHORTCUTS: Record<string, string> = {
|
||||
};
|
||||
|
||||
export const GitCredentialSchema = z.object({
|
||||
id: z.string().optional(),
|
||||
name: z.string(),
|
||||
host: z.string(),
|
||||
type: z.enum(['pat', 'ssh']).default('pat'),
|
||||
@@ -146,6 +147,7 @@ export const UserPreferencesSchema = z.object({
|
||||
keyboardShortcuts: z.record(z.string(), z.string()),
|
||||
customCommands: z.array(CustomCommandSchema),
|
||||
gitCredentials: z.array(GitCredentialSchema).optional(),
|
||||
defaultGitCredentialId: z.string().optional(),
|
||||
gitIdentity: GitIdentitySchema.optional(),
|
||||
tts: TTSConfigSchema.optional(),
|
||||
stt: STTConfigSchema.optional(),
|
||||
@@ -197,6 +199,7 @@ export const DEFAULT_USER_PREFERENCES = {
|
||||
customCommands: [],
|
||||
customAgents: [],
|
||||
gitCredentials: [] as GitCredential[],
|
||||
defaultGitCredentialId: undefined as string | undefined,
|
||||
gitIdentity: DEFAULT_GIT_IDENTITY,
|
||||
tts: DEFAULT_TTS_CONFIG,
|
||||
stt: DEFAULT_STT_CONFIG,
|
||||
|
||||
Reference in new issue
Block a user