-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
Problem
The context bomb output shows 0 lines and go (0), json (0) because the IR-to-ProjectGraph conversion doesn't correctly map the available API fields.
**Codebase:** 15 files · 51 functions · 0 lines
**Languages:** go (0), json (0)
Root cause (confirmed from raw API response)
The SupermodelIR response does not contain a line count field — TotalLines is simply not available.
For language counts, metadata.languages is []string (names only, no per-language file counts). The conversion currently builds map[string]int with all values set to 0, which renders as go (0), json (0).
The actual file/function counts live in summary (free-form map) and stats.nodeTypes:
"summary": { "filesProcessed": 15, "functions": 51, "primaryLanguage": null, ... }
"stats": { "nodeTypes": { "File": 15, "Function": 51, "Class": 52, ... } }
"metadata": { "fileCount": 15, "languages": ["go", "json"] }Fix
TotalLines— remove from template (not in API), or derive fromstats.nodeTypesif a line-count node type is ever added- Language counts — either:
- Remove counts and just show names:
go, json - Derive per-language file counts from
stats.nodeTypesor by walking the graph nodes (nodes have alanguageproperty)
- Remove counts and just show names:
summaryfield — currently typed as a struct but the SDK defines it asmap[string]any; should be unmarshalled accordingly to avoid silent zero-fills if field names change
Also noted
primaryLanguage came back null in the response for this repo — the language detection falls back correctly to metadata.languages[0].
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels