mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
fix(desktop): fix TypeScript errors in merged edit dialog
Add missing imports (relayMeshModelPickerState, buildModelDropdownOptions, AgentCreationPreview) to AgentEditMergedDialog. Fix type mismatches in AgentEditMergedDialogInstanceSection: use AcpRuntimeCatalogEntry (not AcpRuntime), InheritedDefault (not inline struct), readonly string[] for advancedRequiredEnvKeys, and RefObject<HTMLButtonElement | null> to match React.useRef's return type. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
@@ -69,6 +69,11 @@ import {
|
||||
MODEL_DISCOVERY_LOADING_VALUE,
|
||||
usePersonaModelDiscovery,
|
||||
} from "./usePersonaModelDiscovery";
|
||||
import {
|
||||
modelDropdownOptions as buildModelDropdownOptions,
|
||||
relayMeshModelPickerState,
|
||||
} from "./relayMeshModelPicker";
|
||||
import { AgentCreationPreview } from "./AgentCreationPreview";
|
||||
import { useAgentDialogDefaults } from "./useAgentDialogDefaults";
|
||||
import { useProviderApiKeyFieldState } from "./providerApiKeyFieldState";
|
||||
import { useRequiredCredentialState } from "./useRequiredCredentialState";
|
||||
|
||||
@@ -26,7 +26,8 @@ import {
|
||||
type PersonaDropdownOption,
|
||||
} from "./agentConfigOptions";
|
||||
import { getProviderApiKeyLabel } from "./agentConfigOptions";
|
||||
import type { AcpRuntime } from "@/features/agents/hooks";
|
||||
import type { AcpRuntimeCatalogEntry } from "@/shared/api/types";
|
||||
import type { InheritedDefault } from "./bakedEnvHelpers";
|
||||
import { AgentAiDefaultsNotice } from "./AgentAiDefaults";
|
||||
import { AgentDefaultsDialog } from "./AgentDefaultsDialog";
|
||||
import { AdvancedRequiredBadge } from "./AdvancedRequiredBadge";
|
||||
@@ -59,7 +60,7 @@ export type AgentEditMergedISectionProps = {
|
||||
runtimeDropdownValue: string;
|
||||
instanceRuntimeDropdownOptions: PersonaDropdownOption[];
|
||||
onRuntimeChange: (value: string) => void;
|
||||
selectedRuntime: AcpRuntime | undefined;
|
||||
selectedRuntime: AcpRuntimeCatalogEntry | undefined;
|
||||
inheritHarness: boolean;
|
||||
agentCommand: string;
|
||||
onAgentCommandChange: (value: string) => void;
|
||||
@@ -99,11 +100,11 @@ export type AgentEditMergedISectionProps = {
|
||||
provider: string | null;
|
||||
envVars: Record<string, string>;
|
||||
};
|
||||
inheritedModelDefault: { value: string; source: string };
|
||||
inheritedProviderDefault: { value: string; source: string };
|
||||
inheritedModelDefault: InheritedDefault;
|
||||
inheritedProviderDefault: InheritedDefault;
|
||||
aiDefaultsOpen: boolean;
|
||||
onAiDefaultsOpenChange: (value: boolean) => void;
|
||||
aiDefaultsTriggerRef: React.RefObject<HTMLButtonElement>;
|
||||
aiDefaultsTriggerRef: React.RefObject<HTMLButtonElement | null>;
|
||||
// Advanced
|
||||
showAdvancedFields: boolean;
|
||||
onShowAdvancedFieldsChange: (value: boolean) => void;
|
||||
@@ -112,12 +113,12 @@ export type AgentEditMergedISectionProps = {
|
||||
autoRestartOnConfigChange: boolean;
|
||||
instanceEnvVars: Record<string, string>;
|
||||
fileSatisfiedEnvKeys: string[];
|
||||
advancedRequiredEnvKeys: string[];
|
||||
advancedRequiredEnvKeys: readonly string[];
|
||||
initialFocus?: EditAgentFocusTarget;
|
||||
inheritedEnvVarsForAdvanced: Record<string, string>;
|
||||
linkedPersona: AgentPersona | null;
|
||||
prospectiveRuntimeId: string;
|
||||
prospectiveRuntime: AcpRuntime | undefined;
|
||||
prospectiveRuntime: AcpRuntimeCatalogEntry | undefined;
|
||||
parallelism: string;
|
||||
onAcpCommandChange: (value: string) => void;
|
||||
onAgentArgsChange: (value: string) => void;
|
||||
|
||||
Reference in New Issue
Block a user