MCPcopy
hub / github.com/IPADS-SAI/MobiAgent / saveCurrentData

Function saveCurrentData

collect/manual/static/js/script.js:941–961  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

939}
940
941async function saveCurrentData() {
942 try {
943 updateStatus(`正在保存数据...`, 'loading');
944
945 const response = await fetch('/save_data', {
946 method: 'POST'
947 });
948
949 if (response.ok) {
950 const result = await response.json();
951 updateStatus(`第 ${result.data_index} 条数据已保存 (${result.saved_actions} 个操作)`, 'success');
952 return result;
953 } else {
954 const error = await response.json();
955 throw new Error(error.detail || '保存数据失败');
956 }
957 } catch (error) {
958 updateStatus(`保存数据失败: ${error.message}`, 'error');
959 throw error;
960 }
961}
962
963async function deleteCurrentData() {
964 try {

Callers 2

endDataCollectionFunction · 0.85
nextDataCollectionFunction · 0.85

Calls 1

updateStatusFunction · 0.85

Tested by

no test coverage detected