claude-code-templates 1.28.8 → 1.28.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-templates",
3
- "version": "1.28.8",
3
+ "version": "1.28.9",
4
4
  "description": "CLI tool to setup Claude Code configurations with framework-specific commands, automation hooks and MCP Servers for your projects",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -1553,97 +1553,122 @@
1553
1553
  });
1554
1554
  }
1555
1555
 
1556
+ // Collect all tools and conversations
1557
+ const allTools = new Map(); // tool name -> total count
1558
+ let totalConversations = 0;
1559
+ const allModels = [];
1560
+
1556
1561
  if (data.activityHeatmap) {
1557
1562
  data.activityHeatmap.forEach(week => {
1558
1563
  week.forEach(day => {
1559
1564
  if (day.count > 0) {
1560
- const date = new Date(day.date);
1561
- timeline.push({
1562
- type: 'conversation',
1563
- date,
1564
- count: day.count,
1565
- tools: day.tools || [],
1566
- models: day.models || [],
1567
- dayOfYear: getDayOfYear(date)
1568
- });
1565
+ totalConversations += day.count;
1566
+
1567
+ // Collect models
1568
+ if (day.models) {
1569
+ day.models.forEach(model => {
1570
+ if (!allModels.includes(model)) {
1571
+ allModels.push(model);
1572
+ }
1573
+ });
1574
+ }
1575
+
1576
+ // Aggregate all tools
1577
+ if (day.toolCounts) {
1578
+ Object.entries(day.toolCounts).forEach(([toolName, count]) => {
1579
+ allTools.set(toolName, (allTools.get(toolName) || 0) + count);
1580
+ });
1581
+ }
1569
1582
  }
1570
1583
  });
1571
1584
  });
1572
1585
  }
1573
1586
 
1574
- // Add commands, skills, MCPs, and subagents based on their actual timestamps
1575
- console.log('🔍 DEBUG: Component layer events:');
1587
+ // Create ONE conversation event at the beginning with all models
1588
+ timeline.push({
1589
+ type: 'conversation',
1590
+ date: new Date(),
1591
+ count: totalConversations,
1592
+ models: allModels,
1593
+ dayOfYear: 0 // First thing to process
1594
+ });
1595
+
1596
+ // Create separate timeline events for each tool, distributed over time
1597
+ let toolDayOffset = 10; // Start after models (which are at dayOfYear 0-5)
1598
+ const toolIncrement = 3; // Larger increment for more spacing
1599
+
1600
+ allTools.forEach((totalCount, toolName) => {
1601
+ timeline.push({
1602
+ type: 'tool-use',
1603
+ toolName: toolName,
1604
+ count: totalCount,
1605
+ date: new Date(),
1606
+ dayOfYear: toolDayOffset
1607
+ });
1608
+ toolDayOffset += toolIncrement; // Distribute tools gradually
1609
+ });
1610
+
1611
+ // Remember where tools ended
1612
+ const componentsStartDay = toolDayOffset;
1613
+
1614
+ // Add components sequentially after tools (no delays)
1615
+ let componentDayOffset = componentsStartDay;
1616
+ const componentIncrement = 3; // Same spacing as tools
1576
1617
 
