claude-code-templates 1.12.2 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create-claude-config.js +3 -0
- package/package.json +1 -1
- package/src/analytics/core/AgentAnalyzer.js +341 -0
- package/src/analytics/core/SessionAnalyzer.js +101 -46
- package/src/analytics-web/components/AgentAnalytics.js +710 -0
- package/src/analytics-web/components/DashboardPage.js +810 -39
- package/src/analytics-web/components/SessionTimer.js +14 -11
- package/src/analytics-web/index.html +666 -65
- package/src/analytics.js +112 -10
- package/src/index.js +183 -0
- package/src/analytics-web/components/Dashboard.js.deprecated +0 -589
|
@@ -169,7 +169,6 @@ class SessionTimer {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
// Calculate progress colors based on usage
|
|
172
|
-
const progressPercentage = Math.round(timer.sessionProgress);
|
|
173
172
|
const timeProgressPercentage = Math.round(((this.SESSION_DURATION - timer.timeRemaining) / this.SESSION_DURATION) * 100);
|
|
174
173
|
|
|
175
174
|
const getProgressColor = (percentage) => {
|
|
@@ -178,7 +177,10 @@ class SessionTimer {
|
|
|
178
177
|
return '#f85149';
|
|
179
178
|
};
|
|
180
179
|
|
|
181
|
-
|
|
180
|
+
// For messages, use a relative progress based on typical usage patterns
|
|
181
|
+
// Since Claude uses dynamic limits, we'll show relative activity level
|
|
182
|
+
const messageActivityLevel = Math.min(100, (timer.messagesUsed / (timer.messagesEstimate || 45)) * 100);
|
|
183
|
+
const messageProgressColor = timer.messagesEstimate ? getProgressColor(messageActivityLevel) : '#3fb950';
|
|
182
184
|
const timeProgressColor = getProgressColor(timeProgressPercentage);
|
|
183
185
|
|
|
184
186
|
// Format time remaining with better UX
|
|
@@ -213,7 +215,7 @@ class SessionTimer {
|
|
|
213
215
|
<div class="session-timer-progress-header">
|
|
214
216
|
<span class="session-timer-progress-label">Messages</span>
|
|
215
217
|
<span class="session-timer-progress-value">
|
|
216
|
-
${timer.messagesUsed}
|
|
218
|
+
${timer.messagesUsed}${timer.messagesEstimate ? `/${timer.messagesEstimate} est.` : ''}
|
|
217
219
|
<span class="session-timer-info-icon" data-tooltip="message-info" title="Message calculation info">
|
|
218
220
|
ℹ️
|
|
219
221
|
</span>
|
|
@@ -221,7 +223,7 @@ class SessionTimer {
|
|
|
221
223
|
</div>
|
|
222
224
|
<div class="session-timer-progress-bar">
|
|
223
225
|
<div class="session-timer-progress-fill"
|
|
224
|
-
style="width: ${
|
|
226
|
+
style="width: ${messageActivityLevel}%; background-color: ${messageProgressColor};"></div>
|
|
225
227
|
</div>
|
|
226
228
|
${timer.usageDetails && timer.usageDetails.shortMessages > 0 ? `
|
|
227
229
|
<div class="session-timer-usage-details">
|
|
@@ -278,9 +280,10 @@ class SessionTimer {
|
|
|
278
280
|
const popoverHTML = `
|
|
279
281
|
<div class="session-timer-tooltip" id="message-info-tooltip" style="display: ${this.isTooltipVisible ? 'block' : 'none'};">
|
|
280
282
|
<div class="session-timer-tooltip-content">
|
|
281
|
-
<h4>
|
|
282
|
-
<p>
|
|
283
|
-
<p>The
|
|
283
|
+
<h4>Claude Pro Plan Usage</h4>
|
|
284
|
+
<p>Shows user messages (prompts) sent in this session. Claude Pro doesn't have fixed message limits - usage is based on message complexity, conversation length, and current capacity.</p>
|
|
285
|
+
<p>The "45 est." is a rough estimate for typical short messages (~200 sentences). You may send more or fewer messages depending on complexity.</p>
|
|
286
|
+
<p><strong>Projects benefit from caching</strong> - repeated content uses fewer resources, allowing more messages.</p>
|
|
284
287
|
<div class="session-timer-tooltip-link">
|
|
285
288
|
<a href="https://support.anthropic.com/en/articles/9797557-usage-limit-best-practices" target="_blank" rel="noopener noreferrer">
|
|
286
289
|
<i class="fas fa-external-link-alt"></i> Usage Limit Best Practices
|
|
@@ -416,11 +419,11 @@ class SessionTimer {
|
|
|
416
419
|
}
|
|
417
420
|
|
|
418
421
|
/**
|
|
419
|
-
* Get message
|
|
422
|
+
* Get message estimate based on current plan
|
|
420
423
|
*/
|
|
421
|
-
|
|
422
|
-
if (!this.sessionData || !this.sessionData.limits) return
|
|
423
|
-
return this.sessionData.limits.
|
|
424
|
+
getMessageEstimate() {
|
|
425
|
+
if (!this.sessionData || !this.sessionData.limits) return 45;
|
|
426
|
+
return this.sessionData.limits.estimatedMessagesPerSession || 45;
|
|
424
427
|
}
|
|
425
428
|
|
|
426
429
|
/**
|