Skip to content

Commit 546d4f1

Browse files
committed
Fix left overs from merge conflicts
1 parent 783f094 commit 546d4f1

File tree

2 files changed

+5
-35
lines changed

2 files changed

+5
-35
lines changed

src/extension.ts

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,20 +1561,7 @@ class CopilotTokenTracker implements vscode.Disposable {
15611561
if (fileStats.mtime >= last30DaysStart) {
15621562
const mtime = fileStats.mtime.getTime();
15631563
const fileSize = fileStats.size;
1564-
const analysis = await this.getUsageAnalysisFromSessionCached(sessionFile, mtime, fileSize);
15651564

1566-
// Get repository from cache
1567-
const cached = this.sessionFileCache.get(sessionFile);
1568-
const repository = cached?.repository || 'Unknown';
1569-
const hasCustomization = (analysis.contextReferences.copilotInstructions || 0) > 0 || (analysis.contextReferences.agentsMd || 0) > 0;
1570-
last30DaysStats.sessions++;
1571-
this.mergeUsageAnalysis(last30DaysStats, analysis);
1572-
if (!last30DaysStats.repositories.includes(repository)) {
1573-
last30DaysStats.repositories.push(repository);
1574-
}
1575-
if (hasCustomization && !last30DaysStats.repositoriesWithCustomization.includes(repository)) {
1576-
last30DaysStats.repositoriesWithCustomization.push(repository);
1577-
}
15781565
// Get all session data in one call to avoid multiple cache lookups
15791566
const sessionData = await this.getSessionFileDataCached(sessionFile, mtime, fileSize);
15801567
const interactions = sessionData.interactions;
@@ -1650,30 +1637,12 @@ class CopilotTokenTracker implements vscode.Disposable {
16501637
this.mergeUsageAnalysis(monthStats, analysis);
16511638
}
16521639

1653-
// Add to month stats if modified this calendar month
1654-
if (fileStats.mtime >= monthStart) {
1655-
monthStats.sessions++;
1656-
this.mergeUsageAnalysis(monthStats, analysis);
1657-
if (!monthStats.repositories.includes(repository)) {
1658-
monthStats.repositories.push(repository);
1659-
}
1660-
if (hasCustomization && !monthStats.repositoriesWithCustomization.includes(repository)) {
1661-
monthStats.repositoriesWithCustomization.push(repository);
1662-
}
1663-
}
1664-
1665-
// Add to today stats if modified today
1666-
if (fileStats.mtime >= todayStart) {
1667-
todayStats.sessions++;
1668-
this.mergeUsageAnalysis(todayStats, analysis);
1669-
if (!todayStats.repositories.includes(repository)) {
1670-
todayStats.repositories.push(repository);
1671-
}
1672-
if (hasCustomization && !todayStats.repositoriesWithCustomization.includes(repository)) {
1673-
todayStats.repositoriesWithCustomization.push(repository);
1640+
// Add to today stats if modified today
1641+
if (fileStats.mtime >= todayStart) {
1642+
todayStats.sessions++;
1643+
this.mergeUsageAnalysis(todayStats, analysis);
16741644
}
16751645
}
1676-
}
16771646

16781647
processed++;
16791648
if (processed % progressInterval === 0) {

src/webview/usage/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ function renderLayout(stats: UsageAnalysisStats): void {
584584
});
585585
document.getElementById('btn-maturity')?.addEventListener('click', () => {
586586
vscode.postMessage({ command: 'showMaturity' });
587+
});
587588

588589
// Copy path buttons in customization list
589590
Array.from(document.getElementsByClassName('cf-copy')).forEach((el) => {

0 commit comments

Comments
 (0)