1577
1618
  if (data.commands && data.commands.events) {
1578
- console.log(`📋 Adding ${data.commands.events.length} command events to timeline`);
1579
- data.commands.events.forEach((event, index) => {
1580
- const eventDate = new Date(event.timestamp);
1581
- const eventDayOfYear = getDayOfYear(eventDate);
1619
+ console.log(`📋 Adding ${data.commands.events.length} command events`);
1620
+ data.commands.events.forEach((event) => {
1582
1621
  timeline.push({
1583
1622
  type: 'component-layer2',
1584
1623
  componentType: 'command',
1585
1624
  name: event.name,
1586
- date: eventDate,
1587
- dayOfYear: eventDayOfYear
1625
+ date: new Date(),
1626
+ dayOfYear: componentDayOffset
1588
1627
  });
1589
- if (index === 0) {
1590
- console.log(` - First command "${event.name}": date=${eventDate.toLocaleDateString()}, dayOfYear=${eventDayOfYear.toFixed(3)}`);
1591
- }
1628
+ componentDayOffset += componentIncrement;
1592
1629
  });
1593
1630
  }
1594
1631
 
1595
1632
  if (data.skills && data.skills.events) {
1596
- console.log(`📚 Adding ${data.skills.events.length} skill events to timeline`);
1597
- data.skills.events.forEach((event, index) => {
1598
- const eventDate = new Date(event.timestamp);
1599
- const eventDayOfYear = getDayOfYear(eventDate);
1633
+ console.log(`📚 Adding ${data.skills.events.length} skill events`);
1634
+ data.skills.events.forEach((event) => {
1600
1635
  timeline.push({
1601
1636
  type: 'component-layer2',
1602
1637
  componentType: 'skill',
1603
1638
  name: event.name,
1604
- date: eventDate,
1605
- dayOfYear: eventDayOfYear
1639
+ date: new Date(),
1640
+ dayOfYear: componentDayOffset
1606
1641
  });
1607
- if (index === 0) {
1608
- console.log(` - First skill "${event.name}": date=${eventDate.toLocaleDateString()}, dayOfYear=${eventDayOfYear.toFixed(3)}`);
1609
- }
1642
+ componentDayOffset += componentIncrement;
1610
1643
  });
1611
1644
  }
1612
1645
 
1613
1646
  if (data.mcps && data.mcps.events) {
1614
- console.log(`🔌 Adding ${data.mcps.events.length} MCP events to timeline`);
1615
- data.mcps.events.forEach((event, index) => {
1616
- const eventDate = new Date(event.timestamp);
1617
- const eventDayOfYear = getDayOfYear(eventDate);
1647
+ console.log(`🔌 Adding ${data.mcps.events.length} MCP events`);
1648
+ data.mcps.events.forEach((event) => {
1618
1649
  timeline.push({
1619
1650
  type: 'component-layer2',
1620
1651
  componentType: 'mcp',
1621
1652
  name: event.name,
1622
- date: eventDate,
1623
- dayOfYear: eventDayOfYear
1653
+ date: new Date(),
1654
+ dayOfYear: componentDayOffset
1624
1655
  });
1625
- if (index === 0) {
1626
- console.log(` - First MCP "${event.name}": date=${eventDate.toLocaleDateString()}, dayOfYear=${eventDayOfYear.toFixed(3)}`);
1627
- }
1656
+ componentDayOffset += componentIncrement;
1628
1657
  });
1629
1658
  }
1630
1659
 
1631
1660
  if (data.subagents && data.subagents.events) {
1632
- console.log(`🤖 Adding ${data.subagents.events.length} subagent events to timeline (grouped by type)`);
1633
- data.subagents.events.forEach((event, index) => {
1634
- const eventDate = new Date(event.timestamp);
1635
- const eventDayOfYear = getDayOfYear(eventDate);
1661
+ console.log(`🤖 Adding ${data.subagents.events.length} subagent events`);
1662
+ data.subagents.events.forEach((event) => {
1636
1663
  timeline.push({
1637
1664
  type: 'component-layer2',
1638
1665
  componentType: 'subagent',
1639
- name: event.name, // Now just "Plan" or "Explore", not "Plan-a68a"
1640
- date: eventDate,
1641
- dayOfYear: eventDayOfYear,
1642
- count: event.count || 1 // How many times used that day
1666
+ name: event.name,
1667
+ date: new Date(),
1668
+ dayOfYear: componentDayOffset,
1669
+ count: event.count || 1
1643
1670
  });
1644
- if (index === 0) {
1645
- console.log(` - First subagent "${event.name}": date=${eventDate.toLocaleDateString()}, dayOfYear=${eventDayOfYear.toFixed(3)}, count=${event.count || 1}`);
1646
- }
1671
+ componentDayOffset += componentIncrement;
1647
1672
  });
1648
1673
  }
1649
1674
 
@@ -1777,20 +1802,6 @@
1777
1802
  recalculateModelPercentages();
1778
1803
  }
1779
1804
 
1780
- // Process tool queue gradually (1 tool every 5 frames = ~12 tools/second)
1781
- if (frameCount % 5 === 0 && toolQueue.length > 0) {
1782
- const { tool, count, color } = toolQueue.shift();
1783
- const node = getOrCreateToolNode(tool, color);
1784
-
1785
- // Add all uses at once
1786
- for (let j = 0; j < count; j++) {
1787
- node.addUse();
1788
- }
1789
-
1790
- // Create only ONE visual beam per tool
1791
- setTimeout(() => addToolBeam(tool), Math.random() * 300);
1792
- }
1793
-
1794
1805
  // Apply zoom and pan transformations
1795
1806
  ctx.save();
1796
1807
  ctx.translate(panX, panY);
@@ -1924,43 +1935,8 @@
1924
1935
  eventsThisFrame++;
1925
1936
 
1926
1937
  if (event.type === 'conversation') {
1927
- // Calculate actual tool count from toolCounts
1928
- const actualToolCount = event.toolCounts ?
1929
- Object.values(event.toolCounts).reduce((sum, count) => sum + count, 0) :
1930
- event.tools.length * event.count;
1931
-
1932
- console.log(`🎬 Processing conversation on day ${event.dayOfYear}: ${event.count} conversations, ${actualToolCount} tool calls`);
1938
+ console.log(`🎬 Processing conversation: ${event.count} conversations`);
1933
1939
  stats.conversations += event.count;
1934
- stats.tools += actualToolCount;
1935
-
1936
- // Add tool counts to queue for gradual processing
1937
- if (event.toolCounts) {
1938
- Object.entries(event.toolCounts).forEach(([tool, count]) => {
1939
- const toolColors = {
1940
- 'Read': '#60a5fa', 'Write': '#34d399', 'Edit': '#fbbf24',
1941
- 'Bash': '#f87171', 'TodoWrite': '#a78bfa', 'Task': '#fb923c',
1942
- 'Glob': '#2dd4bf', 'Grep': '#c084fc', 'WebFetch': '#f472b6',
1943
- 'WebSearch': '#818cf8', 'KillShell': '#ef4444', 'TaskOutput': '#06b6d4'
1944
- };
1945
- const color = toolColors[tool] || '#3b82f6';
1946
-
1947
- // Add to queue for gradual processing
1948
- toolQueue.push({ tool, count, color });
1949
- });
1950
- } else {
1951
- // Fallback to old method if toolCounts not available
1952
- event.tools.forEach(tool => {
1953
- const toolColors = {
1954
- 'Read': '#60a5fa', 'Write': '#34d399', 'Edit': '#fbbf24',
1955
- 'Bash': '#f87171', 'TodoWrite': '#a78bfa', 'Task': '#fb923c',
1956
- 'Glob': '#2dd4bf', 'Grep': '#c084fc'
1957
- };
1958
- const color = toolColors[tool] || '#3b82f6';
1959
- const node = getOrCreateToolNode(tool, color);
1960
- node.addUse();
1961
- setTimeout(() => addToolBeam(tool), Math.random() * 300);
1962
- });
1963
- }
1964
1940
 
1965
1941
  // Process models using actual counts
1966
1942
  if (event.models && event.models.length > 0) {
@@ -1995,6 +1971,31 @@
1995
1971
  console.log(`📦 Processing component: ${event.name} (${event.componentType})`);
1996
1972
  addComponent(event.name, event.componentType);
1997
1973
  // showEvent(`Installed: ${event.name}`); // Disabled - notifications removed
1974
+ } else if (event.type === 'tool-use') {
1975
+ // Process tool event (one tool at a time, like components)
1976
+ const toolColors = {
1977
+ 'Read': '#60a5fa', 'Write': '#34d399', 'Edit': '#fbbf24',
1978
+ 'Bash': '#f87171', 'TodoWrite': '#a78bfa', 'Task': '#fb923c',
1979
+ 'Glob': '#2dd4bf', 'Grep': '#c084fc', 'WebFetch': '#f472b6',
1980
+ 'WebSearch': '#818cf8', 'KillShell': '#ef4444', 'TaskOutput': '#06b6d4'
1981
+ };
1982
+ const color = toolColors[event.toolName] || '#3b82f6';
1983
+ const node = getOrCreateToolNode(event.toolName, color);
1984
+
1985
+ // Add all uses for this tool
1986
+ for (let j = 0; j < event.count; j++) {
1987
+ node.addUse();
1988
+ }
1989
+
1990
+ // Update stats
1991
+ stats.tools += event.count;
1992
+
1993
+ // Create beam
1994
+ const beam = new Beam(node, event.toolName);
1995
+ beams.push(beam);
1996
+
1997
+ console.log(`🔷 tool: ${event.toolName} (added: ${event.count}, total: ${node.count})`);
1998
+
1998
1999
  } else if (event.type === 'component-layer2') {
1999
2000
  const node = getOrCreateComponentNode(event.name, event.componentType);
2000
2001