MCPcopy
hub / github.com/e-p-armstrong/augmentoolkit / duplicateConfig

Function duplicateConfig

atk-interface/src/api.js:116–128  ·  view source on GitHub ↗
(sourceAlias, destinationRelativePath)

Source from the content-addressed store, hash-verified

114 * @returns {Promise<object>} - API response.
115 */
116export const duplicateConfig = async (sourceAlias, destinationRelativePath) => {
117 const url = getApiUrl('/configs/duplicate');
118 const response = await fetch(url, {
119 method: 'POST',
120 headers: { 'Content-Type': 'application/json' },
121 body: JSON.stringify({
122 source_alias: sourceAlias,
123 destination_relative_path: destinationRelativePath,
124 }),
125 });
126 // Use handleApiResponse which includes error handling
127 return handleApiResponse(response);
128};
129
130/**
131 * Fetches available config aliases (e.g., from super_config.yaml) that can be used as sources for duplication.

Callers 1

handleDuplicateFunction · 0.90

Calls 2

getApiUrlFunction · 0.90
handleApiResponseFunction · 0.85

Tested by

no test coverage detected