- Add messageId to start chunk (required by useChat)
- Remove undocumented tool-output-error wire type, use
tool-output-available for all tool results
- Pass structured tool output through instead of JSON-stringifying
Tests cover extractUserText with v5+ parts format, v4 content string,
last-user-message extraction, simple text/prompt fields, null cases, and
preference ordering. Stream listener tests verify text event translation
and the writableEnded guard.
Map thinking_start/delta/end to Vercel AI SDK reasoning-start/delta/end
chunk types. Derive finish reason from enqueueMessage result - aborted
sessions get a clean finish with reason "error" instead of an error chunk.
Extend the Vercel stream listener to handle toolcall_start,
toolcall_delta, toolcall_end, and tool_execution_end events.
Maps to tool-input-start, tool-input-delta, tool-input-available,
and tool-output-available/tool-output-error Vercel SDK chunk types.
New POST /sessions/:key/chat endpoint that speaks the Vercel AI SDK
UI message SSE protocol (x-vercel-ai-ui-message-stream: v1). Accepts
both useChat format ({ messages: UIMessage[] }) and simple gateway
format ({ text: string }). Streams text-start, text-delta, text-end
events through the existing session infrastructure.
Add configurable initial filter mode for the session tree navigator.
Users who always switch to a specific filter (e.g. no-tools via Ctrl+T)
can now set it as default in settings.
Same pattern as doubleEscapeAction (#404). Filter infra from #747.
Use visibleWidth/truncateToWidth for footer path and stats truncation so wide Unicode text cannot overflow terminal width.
Add regression tests for wide session/model/provider names and document the fix in changelog.
closes#1833
The previous fix (83b57924) replaced require.resolve() with bare
specifier fallbacks to avoid ERR_PACKAGE_PATH_NOT_EXPORTED for ESM-only
packages like pi-ai. However, bare specifiers are not valid jiti alias
targets, breaking extension loading in global npm installs.
Use import.meta.resolve() as the fallback instead. It respects the
"import" exports condition and returns a real file path.