Skip to content

Commit 8006cf7

Browse files
committed
Align dashboard config naming
1 parent 573fc42 commit 8006cf7

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

dashboard/src/components/new-mission-dialog.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ vi.mock('next/navigation', () => ({
1212

1313
vi.mock('@/lib/api', () => ({
1414
getVisibleAgents: vi.fn().mockResolvedValue([]),
15-
getOpenAgentConfig: vi.fn().mockResolvedValue({ hidden_agents: [] }),
15+
getSandboxedConfig: vi.fn().mockResolvedValue({ hidden_agents: [] }),
1616
listBackends: vi.fn().mockResolvedValue([{ id: 'codex', name: 'Codex' }]),
1717
listBackendAgents: vi.fn().mockResolvedValue([{ id: 'default', name: 'Default' }]),
1818
getBackendConfig: vi.fn().mockResolvedValue({ enabled: true, cli_available: true }),

dashboard/src/components/new-mission-dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { createPortal } from 'react-dom';
66
import { useRouter } from 'next/navigation';
77
import { Plus, X, ExternalLink, RefreshCw, SlidersHorizontal } from 'lucide-react';
88
import useSWR from 'swr';
9-
import { getVisibleAgents, getOpenAgentConfig, listBackends, listBackendAgents, getClaudeCodeConfig, getLibraryOpenCodeSettingsForProfile, listBackendModelOptions, listProviders, type Backend, type BackendAgent, type BackendModelOption, type ModelEffort, type Provider } from '@/lib/api';
9+
import { getVisibleAgents, getSandboxedConfig, listBackends, listBackendAgents, getClaudeCodeConfig, getLibraryOpenCodeSettingsForProfile, listBackendModelOptions, listProviders, type Backend, type BackendAgent, type BackendModelOption, type ModelEffort, type Provider } from '@/lib/api';
1010
import type { Workspace } from '@/lib/api';
1111
import { isBackendAvailable, useBackendConfigs } from '@/lib/use-backend-configs';
1212

@@ -221,7 +221,7 @@ export function NewMissionDialog({
221221
revalidateOnFocus: true,
222222
dedupingInterval: 5000,
223223
});
224-
const { data: config, mutate: mutateConfig } = useSWR(open ? 'openagent-config' : null, getOpenAgentConfig, {
224+
const { data: config, mutate: mutateConfig } = useSWR(open ? 'sandboxed-config' : null, getSandboxedConfig, {
225225
revalidateOnFocus: true,
226226
dedupingInterval: 5000,
227227
});

dashboard/src/lib/api.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,13 +1711,13 @@ export async function saveLibraryOpenCodeSettings(settings: Record<string, unkno
17111711
// sandboxed.sh Config API
17121712
// ─────────────────────────────────────────────────────────────────────────────
17131713

1714-
export interface OpenAgentConfig {
1714+
export interface SandboxedConfig {
17151715
hidden_agents: string[];
17161716
default_agent: string | null;
17171717
}
17181718

17191719
// Get sandboxed.sh config from Library
1720-
export async function getOpenAgentConfig(): Promise<OpenAgentConfig> {
1720+
export async function getSandboxedConfig(): Promise<SandboxedConfig> {
17211721
try {
17221722
return await apiGet("/api/library/sandboxed-sh/config", "Failed to get sandboxed.sh config");
17231723
} catch {
@@ -1727,7 +1727,7 @@ export async function getOpenAgentConfig(): Promise<OpenAgentConfig> {
17271727
}
17281728

17291729
// Save sandboxed.sh config to Library
1730-
export async function saveOpenAgentConfig(config: OpenAgentConfig): Promise<void> {
1730+
export async function saveSandboxedConfig(config: SandboxedConfig): Promise<void> {
17311731
return apiPut("/api/library/sandboxed-sh/config", config, "Failed to save sandboxed.sh config");
17321732
}
17331733

@@ -1781,7 +1781,7 @@ export interface ConfigProfile {
17811781
path: string;
17821782
files: ConfigProfileFile[];
17831783
opencode_settings: Record<string, unknown>;
1784-
openagent_config: OpenAgentConfig;
1784+
sandboxed_config: SandboxedConfig;
17851785
claudecode_config: ClaudeCodeConfig;
17861786
}
17871787

@@ -1838,7 +1838,7 @@ export async function saveLibraryOpenCodeSettingsForProfile(
18381838
}
18391839

18401840
// Get sandboxed.sh config for a specific profile
1841-
export async function getOpenAgentConfigForProfile(profile: string): Promise<OpenAgentConfig> {
1841+
export async function getSandboxedConfigForProfile(profile: string): Promise<SandboxedConfig> {
18421842
try {
18431843
return await apiGet(
18441844
`/api/library/config-profile/${encodeURIComponent(profile)}/sandboxed-sh/config`,
@@ -1851,9 +1851,9 @@ export async function getOpenAgentConfigForProfile(profile: string): Promise<Ope
18511851
}
18521852

18531853
// Save sandboxed.sh config for a specific profile
1854-
export async function saveOpenAgentConfigForProfile(
1854+
export async function saveSandboxedConfigForProfile(
18551855
profile: string,
1856-
config: OpenAgentConfig
1856+
config: SandboxedConfig
18571857
): Promise<void> {
18581858
return apiPut(
18591859
`/api/library/config-profile/${encodeURIComponent(profile)}/sandboxed-sh/config`,

0 commit comments

Comments
 (0)