Repository navigation
2.0.0 — Gemma text-call parsing moves to AIChatKitMLX; failed turns keep role alternation
LatestGemma text tool-call parsing moves out of AIChatUI into AIChatKitMLX, and a turn that fails before
any output no longer leaves two user messages in a row.
Breaking
- Removed
GemmaOutputRecovery,GemmaToolArgumentsandEmbeddedToolCallParser(all were public
inAIChatUI). ChatSessionno longer parses tool calls out of assistant text (call:name{…},
<tool_call>{json}</tool_call>,```tool_code). Text a provider streams as text is shown as text.
A provider that talks to a model which writes calls as text must turn them into.toolCallComplete
events itself. AIChatKitMLX 1.4.0+ does this for Gemma, at stream level.ChatSessionno longer rewrites tool-call arguments. It trims them, treats blank as{}, and still
sends anything that is not a JSON object to the provider as{}.
Fixed
- A turn that ends in an error, or an empty reply, before any output is now dropped from the history
sent to the provider, the same way a cancel before output is. Previously the nextsendcould send
two consecutive user turns, which strict chat templates (Gemma) reject. Errors after partial
output are unchanged: the partial reply is committed, so roles already alternate.
Added
ChatSession.UserEntry.isFailed(defaultfalse): set on such a turn.ConversationViewshows it
dimmed with the caption “Not answered — the model won't see this message” and a matching VoiceOver
label (UserMessagePresentation.failedCaption).docs/CHAT_SESSION_BEHAVIOUR.mddocuments the thinking tile and where tool-call parsing lives.
Changed
- README: “Known limits” is now “Upgrade notes”. Swift / platform / license badges.
Upgrading from 1.x
- Using AIChatKitMLX with Gemma? Update it to 1.4.0 or later in the same change. With an older
AIChatKitMLX, a Gemma model that writes<tool_call>XML ortool_codeblocks would show them as
plain text, because 2.0.0 no longer recovers them in the UI. - Called
GemmaOutputRecovery,GemmaToolArgumentsorEmbeddedToolCallParserdirectly? They are
gone. Use a provider that emits.toolCallComplete(AIChatKitMLX 1.4.0+ for Gemma), or copy the
parser into your own provider. - Draw your own user-message rows? Treat
UserEntry.isFailedlikeisCancelled: the message was
never answered and is not in the provider history. Resending it retries. - Depend on other NerdSnipe packages? They must allow AIChatKit 2.x. Compatible releases:
AIChatKitMLX 1.4.0, AiPersona 1.1.1, GHLAIService 0.2.1. AIChatKitLlama 1.0.2 and earlier require
AIChatKit<2.0.0. - Nothing else in the public API changed.