refactor: consolidated json parsing and stream utilities

- Centralized JSON parsing and stream processing logic by moving utilities from `packages/ai` to the shared `@oh-my-pi/pi-utils` package.
- Standardized import paths for JSON parsing and streaming across the agent, ai, and coding-agent packages.
- Refactored SSE stream handling to use consolidated `parseStreamingJson` logic and introduced robust error recovery for malformed container-shaped tail events.
- Cleaned up legacy bundled registry references and updated related module exports and tests to reflect the new utility structure.
This commit is contained in:
can1357
2026-06-27 00:11:42 +02:00
parent eec44769cc
commit eb4a02433c
28 changed files with 92 additions and 391 deletions
@@ -1690,7 +1690,8 @@ export class InputController {
// that state — inform the user instead of silently flipping the
// persisted value. When thinking is on, the toggle works normally
// even if blocks are already hidden (user may want to show them).
const thinkingOff = ((this.ctx.viewSession ?? this.ctx.session)?.thinkingLevel ?? ThinkingLevel.Off) === ThinkingLevel.Off;
const thinkingOff =
((this.ctx.viewSession ?? this.ctx.session)?.thinkingLevel ?? ThinkingLevel.Off) === ThinkingLevel.Off;
if (thinkingOff) {
this.ctx.showStatus("Thinking is off — enable thinking to show blocks");
return;