MCPcopy
hub / github.com/su-kaka/gcli2api / addFiles

Function addFiles

front/common.js:386–400  ·  view source on GitHub ↗
(files)

Source from the content-addressed store, hash-verified

384 },
385
386 addFiles(files) {
387 files.forEach(file => {
388 const isValid = file.type === 'application/json' || file.name.endsWith('.json') ||
389 file.type === 'application/zip' || file.name.endsWith('.zip');
390
391 if (isValid) {
392 if (!this.selectedFiles.find(f => f.name === file.name && f.size === file.size)) {
393 this.selectedFiles.push(file);
394 }
395 } else {
396 showStatus(`文件 ${file.name} 格式不支持,只支持JSON和ZIP文件`, 'error');
397 }
398 });
399 this.updateFileList();
400 },
401
402 updateFileList() {
403 const list = document.getElementById(this.getElementId('FileList'));

Callers

nothing calls this directly

Calls 1

showStatusFunction · 0.85

Tested by

no test coverage detected