utils/heatmap/heatmap_utils library
Heatmap generation, plan management, code indexing detection, and transcript search utilities.
Ported from:
- heatmap.ts (198 LOC) -- GitHub-style activity heatmap
- plans.ts (397 LOC) -- plan file management and recovery
- codeIndexing.ts (206 LOC) -- code indexing tool detection
- transcriptSearch.ts (202 LOC) -- searchable text extraction
Classes
- DailyActivity
- Daily activity data point.
- FileSnapshotEntry
- A snapshot of a file persisted in the transcript.
- HeatmapOptions
- Options for heatmap generation.
- LogMessage
- A message from the log for plan recovery.
- LogOption
- Log option with messages for plan restoration.
- PlanController
- Controller for plan file management.
- RenderableMessage
- A renderable message for transcript search.
Enums
- CodeIndexingTool
- Known code indexing tool identifiers.
Constants
- interruptMessage → const String
- Interrupt message sentinel values.
- interruptMessageForToolUse2 → const String
Functions
-
detectCodeIndexingFromCommand(
String command) → CodeIndexingTool? - Detects if a bash command is using a code indexing CLI tool.
-
detectCodeIndexingFromMcpServerName(
String serverName) → CodeIndexingTool? - Detects if an MCP server name corresponds to a code indexing tool.
-
detectCodeIndexingFromMcpTool(
String toolName) → CodeIndexingTool? - Detects if an MCP tool is from a code indexing server.
-
generateHeatmap(
List< DailyActivity> dailyActivity, {HeatmapOptions options = const HeatmapOptions()}) → String - Generates a GitHub-style activity heatmap for the terminal.
-
renderableSearchText(
RenderableMessage msg) → String - Flatten a RenderableMessage to lowercased searchable text.
-
toolResultSearchText(
dynamic r) → String - Duck-type the tool's native Out for searchable text.
-
toolUseSearchText(
dynamic input) → String - Extract searchable text from a tool_use input.