LearnNewsExamplesServices
Frontmatter
id7825
titleFix JSON parsing in SessionService summarization
stateClosed
labels
bugai
assigneestobiu
createdAtNov 20, 2025, 8:38 PM
updatedAtNov 20, 2025, 8:49 PM
githubUrlhttps://github.com/neomjs/neo/issues/7825
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 20, 2025, 8:49 PM

Fix JSON parsing in SessionService summarization

Closed v11.8.0 bugai
tobiu
tobiu commented on Nov 20, 2025, 8:38 PM

The SessionService.summarizeSession method fails to parse the LLM response if it includes Markdown code blocks (e.g. ` NEO_CODE_BLOCK_0 "error": "Unexpected token '', "``json\n{\n"... is not valid JSON"


Proposed Fix:
Strip Markdown code block delimiters from the response text before calling `JSON.parse()`.



</div>
                </div>
            </div>
                    <div id="timeline-7825-1" class="neo-timeline-item event" data-record-id="timeline-7825-1">
                        <div id="timeline-7825-1-target" class="neo-timeline-badge" style="color: #d73a4a"><i class="fa-solid fa-tag"></i></div>
                        <div class="neo-timeline-body">
                            <a class="neo-timeline-user" href="https://github.com/tobiu" target="_blank">tobiu</a> added the <span class="neo-badge" style="background-color:#d73a4a;color:#ffffff">bug</span> label <span class="neo-timeline-date">on Nov 20, 2025, 8:38 PM</span>
                        </div>
                    </div>
                    <div id="timeline-7825-2" class="neo-timeline-item event" data-record-id="timeline-7825-2">
                        <div id="timeline-7825-2-target" class="neo-timeline-badge" style="color: #0e5ca2"><i class="fa-solid fa-tag"></i></div>
                        <div class="neo-timeline-body">
                            <a class="neo-timeline-user" href="https://github.com/tobiu" target="_blank">tobiu</a> added the <span class="neo-badge" style="background-color:#0e5ca2;color:#ffffff">ai</span> label <span class="neo-timeline-date">on Nov 20, 2025, 8:38 PM</span>
                        </div>
                    </div>
                    <div id="timeline-7825-3" class="neo-timeline-item event" data-record-id="timeline-7825-3">
                        <div id="timeline-7825-3-target" class="neo-timeline-badge" ><i class="fa-solid fa-user-pen"></i></div>
                        <div class="neo-timeline-body">
                            <a class="neo-timeline-user" href="https://github.com/tobiu" target="_blank">tobiu</a> assigned to @tobiu <span class="neo-timeline-date">on Nov 20, 2025, 8:39 PM</span>
                        </div>
                    </div>
                    <div id="timeline-7825-4" class="neo-timeline-item event" data-record-id="timeline-7825-4">
                        <div id="timeline-7825-4-target" class="neo-timeline-badge" ><i class="fa-solid fa-link"></i></div>
                        <div class="neo-timeline-body">
                            <a class="neo-timeline-user" href="https://github.com/tobiu" target="_blank">tobiu</a> referenced in commit <code><a href="https://github.com/neomjs/neo/commit/fa76c18" target="_blank">fa76c18</a></code> - &quot;Fix JSON parsing in SessionService summarization #7825&quot; <span class="neo-timeline-date">on Nov 20, 2025, 8:49 PM</span>
                        </div>
                    </div>
                    <div id="timeline-7825-5" class="neo-timeline-item event" data-record-id="timeline-7825-5">
                        <div id="timeline-7825-5-target" class="neo-timeline-badge" style="color: #8250df"><i class="fa-solid fa-circle-check"></i></div>
                        <div class="neo-timeline-body">
                            <a class="neo-timeline-user" href="https://github.com/tobiu" target="_blank">tobiu</a> closed this issue <span class="neo-timeline-date">on Nov 20, 2025, 8:49 PM</span>
                        </div>
                    </div>
                    <div id="timeline-7825-6" class="neo-timeline-item event" data-record-id="timeline-7825-6">
                        <div id="timeline-7825-6-target" class="neo-timeline-badge" ><i class="fa-solid fa-link"></i></div>
                        <div class="neo-timeline-body">
                            <a class="neo-timeline-user" href="https://github.com/tobiu" target="_blank">tobiu</a> cross-referenced by #7826 <span class="neo-timeline-date">on Nov 20, 2025, 8:58 PM</span>
                        </div>
                    </div></div>