MCPcopy
hub / github.com/ModelEngine-Group/nexent / AgentConfigStoreState

Interface AgentConfigStoreState

frontend/stores/agentConfigStore.ts:61–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59};
60
61interface AgentConfigStoreState {
62 currentAgentId: number | null;
63 currentAgentPermission: "EDIT" | "READ_ONLY" | null;
64 baselineAgent: EditableAgent | null;
65 editedAgent: EditableAgent;
66 hasUnsavedChanges: boolean;
67 isCreatingMode: boolean; // true when user is in create mode, even if currentAgentId is null
68 isGenerating: boolean; // true when agent generation is in progress
69 defaultLlmConfig: { id: number | null; name: string; displayName: string } | null;
70
71 forceRefreshKey: number;
72
73 /**
74 * Check if the current agent should be read-only.
75 * - isCreatingMode: always editable (new agent)
76 * - currentAgentPermission === 'READ_ONLY': always read-only
77 * - currentAgentPermission === null: unknown, assume editable
78 */
79 isReadOnly: () => boolean;
80
81 /**
82 * Set current agent (null = create mode).
83 * Resets baseline and edited state.
84 */
85 setCurrentAgent: (agent: Agent | null) => void;
86
87 /**
88 * Enter create mode. Sets isCreatingMode to true and resets state.
89 */
90 enterCreateMode: () => void;
91
92 /**
93 * Trigger a UI force-refresh by incrementing forceRefreshKey.
94 * Call this after operations like rollback that need to force-reload form state.
95 */
96 triggerForceRefresh: () => void;
97
98
99 /**
100 * Update tools (selected tools).
101 */
102 updateTools: (tools: Tool[]) => void;
103
104 /**
105 * Update skills (selected skills).
106 */
107 updateSkills: (skills: Skill[]) => void;
108
109 /**
110 * Update sub_agent_id_list (Component B).
111 */
112 updateSubAgentIds: (ids: number[]) => void;
113
114 /**
115 * Update external_sub_agent_id_list.
116 */
117 updateExternalSubAgentIds: (ids: number[]) => void;
118

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected