Skip to content

Commit 073e7b1

Browse files
efraespadaactions-user
authored andcommitted
gh-action: updated compiled files
1 parent 6c9d25c commit 073e7b1

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

dist/index.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158032,7 +158032,7 @@ class DockerRepository {
158032158032
throw new Error(`HTTP error! status: ${response.status}`);
158033158033
}
158034158034
const data = await response.json();
158035-
(0, logger_1.logDebugInfo)(`🐳 🟡 Embedding: ${JSON.stringify(data)}`);
158035+
// logDebugInfo(`🐳 🟡 Embedding: ${JSON.stringify(data)}`);
158036158036
return data.embeddings;
158037158037
}
158038158038
catch (error) {
@@ -163820,9 +163820,21 @@ class VectorActionUseCase {
163820163820
}
163821163821
const firestoreRepository = new firestore_repository_1.FirestoreRepository(param.firebaseConfig);
163822163822
await this.dockerRepository.startContainer();
163823+
(0, logger_1.logDebugInfo)(`Getting chunked files for ${param.repo} ${param.commit.branch}`);
163823163824
const chunkedFiles = await this.fileRepository.getChunkedRepositoryContent(param.owner, param.repo, param.commit.branch, 32, param.tokens.token);
163825+
(0, logger_1.logDebugInfo)(`Chunked files: ${chunkedFiles.length}`);
163824163826
const processedChunkedFiles = [];
163825-
for (const chunkedFile of chunkedFiles) {
163827+
const totalFiles = chunkedFiles.length;
163828+
const startTime = Date.now();
163829+
for (let i = 0; i < chunkedFiles.length; i++) {
163830+
const chunkedFile = chunkedFiles[i];
163831+
const currentTime = Date.now();
163832+
const elapsedTime = (currentTime - startTime) / 1000; // in seconds
163833+
const progress = ((i + 1) / totalFiles) * 100;
163834+
// Calculate estimated time remaining
163835+
const estimatedTotalTime = (elapsedTime / (i + 1)) * totalFiles;
163836+
const remainingTime = estimatedTotalTime - elapsedTime;
163837+
(0, logger_1.logDebugInfo)(`Processing file ${i + 1}/${totalFiles} (${progress.toFixed(1)}%) - Estimated time remaining: ${Math.ceil(remainingTime)} seconds`);
163826163838
const embeddings = await this.dockerRepository.getEmbedding(chunkedFile.chunks.map(chunk => [this.CODE_INSTRUCTION, chunk]));
163827163839
chunkedFile.vector = embeddings;
163828163840
processedChunkedFiles.push(chunkedFile);

0 commit comments

Comments
 (0)