TanStack
OSS
ai
Sign in / Sign up
Open main menu
ai
GitHub
Overview
Runs
Analytics
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
fix/vue-messages-discrimination
745d73af fix(ai-vue): use Readonly<ShallowRef<X>> for messages/partial/final Vue's DeepReadonly distributes a recursive mapped type that collapses discriminated unions inside the ref's value. With messages typed as DeepReadonly<ShallowRef<Array<UIMessage<TTools, Person>>>>, the MessagePart union lost its `type` discriminator — every variant's fields became optional and unified, so consumer code like `parts.find(p => p.type === 'structured-output')?.data` would not narrow to Person. Wrapping a ShallowRef in DeepReadonly was contradictory anyway: ShallowRef does not track deep mutations, so enforcing deep readonly on its value adds no reactivity guarantee. Readonly<ShallowRef<X>> makes the ref's .value field readonly while preserving X's structural shape (and its discriminators). The runtime stays readonly(messages) — the public-type cast in use-chat.ts bridges to the new type. Also updates the type-level tests to match the corrected public type.
by Alem Tuzlak
A
Succeeded
fix/vue-messages-discrimination
745d73af fix(ai-vue): use Readonly<ShallowRef<X>> for messages/partial/final Vue's DeepReadonly distributes a recursive mapped type that collapses discriminated unions inside the ref's value. With messages typed as DeepReadonly<ShallowRef<Array<UIMessage<TTools, Person>>>>, the MessagePart union lost its `type` discriminator — every variant's fields became optional and unified, so consumer code like `parts.find(p => p.type === 'structured-output')?.data` would not narrow to Person. Wrapping a ShallowRef in DeepReadonly was contradictory anyway: ShallowRef does not track deep mutations, so enforcing deep readonly on its value adds no reactivity guarantee. Readonly<ShallowRef<X>> makes the ref's .value field readonly while preserving X's structural shape (and its discriminators). The runtime stays readonly(messages) — the public-type cast in use-chat.ts bridges to the new type. Also updates the type-level tests to match the corrected public type.
by Alem Tuzlak
A
Succeeded
fix/vue-messages-discrimination
745d73af fix(ai-vue): use Readonly<ShallowRef<X>> for messages/partial/final Vue's DeepReadonly distributes a recursive mapped type that collapses discriminated unions inside the ref's value. With messages typed as DeepReadonly<ShallowRef<Array<UIMessage<TTools, Person>>>>, the MessagePart union lost its `type` discriminator — every variant's fields became optional and unified, so consumer code like `parts.find(p => p.type === 'structured-output')?.data` would not narrow to Person. Wrapping a ShallowRef in DeepReadonly was contradictory anyway: ShallowRef does not track deep mutations, so enforcing deep readonly on its value adds no reactivity guarantee. Readonly<ShallowRef<X>> makes the ref's .value field readonly while preserving X's structural shape (and its discriminators). The runtime stays readonly(messages) — the public-type cast in use-chat.ts bridges to the new type. Also updates the type-level tests to match the corrected public type.
by Alem Tuzlak
A
Previous page
Previous
Next
Next page