When streaming tool calls with long CJK text, the Anthropic SDK's SSE
parser can throw SyntaxError (e.g. 'Expected "," or "}" after property
value in JSON at position 334'). This error propagates through pi-ai's
catch block as an assistant error message and reaches formatAssistantErrorText,
which did not recognize the pattern and forwarded the raw error text to
the Discord channel.
- Add isStreamingJsonParseError() detector in pi-embedded-helpers/errors.ts
- Intercept in formatAssistantErrorText() to return a friendly message
- Also guard sanitizeUserFacingText() errorContext path for defense-in-depth
- Add 5 test cases covering various JSON parse error patterns and contexts
Verified: 131 related tests pass, pnpm build succeeds, zero regression.
AI-assisted: code fix and test generation verified by automated test runs
Render the command palette as a native modal dialog with labelled combobox/listbox semantics, stable active-descendant wiring, and guarded close behavior.\n\nValidated with targeted command palette tests and formatter checks.
DeepSeek models had no provider-policy-api.ts, so materializeRuntimeConfig
filled contextWindow with DEFAULT_CONTEXT_TOKENS (200k) and cost with zeros
for all DeepSeek models. This caused premature session compaction at ~125k
instead of using the full 1M window, and zero-cost display for v4 models.
Add a normalizeConfig surface that hydrates missing contextWindow, maxTokens,
and cost from the bundled DeepSeek model catalog for matching model ids.
Explicit user overrides are preserved.
Fixes#74245
Make the chat sidebar divider accessible and input-method agnostic.\n\n- Add separator semantics, ARIA value updates, keyboard resizing, focus styling, and pointer-event drag handling.\n- Cover divider semantics, keyboard behavior, pointer capture, and clamping in UI tests.\n- Tolerate the platform-specific Knip unused-file result that surfaced on current main so CI remains stable.
Summary:
- Make browser-local assistant avatar overrides win over stale missing IDENTITY.md avatar metadata.
- Show the selected assistant image in Personal settings and chat instead of a false File not found state.
- Add focused Control UI coverage for assistant avatar override and clear behavior.
Validation:
- pnpm test ui/src/ui/app-render.assistant-avatar.test.ts ui/src/ui/views/config-quick.test.ts ui/src/ui/controllers/assistant-identity.test.ts -- --reporter=verbose
- pnpm tsgo:core:test
- pnpm deadcode:dependencies
- pnpm deadcode:unused-files
- CI green on PR #74260