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

Function openImportWizardWithFile

frontend/lib/agentImportUtils.ts:151–169  ·  view source on GitHub ↗
(
  options: ParseAgentFileOptions & {
    onSuccess: (data: ImportAgentData) => void;
  }
)

Source from the content-addressed store, hash-verified

149 * This is a convenience function that combines file selection and parsing
150 */
151export async function openImportWizardWithFile(
152 options: ParseAgentFileOptions & {
153 onSuccess: (data: ImportAgentData) => void;
154 }
155): Promise<void> {
156 const { onSuccess, onParseError } = options;
157 const file = await selectFile(".json,.zip");
158
159 if (!file) return;
160
161 const data = await parseAgentImportFile(file, {
162 onParseError: (msg) => onParseError?.(msg),
163 ...options,
164 });
165
166 if (data) {
167 onSuccess(data);
168 }
169}

Callers

nothing calls this directly

Calls 2

selectFileFunction · 0.85
parseAgentImportFileFunction · 0.85

Tested by

no test coverage detected