The plugin's parser (core/src/main/java/io/github/gabrielbbaldez/stacktale/idea/StReportParser.java) only understands the text format (st/1). stacktale can also be configured to write reports as st-json/1 — one JSON object per line (NDJSON) — and those files currently show up empty in the tool window. The MCP server and (soon) the VS Code extension read both; the JetBrains plugin should reach parity.
What to do
In :core (StReportParser.java), keeping it pure Java with no IntelliJ API:
- Detect the format from the first non-blank, non-
# line: starts with { → st-json/1; otherwise the existing st/1 path.
- For JSON, parse each line as an object (skip blanks; a half-written trailing line must be ignored, not throw). Handle the two record kinds — a full
report and a repeat. Map a report into the same report model the text parser produces (id, timestamp, headline, culprit frame, the raw block for Copy Report for AI).
- Keep the public parse entry point unchanged so
StacktalePanel doesn't care which format it got.
Use a JSON reader already on the plugin classpath (the IntelliJ Platform ships Gson/Jackson) — no new dependency in :core if you can avoid it; a tiny hand-roll is also fine given the flat shape.
Reference
- Format spec: docs/FORMAT.md (
st-json/1 section).
- A working mirror: the MCP server's
StReportFile.parseJson in the main repo.
How to verify
Add a case to core/src/main/java/io/github/gabrielbbaldez/stacktale/idea/../StReportParserTest.java (in core/src/test) with an NDJSON sample and assert id/timestamp/headline/culprit. ./gradlew test must stay green (no IDE download needed for :core tests).
The plugin's parser (
core/src/main/java/io/github/gabrielbbaldez/stacktale/idea/StReportParser.java) only understands the text format (st/1). stacktale can also be configured to write reports asst-json/1— one JSON object per line (NDJSON) — and those files currently show up empty in the tool window. The MCP server and (soon) the VS Code extension read both; the JetBrains plugin should reach parity.What to do
In
:core(StReportParser.java), keeping it pure Java with no IntelliJ API:#line: starts with{→st-json/1; otherwise the existingst/1path.reportand arepeat. Map areportinto the same report model the text parser produces (id, timestamp, headline, culprit frame, the raw block for Copy Report for AI).StacktalePaneldoesn't care which format it got.Use a JSON reader already on the plugin classpath (the IntelliJ Platform ships Gson/Jackson) — no new dependency in
:coreif you can avoid it; a tiny hand-roll is also fine given the flat shape.Reference
st-json/1section).StReportFile.parseJsonin the main repo.How to verify
Add a case to
core/src/main/java/io/github/gabrielbbaldez/stacktale/idea/../StReportParserTest.java(incore/src/test) with an NDJSON sample and assert id/timestamp/headline/culprit../gradlew testmust stay green (no IDE download needed for:coretests).