MCPcopy Create free account
hub / github.com/MiroMindAI/MiroThinker / apiCall

Function apiCall

apps/visualize-trace/static/js/script.js:276–295  ·  view source on GitHub ↗
(url, options = {})

Source from the content-addressed store, hash-verified

274
275// API调用函数
276async function apiCall(url, options = {}) {
277 try {
278 const response = await fetch(url, {
279 headers: {
280 'Content-Type': 'application/json',
281 ...options.headers
282 },
283 ...options
284 });
285
286 if (!response.ok) {
287 throw new Error(`HTTP error! status: ${response.status}`);
288 }
289
290 return await response.json();
291 } catch (error) {
292 console.error('API call failed:', error);
293 throw error;
294 }
295}
296
297// 文件管理
298function setDefaultDirectory() {

Callers 2

refreshFileListFunction · 0.85
loadTraceFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected