mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
feat(worktree): worktree tabs, server env vars, and multi-directory SSE (#240)
* loop: worktree-tabs-2 completed after 4 iterations * loop: server-env-vars completed after 7 iterations * feat(worktree): add worktree tabs and server env vars settings * refactor(worktree): multi-directory SSE support and workspace chip row * feat(workspace): collapsible workspace manager and sibling filtering * feat(workspace): workspace creation endpoint, refactored workspace manager, and tests * refactor(frontend): unify workspace label and remove dead code - extract shared workspaceLabel helper into api/repos and reuse in WorkspaceManager and RepoDetail directoryLabels - remove unused useSessions hook and subscribeToDirectory subscription - drop redundant frontend workspace dedup now guaranteed by backend - align WorktreeTabs empty-state test with create-workspace button
This commit is contained in:
1 parent
60ed756a0b
commit
b9236f7f20
38 files changed
+2423
-133
No files matched your search
@@ -103,6 +103,29 @@ export const GitIdentitySchema = z.object({
|
||||
|
||||
export type GitIdentity = z.infer<typeof GitIdentitySchema>;
|
||||
|
||||
export const ServerEnvVarSchema = z.object({
|
||||
key: z.string().min(1),
|
||||
value: z.string(),
|
||||
});
|
||||
|
||||
type ServerEnvVar = z.infer<typeof ServerEnvVarSchema>
|
||||
|
||||
export const DEFAULT_SERVER_ENV_VARS = [
|
||||
{
|
||||
key: 'OPENCODE_EXPERIMENTAL_WORKSPACES',
|
||||
value: 'true',
|
||||
},
|
||||
] as const satisfies readonly ServerEnvVar[];
|
||||
|
||||
export const BLOCKED_SERVER_ENV_KEYS = [
|
||||
'OPENCODE_SERVER_PASSWORD',
|
||||
'OPENCODE_SERVER_USERNAME',
|
||||
'OPENCODE_CONFIG',
|
||||
'XDG_DATA_HOME',
|
||||
'XDG_STATE_HOME',
|
||||
'XDG_CONFIG_HOME',
|
||||
] as const;
|
||||
|
||||
export const DEFAULT_GIT_IDENTITY: GitIdentity = {
|
||||
name: 'OpenCode Agent',
|
||||
email: '',
|
||||
@@ -130,6 +153,8 @@ export const UserPreferencesSchema = z.object({
|
||||
lastKnownGoodConfig: z.string().optional(),
|
||||
repoOrder: z.array(z.number()).optional(),
|
||||
repoSortMode: z.enum(['recent', 'manual', 'name']).optional(),
|
||||
serverEnvVars: z.array(ServerEnvVarSchema).optional(),
|
||||
disabledDefaultServerEnvVars: z.array(z.string()).optional(),
|
||||
});
|
||||
|
||||
export const DEFAULT_TTS_CONFIG: TTSConfig = {
|
||||
@@ -177,6 +202,8 @@ export const DEFAULT_USER_PREFERENCES = {
|
||||
stt: DEFAULT_STT_CONFIG,
|
||||
notifications: DEFAULT_NOTIFICATION_PREFERENCES,
|
||||
repoSortMode: 'recent' as const,
|
||||
serverEnvVars: [] as ServerEnvVar[],
|
||||
disabledDefaultServerEnvVars: [] as string[],
|
||||
};
|
||||
|
||||
export const SettingsResponseSchema = z.object({
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
CreateOpenCodeConfigRequestSchema,
|
||||
UpdateOpenCodeConfigRequestSchema,
|
||||
OpenCodeConfigResponseSchema,
|
||||
ServerEnvVarSchema,
|
||||
} from '../schemas/settings'
|
||||
import {
|
||||
RepoSchema,
|
||||
@@ -51,6 +52,7 @@ export type UserPreferences = z.infer<typeof UserPreferencesSchema>
|
||||
export type SettingsResponse = z.infer<typeof SettingsResponseSchema>
|
||||
export type UpdateSettingsRequest = z.infer<typeof UpdateSettingsRequestSchema>
|
||||
export type CustomCommand = z.infer<typeof CustomCommandSchema>
|
||||
export type ServerEnvVar = z.infer<typeof ServerEnvVarSchema>
|
||||
export type OpenCodeConfig = z.infer<typeof OpenCodeConfigMetadataSchema>
|
||||
export type OpenCodeConfigInput = z.infer<typeof OpenCodeConfigSchema>
|
||||
export type CreateOpenCodeConfigRequest = z.infer<typeof CreateOpenCodeConfigRequestSchema>
|
||||
@@ -90,6 +92,7 @@ export type AssistantSettingsPatch = z.infer<typeof AssistantSettingsPatchSchema
|
||||
|
||||
export { FetchError } from './errors'
|
||||
export type { ApiErrorResponse, ApiErrorCode, GitErrorCode } from './errors'
|
||||
export { BLOCKED_SERVER_ENV_KEYS, DEFAULT_SERVER_ENV_VARS } from '../schemas/settings'
|
||||
|
||||
export interface SuccessResponse {
|
||||
success: boolean
|
||||
|
||||
Reference in new issue
Block a user