Commit Graph

53 Commits

Author SHA1 Message Date
Hayden Bleasel 82b1c6068b Version 1.7.0 2026-01-16 14:17:22 -08:00
Hayden Bleasel ef0a8a72ee Voice (#317)
* New voice folder

* Draft Audio Player component

* Add support for AI SDK speech result

* Draft Mic Selector component

* Extract PromptInputSpeechButton to SpeechInput

* Update speech-input.mdx

* Add new unit tests

* Merge groups

* Fix tests

* Improve test coverage

* Run Ultracite

* Update mic-selector.tsx

* Draft Voice Selector

* Scaffold Persona

* Update persona.tsx

* Redesign speech input as record button

* Scaffold Transcription component

* Fix unit tests

* Propagate changes from #233

* Resolves #242

* Update mic-selector.tsx

* Update preview.tsx

* Attempt to overwrite color

* Fix persona bugs

* Remove Pal

* Update persona.test.tsx

* Resolves #210

* Fix non-model instances

* Rename orb to opal, change default

* Performance improvements

* Update pnpm-lock.yaml

* Fix navbar tracking

* Minor fixes

* Update registry mcp server

* Add changesets

* Update persona.test.tsx
2026-01-14 07:26:36 -08:00
Haitian f0625b5ef3 fix(mcp): use zod/v3 for compatibility with mcp-handler (#290)
The mcp-handler package internally depends on @modelcontextprotocol/sdk@1.22.0,
which uses zod-to-json-schema that is incompatible with Zod 4. This caused
the `component` parameter in `get_ai_elements_component` tool to not be
exposed in the inputSchema (empty properties object).

Changes:
- Import zod from "zod/v3" instead of "zod" for backward compatibility
- Replace z.enum() with z.string().describe() for better schema generation
- Improve error message to list available components when not found

Co-authored-by: liuhaitian <liuhaitian@bytedance.com>
2025-12-18 17:33:54 -08:00
Francisco Moretti d1a79c0af3 add scroll behavior to code block (#283)
Long lines of codes were hidden before
2025-12-08 14:56:20 -08:00
Obada Khalili e1edb1b037 MessageContent max width should respect parent's (#274)
* MessageContent max width should respect parent's

* Create silver-poems-doubt.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-12-07 22:30:25 -08:00
Obada Khalili 16a9966732 Wrap items CoT search results component (#278)
* wrap items CoT search results component

* Create two-bats-yawn.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-12-07 22:29:00 -08:00
Obada Khalili b37a002890 Handle non image file types in matchesAccept filter (#279)
* handle non image file types in matchesAccept filter

* Create small-deer-tan.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-12-07 22:28:03 -08:00
Hayden Bleasel 5fb2978a8a Create chatty-mugs-eat.md 2025-12-07 22:26:21 -08:00
Hayden Bleasel 0fbdc6a244 241 multiple issues in prompt inputtsx drag and drop memoization cleanup error handling (#260)
* Fix issue 1

* Fix issue 2

* Fix issue 3

* Fix issue 4

* Create wacky-coins-peel.md

* Fix typos
2025-11-26 12:20:33 -08:00
Hayden Bleasel a5eeca40fd Resolves #254 2025-11-26 11:45:01 -08:00
Felix Traxler 56ea3b96be build: expect errors for states added in ai-sdk v6 (#248)
* build: expect errors for states added in ai-sdk v6

* Create silly-shoes-pay.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-26 11:28:42 -08:00
李学明 787dfc3472 feat(reasoning): ReasoningTrigger allows custom getThinkingMessage function (#255)
* feat(reasoning): ReasoningTrigger allows custom getThinkingMessage function

* Update reasoning.mdx

* Create giant-streets-swim.md

---------

Co-authored-by: Comyn LI 李学明 <comyn.li@nio.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-26 11:25:26 -08:00
chaxus 68bc48491b fix(prompt-input): Adjust image preview hover state and alignment in input head (#256)
* fix(prompt-input): adjust image preview hover state and alignment in input head

* Create major-ants-cut.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-26 11:23:37 -08:00
chaxus a726985cb6 fix(prompt-input): Reset file input value to allow re-selecting previously removed files (#257)
* fix(prompt-input): Reset file input value to allow re-selecting previously removed files

* Create thin-suns-train.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-26 11:23:03 -08:00
streamdown-github-app[bot] 136f8e3f84 Version Packages (#238)
Co-authored-by: ai-elements-bot[bot] <ai-elements-bot[bot]@users.noreply.github.com>
2025-11-16 19:32:51 -08:00
Hayden Bleasel ae31076d13 Resolves #133 2025-11-16 19:25:29 -08:00
Hayden Bleasel b0d53479b1 Resolves #240 2025-11-16 19:17:09 -08:00
streamdown-github-app[bot] 9233753b71 Version Packages (#236)
Co-authored-by: ai-elements-bot[bot] <ai-elements-bot[bot]@users.noreply.github.com>
2025-11-14 07:35:19 -08:00
Pascal Tiberghien a1b1929e68 Fix: Update PromptInputSpeechButton SpeechRecognition usage (#234)
* Fix: Update PromptInputSpeechButton SpeechRecognition usage to only use final result

* Create swift-spies-smell.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-13 18:46:28 -08:00
streamdown-github-app[bot] 36e70ef8c7 Version Packages (#224)
Co-authored-by: ai-elements-bot[bot] <ai-elements-bot[bot]@users.noreply.github.com>
2025-11-12 17:00:56 -08:00
Hayden Bleasel 342bb2331d Create tasty-cars-repeat.md 2025-11-12 09:11:49 -08:00
Hayden Bleasel f887f5c76c Update PromptInputMessage to use AI SDK types 2025-11-10 12:28:51 -08:00
Hayden Bleasel d3d91ba79f Remove unused hast type 2025-11-10 11:41:59 -08:00
UncleBigBay 70bf5fd337 chore: fix checkpoint overflow (#225)
* chore: fix checkout overflow

* Create tough-pants-smash.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-09 11:57:39 -08:00
Brendan Dash e6c656cd5f fix(model-selector): add DialogTitle (#226)
* fix: add DialogTitle

* feat: use sr-only

* Refactor ModelSelector to use ReactNode for title

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-09 11:56:41 -08:00
Ben Drucker 6fa1d46975 fix(reasoning): make "Thought for a few seconds" message reachable (#223)
* fix(reasoning): make "Thought for a few seconds" message reachable

The "Thought for a few seconds" fallback message was unreachable due to
useControllableState defaulting duration to 0 instead of undefined.

- Changed defaultProp from 0 to undefined in useControllableState
- Updated ReasoningContextValue type to allow undefined duration
- Added test coverage for the undefined duration case

Fixes the conditional logic where duration === 0 would trigger the
shimmer animation, preventing the undefined check from ever executing.

* Create odd-grapes-behave.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-07 11:31:18 -08:00
streamdown-github-app[bot] 80a384aff6 Version Packages (#218)
Co-authored-by: ai-elements-bot[bot] <ai-elements-bot[bot]@users.noreply.github.com>
2025-11-06 18:49:44 -08:00
Hayden Bleasel 1ac23c8c8c Create fluffy-eyes-melt.md 2025-11-06 18:22:19 -08:00
Hayden Bleasel 3c34582527 Resolves #182 2025-11-06 18:01:39 -08:00
Hayden Bleasel d5f1159390 New Message component (#222)
* Merge actions, branch and response into message

* Update docs and examples

* Make Flat variant default

* Update message

* Create tangy-melons-behave.md

* Upgrade branch to buttongroup

* Finish updating message

* Update message.test.tsx

* Update usage.mdx
2025-11-06 13:56:42 -08:00
Hayden Bleasel 29c2d430fc ModelSelector component (#217)
* Draft model selector

* Add support for logos

* Misc fixes

* Update model-selector.mdx

* Update model-selector.tsx

* Rename PromptInputModelSelect, replace with ModelSelector

* Add more providers, improve logos

* Create model-selector.test.tsx

* Create jolly-pots-wave.md
2025-11-06 12:10:25 -08:00
Hayden Bleasel 328173b55f Resolves #186 2025-11-05 21:35:32 -08:00
chaxus 227d1ca78f feat(chain-of-thought): change ChainOfThoughtStep label and description types from string to ReactNode (#215)
* feat(ChainOfThoughtStep): change ChainOfThoughtStep label and description types from string to ReactNode

* Create flat-chairs-argue.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-05 21:08:16 -08:00
Hayden Bleasel 0c53bac76c Add support for multiple CLI args 2025-11-05 21:02:55 -08:00
Hayden Bleasel 61a25e55c3 Fix open-in-chat trigger icon 2025-11-05 21:00:34 -08:00
Hayden Bleasel 0a5297cae4 Remove Controls from Canvas 2025-11-05 21:00:03 -08:00
Hayden Bleasel 5c16b4ff6d Add use client directive to open-in-chat 2025-11-05 20:59:41 -08:00
Hayden Bleasel 478ec07092 Use CornerDownLeftIcon for prompt input 2025-11-05 20:59:06 -08:00
Tobias Büschel 5a5342e8e4 fix: ensure prompt input attachments render inside header (#178)
* Update prompt-input.tsx

* fix: ensure prompt input attachments render inside header

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-10-28 00:26:15 -07:00
streamdown-github-app[bot] 2f97e9784f Version Packages (#168)
Co-authored-by: ai-elements-bot[bot] <ai-elements-bot[bot]@users.noreply.github.com>
2025-10-27 23:59:59 -07:00
Hayden Bleasel 619416a7ca Add AI Elements MCP server 2025-10-27 23:37:07 -07:00
Hayden Bleasel a7128ab45e Create loud-doors-fold.md 2025-10-27 23:03:54 -07:00
Hayden Bleasel dccf114dd8 replace jsdom with vitest browser mode (#176)
* Swap from jsdom to browser

* Create clever-toys-travel.md

* Add missing packages

* Attempt more test fixes

* Update testing matrix

* Update test.yml

* Update test.yml
2025-10-27 22:46:08 -07:00
Tobias Büschel cdd4d0b282 test: add vitest-fail-on-console and improve test stability (#170)
* test: add vitest-fail-on-console and improve test stability

- Integrate `vitest-fail-on-console` plugin to ensure console logs cause test failures
- Use `act` to wrap asynchronous updates in test interactions
- Add `happy-dom` for improved test environment compatibility
- Update test descriptions to remove async usage where unnecessary

* feat: enhance button accessibility and update tsconfig with testing types

- Add 'type="button"' to improve button element accessibility in test files
- Include 'vitest/globals' and '@testing-library/jest-dom' types in tsconfig for better testing support

* Create grumpy-ways-look.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-10-27 21:22:57 -07:00
Tobias Büschel 2135d806f1 refactor: replace react-syntax-highlighter with shiki in CodeBlock (#149)
* refactor: replace react-syntax-highlighter with shiki in CodeBlock

* Create perky-wolves-grow.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-10-27 19:07:34 -07:00
Tobias Büschel 686577d848 feat: add tool approval state and tool approval component (#163)
* feat: add tool approval state and tool approval component

* Delete apps/test/app/examples/tool-approval.tsx

* Delete apps/test/app/examples/tool.tsx

* Delete apps/test/app/page.tsx

* Delete apps/test/package.json

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml

* Create slow-dancers-tap.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-10-27 18:57:16 -07:00
Sora Morimoto 4a5afad0bb Fix type error in Edge component by using const assertion (#158)
* Fix type error in Edge component by using const assertion

Add 'as const' to the return value of `getHandleCoordsByPosition` to ensure
it is typed as a readonly tuple `[number, number]` rather than a mutable
array `number[]`, which was causing TypeScript to infer the elements as
potentially undefined when destructured in the Animated component.

Signed-off-by: Sora Morimoto <sora@morimoto.io>

* Create odd-knives-relax.md

---------

Signed-off-by: Sora Morimoto <sora@morimoto.io>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-10-27 18:43:11 -07:00
Sora Morimoto 2fce23cf38 Fix type error in InlineCitationCardTrigger by checking sources[0] directly (#159)
* Fix type error in `InlineCitationCardTrigger` by checking `sources[0]` directly

Change the condition from `sources.length` to `sources[0]` to ensure
TypeScript recognises that `sources[0]` is defined when passed to the URL
constructor. This resolves the `string | undefined` is not assignable to
`string | URL` type error.

Signed-off-by: Sora Morimoto <sora@morimoto.io>

* Create proud-rocks-study.md

---------

Signed-off-by: Sora Morimoto <sora@morimoto.io>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-10-27 18:41:41 -07:00
Sora Morimoto 27dbfc2c2b Use optional chaining for speech recognition result access (#160)
* Use optional chaining for speech recognition result access

Prevent potential undefined access when retrieving the first alternative
from speech recognition results. The `SpeechRecognitionResult` index
access may return `undefined`, so use optional chaining to safely handle
this case.

Signed-off-by: Sora Morimoto <sora@morimoto.io>

* Use nullish coalescing operator to provide a default empty string

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* Create sharp-numbers-think.md

---------

Signed-off-by: Sora Morimoto <sora@morimoto.io>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-10-27 18:39:47 -07:00
Brendan Dash a848cf8d60 refactor: update tokenlens api (#164)
* refactor: update tokenlens api

* Create red-kids-report.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-10-27 18:38:23 -07:00