mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
Add configurable global git identity settings with new Git tab (#43)
This commit is contained in:
1 parent
1382916b97
commit
f1a7d36433
7 files changed
+378
-171
No files matched your search
@@ -69,6 +69,18 @@ export const GitCredentialSchema = z.object({
|
||||
|
||||
export type GitCredential = z.infer<typeof GitCredentialSchema>;
|
||||
|
||||
export const GitIdentitySchema = z.object({
|
||||
name: z.string(),
|
||||
email: z.string(),
|
||||
});
|
||||
|
||||
export type GitIdentity = z.infer<typeof GitIdentitySchema>;
|
||||
|
||||
export const DEFAULT_GIT_IDENTITY: GitIdentity = {
|
||||
name: '',
|
||||
email: '',
|
||||
};
|
||||
|
||||
export const UserPreferencesSchema = z.object({
|
||||
theme: z.enum(["dark", "light", "system"]),
|
||||
mode: z.enum(["plan", "build"]),
|
||||
@@ -82,6 +94,7 @@ export const UserPreferencesSchema = z.object({
|
||||
customCommands: z.array(CustomCommandSchema),
|
||||
customAgents: z.array(CustomAgentSchema),
|
||||
gitCredentials: z.array(GitCredentialSchema).optional(),
|
||||
gitIdentity: GitIdentitySchema.optional(),
|
||||
tts: TTSConfigSchema.optional(),
|
||||
lastKnownGoodConfig: z.string().optional(),
|
||||
});
|
||||
@@ -111,6 +124,7 @@ export const DEFAULT_USER_PREFERENCES = {
|
||||
customCommands: [],
|
||||
customAgents: [],
|
||||
gitCredentials: [] as GitCredential[],
|
||||
gitIdentity: DEFAULT_GIT_IDENTITY,
|
||||
tts: DEFAULT_TTS_CONFIG,
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user