MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / worker

Function worker

apps/kimi-code/src/feedback/upload.ts:107–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 let uploadedBytes = 0;
106
107 async function worker(): Promise<void> {
108 while (true) {
109 const index = nextIndex;
110 nextIndex += 1;
111 if (index >= layout.length) return;
112 const entry = layout[index];
113 if (entry === undefined) return;
114 const completed = await uploadOnePartWithRetry(filePath, entry, options);
115 results[index] = completed;
116 uploadedBytes += entry.part.size;
117 options.onProgress?.(uploadedBytes, totalBytes);
118 }
119 }
120
121 await Promise.all(Array.from({ length: concurrency }, () => worker()));
122 return results;

Callers 1

uploadPartsFunction · 0.85

Calls 1

uploadOnePartWithRetryFunction · 0.85

Tested by

no test coverage detected