zilmate 1.7.8 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/.agents/skills/agent-browser/SKILL.md +55 -0
  2. package/.agents/skills/agentmail/SKILL.md +282 -0
  3. package/.agents/skills/agentmail/references/webhooks.md +220 -0
  4. package/.agents/skills/agentmail/references/websockets.md +263 -0
  5. package/.agents/skills/ai-elements/SKILL.md +160 -0
  6. package/.agents/skills/ai-elements/references/agent.md +134 -0
  7. package/.agents/skills/ai-elements/references/artifact.md +84 -0
  8. package/.agents/skills/ai-elements/references/attachments.md +190 -0
  9. package/.agents/skills/ai-elements/references/audio-player.md +134 -0
  10. package/.agents/skills/ai-elements/references/canvas.md +34 -0
  11. package/.agents/skills/ai-elements/references/chain-of-thought.md +81 -0
  12. package/.agents/skills/ai-elements/references/checkpoint.md +183 -0
  13. package/.agents/skills/ai-elements/references/code-block.md +170 -0
  14. package/.agents/skills/ai-elements/references/commit.md +177 -0
  15. package/.agents/skills/ai-elements/references/confirmation.md +262 -0
  16. package/.agents/skills/ai-elements/references/connection.md +34 -0
  17. package/.agents/skills/ai-elements/references/context.md +126 -0
  18. package/.agents/skills/ai-elements/references/controls.md +32 -0
  19. package/.agents/skills/ai-elements/references/conversation.md +224 -0
  20. package/.agents/skills/ai-elements/references/edge.md +52 -0
  21. package/.agents/skills/ai-elements/references/environment-variables.md +102 -0
  22. package/.agents/skills/ai-elements/references/file-tree.md +72 -0
  23. package/.agents/skills/ai-elements/references/image.md +146 -0
  24. package/.agents/skills/ai-elements/references/inline-citation.md +299 -0
  25. package/.agents/skills/ai-elements/references/jsx-preview.md +104 -0
  26. package/.agents/skills/ai-elements/references/message.md +237 -0
  27. package/.agents/skills/ai-elements/references/mic-selector.md +189 -0
  28. package/.agents/skills/ai-elements/references/model-selector.md +112 -0
  29. package/.agents/skills/ai-elements/references/node.md +73 -0
  30. package/.agents/skills/ai-elements/references/open-in-chat.md +67 -0
  31. package/.agents/skills/ai-elements/references/package-info.md +95 -0
  32. package/.agents/skills/ai-elements/references/panel.md +33 -0
  33. package/.agents/skills/ai-elements/references/persona.md +166 -0
  34. package/.agents/skills/ai-elements/references/plan.md +79 -0
  35. package/.agents/skills/ai-elements/references/prompt-input.md +579 -0
  36. package/.agents/skills/ai-elements/references/queue.md +172 -0
  37. package/.agents/skills/ai-elements/references/reasoning.md +238 -0
  38. package/.agents/skills/ai-elements/references/sandbox.md +129 -0
  39. package/.agents/skills/ai-elements/references/schema-display.md +102 -0
  40. package/.agents/skills/ai-elements/references/shimmer.md +48 -0
  41. package/.agents/skills/ai-elements/references/snippet.md +64 -0
  42. package/.agents/skills/ai-elements/references/sources.md +209 -0
  43. package/.agents/skills/ai-elements/references/speech-input.md +163 -0
  44. package/.agents/skills/ai-elements/references/stack-trace.md +224 -0
  45. package/.agents/skills/ai-elements/references/suggestion.md +124 -0
  46. package/.agents/skills/ai-elements/references/task.md +222 -0
  47. package/.agents/skills/ai-elements/references/terminal.md +103 -0
  48. package/.agents/skills/ai-elements/references/test-results.md +157 -0
  49. package/.agents/skills/ai-elements/references/tool.md +285 -0
  50. package/.agents/skills/ai-elements/references/toolbar.md +32 -0
  51. package/.agents/skills/ai-elements/references/transcription.md +120 -0
  52. package/.agents/skills/ai-elements/references/voice-selector.md +241 -0
  53. package/.agents/skills/ai-elements/references/web-preview.md +200 -0
  54. package/.agents/skills/ai-elements/scripts/agent.tsx +61 -0
  55. package/.agents/skills/ai-elements/scripts/artifact.tsx +127 -0
  56. package/.agents/skills/ai-elements/scripts/attachments-inline.tsx +128 -0
  57. package/.agents/skills/ai-elements/scripts/attachments-list.tsx +95 -0
  58. package/.agents/skills/ai-elements/scripts/attachments.tsx +85 -0
  59. package/.agents/skills/ai-elements/scripts/audio-player-remote.tsx +35 -0
  60. package/.agents/skills/ai-elements/scripts/audio-player.tsx +68 -0
  61. package/.agents/skills/ai-elements/scripts/chain-of-thought.tsx +82 -0
  62. package/.agents/skills/ai-elements/scripts/checkpoint.tsx +110 -0
  63. package/.agents/skills/ai-elements/scripts/code-block-dark.tsx +46 -0
  64. package/.agents/skills/ai-elements/scripts/code-block.tsx +120 -0
  65. package/.agents/skills/ai-elements/scripts/commit.tsx +94 -0
  66. package/.agents/skills/ai-elements/scripts/confirmation-accepted.tsx +40 -0
  67. package/.agents/skills/ai-elements/scripts/confirmation-rejected.tsx +40 -0
  68. package/.agents/skills/ai-elements/scripts/confirmation-request.tsx +54 -0
  69. package/.agents/skills/ai-elements/scripts/confirmation.tsx +55 -0
  70. package/.agents/skills/ai-elements/scripts/context.tsx +45 -0
  71. package/.agents/skills/ai-elements/scripts/conversation.tsx +177 -0
  72. package/.agents/skills/ai-elements/scripts/environment-variables.tsx +62 -0
  73. package/.agents/skills/ai-elements/scripts/file-tree-basic.tsx +18 -0
  74. package/.agents/skills/ai-elements/scripts/file-tree-expanded.tsx +21 -0
  75. package/.agents/skills/ai-elements/scripts/file-tree-selection.tsx +24 -0
  76. package/.agents/skills/ai-elements/scripts/file-tree.tsx +42 -0
  77. package/.agents/skills/ai-elements/scripts/image.tsx +20 -0
  78. package/.agents/skills/ai-elements/scripts/inline-citation.tsx +97 -0
  79. package/.agents/skills/ai-elements/scripts/jsx-preview.tsx +104 -0
  80. package/.agents/skills/ai-elements/scripts/message.tsx +365 -0
  81. package/.agents/skills/ai-elements/scripts/mic-selector.tsx +49 -0
  82. package/.agents/skills/ai-elements/scripts/model-selector.tsx +365 -0
  83. package/.agents/skills/ai-elements/scripts/open-in-chat.tsx +33 -0
  84. package/.agents/skills/ai-elements/scripts/package-info.tsx +51 -0
  85. package/.agents/skills/ai-elements/scripts/persona-command.tsx +110 -0
  86. package/.agents/skills/ai-elements/scripts/persona-glint.tsx +110 -0
  87. package/.agents/skills/ai-elements/scripts/persona-halo.tsx +110 -0
  88. package/.agents/skills/ai-elements/scripts/persona-mana.tsx +110 -0
  89. package/.agents/skills/ai-elements/scripts/persona-obsidian.tsx +110 -0
  90. package/.agents/skills/ai-elements/scripts/persona-opal.tsx +110 -0
  91. package/.agents/skills/ai-elements/scripts/plan.tsx +65 -0
  92. package/.agents/skills/ai-elements/scripts/prompt-input-cursor.tsx +502 -0
  93. package/.agents/skills/ai-elements/scripts/prompt-input-tooltip.tsx +44 -0
  94. package/.agents/skills/ai-elements/scripts/prompt-input.tsx +267 -0
  95. package/.agents/skills/ai-elements/scripts/queue-prompt-input.tsx +394 -0
  96. package/.agents/skills/ai-elements/scripts/queue.tsx +295 -0
  97. package/.agents/skills/ai-elements/scripts/reasoning.tsx +71 -0
  98. package/.agents/skills/ai-elements/scripts/sandbox.tsx +178 -0
  99. package/.agents/skills/ai-elements/scripts/schema-display-basic.tsx +9 -0
  100. package/.agents/skills/ai-elements/scripts/schema-display-body.tsx +20 -0
  101. package/.agents/skills/ai-elements/scripts/schema-display-nested.tsx +23 -0
  102. package/.agents/skills/ai-elements/scripts/schema-display-params.tsx +16 -0
  103. package/.agents/skills/ai-elements/scripts/schema-display.tsx +110 -0
  104. package/.agents/skills/ai-elements/scripts/shimmer-duration.tsx +31 -0
  105. package/.agents/skills/ai-elements/scripts/shimmer-elements.tsx +43 -0
  106. package/.agents/skills/ai-elements/scripts/shimmer.tsx +17 -0
  107. package/.agents/skills/ai-elements/scripts/snippet-plain.tsx +19 -0
  108. package/.agents/skills/ai-elements/scripts/snippet.tsx +25 -0
  109. package/.agents/skills/ai-elements/scripts/sources-custom.tsx +39 -0
  110. package/.agents/skills/ai-elements/scripts/sources.tsx +32 -0
  111. package/.agents/skills/ai-elements/scripts/speech-input.tsx +84 -0
  112. package/.agents/skills/ai-elements/scripts/stack-trace-collapsed.tsx +39 -0
  113. package/.agents/skills/ai-elements/scripts/stack-trace-no-internal.tsx +41 -0
  114. package/.agents/skills/ai-elements/scripts/stack-trace.tsx +58 -0
  115. package/.agents/skills/ai-elements/scripts/suggestion-input.tsx +144 -0
  116. package/.agents/skills/ai-elements/scripts/suggestion.tsx +32 -0
  117. package/.agents/skills/ai-elements/scripts/task.tsx +59 -0
  118. package/.agents/skills/ai-elements/scripts/terminal-basic.tsx +7 -0
  119. package/.agents/skills/ai-elements/scripts/terminal-clear.tsx +19 -0
  120. package/.agents/skills/ai-elements/scripts/terminal-streaming.tsx +38 -0
  121. package/.agents/skills/ai-elements/scripts/terminal.tsx +82 -0
  122. package/.agents/skills/ai-elements/scripts/test-results-basic.tsx +27 -0
  123. package/.agents/skills/ai-elements/scripts/test-results-errors.tsx +51 -0
  124. package/.agents/skills/ai-elements/scripts/test-results-suites.tsx +40 -0
  125. package/.agents/skills/ai-elements/scripts/test-results.tsx +102 -0
  126. package/.agents/skills/ai-elements/scripts/tool-input-available.tsx +31 -0
  127. package/.agents/skills/ai-elements/scripts/tool-input-streaming.tsx +30 -0
  128. package/.agents/skills/ai-elements/scripts/tool-output-available.tsx +80 -0
  129. package/.agents/skills/ai-elements/scripts/tool-output-error.tsx +44 -0
  130. package/.agents/skills/ai-elements/scripts/tool.tsx +222 -0
  131. package/.agents/skills/ai-elements/scripts/transcription.tsx +290 -0
  132. package/.agents/skills/ai-elements/scripts/voice-selector.tsx +245 -0
  133. package/.agents/skills/ai-elements/scripts/web-preview.tsx +115 -0
  134. package/.agents/skills/ai-sdk/SKILL.md +78 -0
  135. package/.agents/skills/ai-sdk/references/ai-gateway.md +66 -0
  136. package/.agents/skills/ai-sdk/references/common-errors.md +443 -0
  137. package/.agents/skills/ai-sdk/references/devtools.md +52 -0
  138. package/.agents/skills/ai-sdk/references/type-safe-agents.md +204 -0
  139. package/.agents/skills/chat-sdk/SKILL.md +240 -0
  140. package/.agents/skills/composio/AGENTS.md +404 -0
  141. package/.agents/skills/composio/SKILL.md +55 -0
  142. package/.agents/skills/composio/rules/_template.md +38 -0
  143. package/.agents/skills/composio/rules/app-auth-configs.md +224 -0
  144. package/.agents/skills/composio/rules/app-auth-popup-ui.md +143 -0
  145. package/.agents/skills/composio/rules/app-connected-accounts.md +240 -0
  146. package/.agents/skills/composio/rules/app-custom-tools.md +220 -0
  147. package/.agents/skills/composio/rules/app-execute-tools.md +202 -0
  148. package/.agents/skills/composio/rules/app-fetch-tools.md +292 -0
  149. package/.agents/skills/composio/rules/app-modifiers.md +148 -0
  150. package/.agents/skills/composio/rules/app-tool-versions.md +343 -0
  151. package/.agents/skills/composio/rules/app-toolkits.md +184 -0
  152. package/.agents/skills/composio/rules/app-user-context.md +222 -0
  153. package/.agents/skills/composio/rules/building-with-composio.md +134 -0
  154. package/.agents/skills/composio/rules/composio-cli.md +223 -0
  155. package/.agents/skills/composio/rules/setup-api-keys.md +230 -0
  156. package/.agents/skills/composio/rules/tr-auth-auto.md +110 -0
  157. package/.agents/skills/composio/rules/tr-auth-connections.md +167 -0
  158. package/.agents/skills/composio/rules/tr-auth-manual.md +161 -0
  159. package/.agents/skills/composio/rules/tr-building-chat-ui.md +348 -0
  160. package/.agents/skills/composio/rules/tr-framework-ai-sdk.md +240 -0
  161. package/.agents/skills/composio/rules/tr-framework-integration.md +818 -0
  162. package/.agents/skills/composio/rules/tr-framework-mastra.md +185 -0
  163. package/.agents/skills/composio/rules/tr-mcp-vs-native.md +248 -0
  164. package/.agents/skills/composio/rules/tr-session-basic.md +82 -0
  165. package/.agents/skills/composio/rules/tr-session-config.md +172 -0
  166. package/.agents/skills/composio/rules/tr-session-lifecycle.md +385 -0
  167. package/.agents/skills/composio/rules/tr-toolkit-query.md +135 -0
  168. package/.agents/skills/composio/rules/tr-userid-best-practices.md +476 -0
  169. package/.agents/skills/composio/rules/triggers-create.md +246 -0
  170. package/.agents/skills/composio/rules/triggers-manage.md +275 -0
  171. package/.agents/skills/composio/rules/triggers-subscribe.md +173 -0
  172. package/.agents/skills/composio/rules/triggers-webhook.md +227 -0
  173. package/.agents/skills/create-auth-skill/SKILL.md +321 -0
  174. package/.agents/skills/design-md/README.md +34 -0
  175. package/.agents/skills/design-md/SKILL.md +172 -0
  176. package/.agents/skills/design-md/examples/DESIGN.md +154 -0
  177. package/.agents/skills/expo-tailwind-setup/SKILL.md +480 -0
  178. package/.agents/skills/expo-tailwind-setup/agents/openai.yaml +4 -0
  179. package/.agents/skills/find-skills/SKILL.md +142 -0
  180. package/.agents/skills/firecrawl/SKILL.md +321 -0
  181. package/.agents/skills/firecrawl/rules/install.md +85 -0
  182. package/.agents/skills/firecrawl/rules/security.md +26 -0
  183. package/.agents/skills/frontend-design/LICENSE.txt +177 -0
  184. package/.agents/skills/frontend-design/SKILL.md +55 -0
  185. package/.agents/skills/linkup-search/SKILL.md +298 -0
  186. package/.agents/skills/mcp-builder/LICENSE.txt +202 -0
  187. package/.agents/skills/mcp-builder/SKILL.md +236 -0
  188. package/.agents/skills/mcp-builder/reference/evaluation.md +602 -0
  189. package/.agents/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
  190. package/.agents/skills/mcp-builder/reference/node_mcp_server.md +970 -0
  191. package/.agents/skills/mcp-builder/reference/python_mcp_server.md +719 -0
  192. package/.agents/skills/mcp-builder/scripts/connections.py +151 -0
  193. package/.agents/skills/mcp-builder/scripts/evaluation.py +373 -0
  194. package/.agents/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  195. package/.agents/skills/mcp-builder/scripts/requirements.txt +2 -0
  196. package/.agents/skills/mobile-android-design/SKILL.md +101 -0
  197. package/.agents/skills/mobile-android-design/references/android-navigation.md +698 -0
  198. package/.agents/skills/mobile-android-design/references/compose-components.md +796 -0
  199. package/.agents/skills/mobile-android-design/references/details.md +337 -0
  200. package/.agents/skills/mobile-android-design/references/material3-theming.md +604 -0
  201. package/.agents/skills/mobile-ios-design/SKILL.md +259 -0
  202. package/.agents/skills/mobile-ios-design/references/hig-patterns.md +529 -0
  203. package/.agents/skills/mobile-ios-design/references/ios-navigation.md +556 -0
  204. package/.agents/skills/mobile-ios-design/references/swiftui-components.md +575 -0
  205. package/.agents/skills/neon-drizzle/SKILL.md +81 -0
  206. package/.agents/skills/neon-drizzle/guides/existing-project.md +398 -0
  207. package/.agents/skills/neon-drizzle/guides/new-project.md +312 -0
  208. package/.agents/skills/neon-drizzle/guides/schema-only.md +415 -0
  209. package/.agents/skills/neon-drizzle/guides/troubleshooting.md +539 -0
  210. package/.agents/skills/neon-drizzle/references/adapters.md +478 -0
  211. package/.agents/skills/neon-drizzle/references/migrations.md +652 -0
  212. package/.agents/skills/neon-drizzle/references/query-patterns.md +761 -0
  213. package/.agents/skills/neon-drizzle/scripts/generate-schema.ts +77 -0
  214. package/.agents/skills/neon-drizzle/scripts/run-migration.ts +133 -0
  215. package/.agents/skills/neon-drizzle/templates/db-http.ts +6 -0
  216. package/.agents/skills/neon-drizzle/templates/db-websocket.ts +24 -0
  217. package/.agents/skills/neon-drizzle/templates/drizzle-config.ts +96 -0
  218. package/.agents/skills/neon-drizzle/templates/schema-example.ts +231 -0
  219. package/.agents/skills/neon-postgres/SKILL.md +376 -0
  220. package/.agents/skills/next-best-practices/SKILL.md +152 -0
  221. package/.agents/skills/next-best-practices/async-patterns.md +87 -0
  222. package/.agents/skills/next-best-practices/bundling.md +180 -0
  223. package/.agents/skills/next-best-practices/data-patterns.md +297 -0
  224. package/.agents/skills/next-best-practices/debug-tricks.md +105 -0
  225. package/.agents/skills/next-best-practices/directives.md +73 -0
  226. package/.agents/skills/next-best-practices/error-handling.md +227 -0
  227. package/.agents/skills/next-best-practices/file-conventions.md +140 -0
  228. package/.agents/skills/next-best-practices/font.md +245 -0
  229. package/.agents/skills/next-best-practices/functions.md +108 -0
  230. package/.agents/skills/next-best-practices/hydration-error.md +91 -0
  231. package/.agents/skills/next-best-practices/image.md +173 -0
  232. package/.agents/skills/next-best-practices/metadata.md +301 -0
  233. package/.agents/skills/next-best-practices/parallel-routes.md +287 -0
  234. package/.agents/skills/next-best-practices/route-handlers.md +146 -0
  235. package/.agents/skills/next-best-practices/rsc-boundaries.md +159 -0
  236. package/.agents/skills/next-best-practices/runtime-selection.md +39 -0
  237. package/.agents/skills/next-best-practices/scripts.md +141 -0
  238. package/.agents/skills/next-best-practices/self-hosting.md +371 -0
  239. package/.agents/skills/next-best-practices/suspense-boundaries.md +67 -0
  240. package/.agents/skills/playwright-best-practices/SKILL.md +303 -0
  241. package/.agents/skills/playwright-cli/SKILL.md +404 -0
  242. package/.agents/skills/playwright-cli/references/element-attributes.md +23 -0
  243. package/.agents/skills/playwright-cli/references/playwright-tests.md +39 -0
  244. package/.agents/skills/playwright-cli/references/request-mocking.md +87 -0
  245. package/.agents/skills/playwright-cli/references/running-code.md +241 -0
  246. package/.agents/skills/playwright-cli/references/session-management.md +225 -0
  247. package/.agents/skills/playwright-cli/references/spec-driven-testing.md +305 -0
  248. package/.agents/skills/playwright-cli/references/storage-state.md +275 -0
  249. package/.agents/skills/playwright-cli/references/test-generation.md +134 -0
  250. package/.agents/skills/playwright-cli/references/tracing.md +139 -0
  251. package/.agents/skills/playwright-cli/references/video-recording.md +143 -0
  252. package/.agents/skills/prisma-client-api/SKILL.md +216 -0
  253. package/.agents/skills/prisma-client-api/references/client-methods.md +223 -0
  254. package/.agents/skills/prisma-client-api/references/constructor.md +208 -0
  255. package/.agents/skills/prisma-client-api/references/filters.md +256 -0
  256. package/.agents/skills/prisma-client-api/references/model-queries.md +281 -0
  257. package/.agents/skills/prisma-client-api/references/query-options.md +276 -0
  258. package/.agents/skills/prisma-client-api/references/raw-queries.md +194 -0
  259. package/.agents/skills/prisma-client-api/references/relations.md +308 -0
  260. package/.agents/skills/prisma-client-api/references/transactions.md +184 -0
  261. package/.agents/skills/prisma-database-setup/SKILL.md +192 -0
  262. package/.agents/skills/prisma-database-setup/references/cockroachdb.md +89 -0
  263. package/.agents/skills/prisma-database-setup/references/mongodb.md +90 -0
  264. package/.agents/skills/prisma-database-setup/references/mysql.md +126 -0
  265. package/.agents/skills/prisma-database-setup/references/postgresql.md +92 -0
  266. package/.agents/skills/prisma-database-setup/references/prisma-client-setup.md +47 -0
  267. package/.agents/skills/prisma-database-setup/references/prisma-postgres.md +130 -0
  268. package/.agents/skills/prisma-database-setup/references/sqlite.md +106 -0
  269. package/.agents/skills/prisma-database-setup/references/sqlserver.md +94 -0
  270. package/.agents/skills/prisma-postgres/SKILL.md +127 -0
  271. package/.agents/skills/prisma-postgres/references/console-and-connections.md +67 -0
  272. package/.agents/skills/prisma-postgres/references/create-db-cli.md +136 -0
  273. package/.agents/skills/prisma-postgres/references/management-api-sdk.md +56 -0
  274. package/.agents/skills/prisma-postgres/references/management-api.md +61 -0
  275. package/.agents/skills/remotion-best-practices/SKILL.md +340 -0
  276. package/.agents/skills/remotion-best-practices/rules/3d.md +86 -0
  277. package/.agents/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
  278. package/.agents/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
  279. package/.agents/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +103 -0
  280. package/.agents/skills/remotion-best-practices/rules/audio-visualization.md +198 -0
  281. package/.agents/skills/remotion-best-practices/rules/audio.md +169 -0
  282. package/.agents/skills/remotion-best-practices/rules/calculate-metadata.md +134 -0
  283. package/.agents/skills/remotion-best-practices/rules/compositions.md +133 -0
  284. package/.agents/skills/remotion-best-practices/rules/display-captions.md +184 -0
  285. package/.agents/skills/remotion-best-practices/rules/ffmpeg.md +34 -0
  286. package/.agents/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
  287. package/.agents/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
  288. package/.agents/skills/remotion-best-practices/rules/get-video-duration.md +60 -0
  289. package/.agents/skills/remotion-best-practices/rules/gifs.md +141 -0
  290. package/.agents/skills/remotion-best-practices/rules/google-fonts.md +72 -0
  291. package/.agents/skills/remotion-best-practices/rules/html-in-canvas.md +122 -0
  292. package/.agents/skills/remotion-best-practices/rules/images.md +71 -0
  293. package/.agents/skills/remotion-best-practices/rules/import-srt-captions.md +69 -0
  294. package/.agents/skills/remotion-best-practices/rules/light-leaks.md +73 -0
  295. package/.agents/skills/remotion-best-practices/rules/local-fonts.md +65 -0
  296. package/.agents/skills/remotion-best-practices/rules/lottie.md +70 -0
  297. package/.agents/skills/remotion-best-practices/rules/maplibre.md +458 -0
  298. package/.agents/skills/remotion-best-practices/rules/measuring-dom-nodes.md +34 -0
  299. package/.agents/skills/remotion-best-practices/rules/measuring-text.md +140 -0
  300. package/.agents/skills/remotion-best-practices/rules/parameters.md +109 -0
  301. package/.agents/skills/remotion-best-practices/rules/sequencing.md +144 -0
  302. package/.agents/skills/remotion-best-practices/rules/sfx.md +30 -0
  303. package/.agents/skills/remotion-best-practices/rules/silence-detection.md +71 -0
  304. package/.agents/skills/remotion-best-practices/rules/subtitles.md +36 -0
  305. package/.agents/skills/remotion-best-practices/rules/tailwind.md +11 -0
  306. package/.agents/skills/remotion-best-practices/rules/text-animations.md +20 -0
  307. package/.agents/skills/remotion-best-practices/rules/timing.md +136 -0
  308. package/.agents/skills/remotion-best-practices/rules/transcribe-captions.md +70 -0
  309. package/.agents/skills/remotion-best-practices/rules/transitions.md +197 -0
  310. package/.agents/skills/remotion-best-practices/rules/transparent-videos.md +106 -0
  311. package/.agents/skills/remotion-best-practices/rules/trimming.md +51 -0
  312. package/.agents/skills/remotion-best-practices/rules/videos.md +171 -0
  313. package/.agents/skills/remotion-best-practices/rules/voiceover.md +99 -0
  314. package/.agents/skills/remotion-render/SKILL.md +212 -0
  315. package/.agents/skills/skill-creator/LICENSE.txt +202 -0
  316. package/.agents/skills/skill-creator/SKILL.md +485 -0
  317. package/.agents/skills/skill-creator/agents/analyzer.md +274 -0
  318. package/.agents/skills/skill-creator/agents/comparator.md +202 -0
  319. package/.agents/skills/skill-creator/agents/grader.md +223 -0
  320. package/.agents/skills/skill-creator/assets/eval_review.html +146 -0
  321. package/.agents/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  322. package/.agents/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  323. package/.agents/skills/skill-creator/references/schemas.md +430 -0
  324. package/.agents/skills/skill-creator/scripts/__init__.py +0 -0
  325. package/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  326. package/.agents/skills/skill-creator/scripts/generate_report.py +326 -0
  327. package/.agents/skills/skill-creator/scripts/improve_description.py +247 -0
  328. package/.agents/skills/skill-creator/scripts/package_skill.py +136 -0
  329. package/.agents/skills/skill-creator/scripts/quick_validate.py +103 -0
  330. package/.agents/skills/skill-creator/scripts/run_eval.py +310 -0
  331. package/.agents/skills/skill-creator/scripts/run_loop.py +328 -0
  332. package/.agents/skills/skill-creator/scripts/utils.py +47 -0
  333. package/.agents/skills/stripe-best-practices/SKILL.md +54 -0
  334. package/.agents/skills/stripe-best-practices/references/billing.md +58 -0
  335. package/.agents/skills/stripe-best-practices/references/connect.md +173 -0
  336. package/.agents/skills/stripe-best-practices/references/payments.md +79 -0
  337. package/.agents/skills/stripe-best-practices/references/security.md +109 -0
  338. package/.agents/skills/stripe-best-practices/references/tax.md +37 -0
  339. package/.agents/skills/stripe-best-practices/references/treasury.md +16 -0
  340. package/.agents/skills/stripe-projects/SKILL.md +132 -0
  341. package/.agents/skills/supabase/CHANGELOG.md +35 -0
  342. package/.agents/skills/supabase/SKILL.md +135 -0
  343. package/.agents/skills/supabase/assets/feedback-issue-template.md +17 -0
  344. package/.agents/skills/supabase/references/skill-feedback.md +17 -0
  345. package/.agents/skills/supabase-postgres-best-practices/CHANGELOG.md +29 -0
  346. package/.agents/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  347. package/.agents/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
  348. package/.agents/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
  349. package/.agents/skills/supabase-postgres-best-practices/references/_template.md +34 -0
  350. package/.agents/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
  351. package/.agents/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
  352. package/.agents/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
  353. package/.agents/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
  354. package/.agents/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
  355. package/.agents/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
  356. package/.agents/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
  357. package/.agents/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
  358. package/.agents/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
  359. package/.agents/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
  360. package/.agents/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
  361. package/.agents/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
  362. package/.agents/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
  363. package/.agents/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
  364. package/.agents/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
  365. package/.agents/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
  366. package/.agents/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
  367. package/.agents/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
  368. package/.agents/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
  369. package/.agents/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
  370. package/.agents/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
  371. package/.agents/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
  372. package/.agents/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
  373. package/.agents/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
  374. package/.agents/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
  375. package/.agents/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
  376. package/.agents/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
  377. package/.agents/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
  378. package/.agents/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
  379. package/.agents/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
  380. package/.agents/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
  381. package/.agents/skills/supermemory/LICENSE +201 -0
  382. package/.agents/skills/supermemory/README.md +221 -0
  383. package/.agents/skills/supermemory/SKILL.md +172 -0
  384. package/.agents/skills/supermemory/references/api-reference.md +591 -0
  385. package/.agents/skills/supermemory/references/architecture.md +557 -0
  386. package/.agents/skills/supermemory/references/quickstart.md +293 -0
  387. package/.agents/skills/supermemory/references/sdk-guide.md +655 -0
  388. package/.agents/skills/supermemory/references/use-cases.md +1033 -0
  389. package/.agents/skills/supermemory-cli/SKILL.md +490 -0
  390. package/.agents/skills/tdd/SKILL.md +108 -0
  391. package/.agents/skills/tdd/mocking.md +59 -0
  392. package/.agents/skills/tdd/refactoring.md +10 -0
  393. package/.agents/skills/tdd/tests.md +61 -0
  394. package/.agents/skills/ui-ux-pro-max/SKILL.md +661 -0
  395. package/.agents/skills/ui-ux-pro-max/data +1 -0
  396. package/.agents/skills/ui-ux-pro-max/scripts +1 -0
  397. package/.agents/skills/vercel-react-native-skills/AGENTS.md +2897 -0
  398. package/.agents/skills/vercel-react-native-skills/README.md +165 -0
  399. package/.agents/skills/vercel-react-native-skills/SKILL.md +121 -0
  400. package/.agents/skills/vercel-react-native-skills/metadata.json +16 -0
  401. package/.agents/skills/vercel-react-native-skills/rules/_sections.md +86 -0
  402. package/.agents/skills/vercel-react-native-skills/rules/_template.md +28 -0
  403. package/.agents/skills/vercel-react-native-skills/rules/animation-derived-value.md +53 -0
  404. package/.agents/skills/vercel-react-native-skills/rules/animation-gesture-detector-press.md +95 -0
  405. package/.agents/skills/vercel-react-native-skills/rules/animation-gpu-properties.md +65 -0
  406. package/.agents/skills/vercel-react-native-skills/rules/design-system-compound-components.md +66 -0
  407. package/.agents/skills/vercel-react-native-skills/rules/fonts-config-plugin.md +71 -0
  408. package/.agents/skills/vercel-react-native-skills/rules/imports-design-system-folder.md +68 -0
  409. package/.agents/skills/vercel-react-native-skills/rules/js-hoist-intl.md +61 -0
  410. package/.agents/skills/vercel-react-native-skills/rules/list-performance-callbacks.md +44 -0
  411. package/.agents/skills/vercel-react-native-skills/rules/list-performance-function-references.md +132 -0
  412. package/.agents/skills/vercel-react-native-skills/rules/list-performance-images.md +53 -0
  413. package/.agents/skills/vercel-react-native-skills/rules/list-performance-inline-objects.md +97 -0
  414. package/.agents/skills/vercel-react-native-skills/rules/list-performance-item-expensive.md +94 -0
  415. package/.agents/skills/vercel-react-native-skills/rules/list-performance-item-memo.md +82 -0
  416. package/.agents/skills/vercel-react-native-skills/rules/list-performance-item-types.md +104 -0
  417. package/.agents/skills/vercel-react-native-skills/rules/list-performance-virtualize.md +67 -0
  418. package/.agents/skills/vercel-react-native-skills/rules/monorepo-native-deps-in-app.md +46 -0
  419. package/.agents/skills/vercel-react-native-skills/rules/monorepo-single-dependency-versions.md +63 -0
  420. package/.agents/skills/vercel-react-native-skills/rules/navigation-native-navigators.md +188 -0
  421. package/.agents/skills/vercel-react-native-skills/rules/react-compiler-destructure-functions.md +50 -0
  422. package/.agents/skills/vercel-react-native-skills/rules/react-compiler-reanimated-shared-values.md +48 -0
  423. package/.agents/skills/vercel-react-native-skills/rules/react-state-dispatcher.md +91 -0
  424. package/.agents/skills/vercel-react-native-skills/rules/react-state-fallback.md +56 -0
  425. package/.agents/skills/vercel-react-native-skills/rules/react-state-minimize.md +65 -0
  426. package/.agents/skills/vercel-react-native-skills/rules/rendering-no-falsy-and.md +74 -0
  427. package/.agents/skills/vercel-react-native-skills/rules/rendering-text-in-text-component.md +36 -0
  428. package/.agents/skills/vercel-react-native-skills/rules/scroll-position-no-state.md +82 -0
  429. package/.agents/skills/vercel-react-native-skills/rules/state-ground-truth.md +80 -0
  430. package/.agents/skills/vercel-react-native-skills/rules/ui-expo-image.md +66 -0
  431. package/.agents/skills/vercel-react-native-skills/rules/ui-image-gallery.md +104 -0
  432. package/.agents/skills/vercel-react-native-skills/rules/ui-measure-views.md +78 -0
  433. package/.agents/skills/vercel-react-native-skills/rules/ui-menus.md +174 -0
  434. package/.agents/skills/vercel-react-native-skills/rules/ui-native-modals.md +77 -0
  435. package/.agents/skills/vercel-react-native-skills/rules/ui-pressable.md +61 -0
  436. package/.agents/skills/vercel-react-native-skills/rules/ui-safe-area-scroll.md +65 -0
  437. package/.agents/skills/vercel-react-native-skills/rules/ui-scrollview-content-inset.md +45 -0
  438. package/.agents/skills/vercel-react-native-skills/rules/ui-styling.md +87 -0
  439. package/.agents/skills/web-design-guidelines/SKILL.md +39 -0
  440. package/dist/index.js +1 -1
  441. package/package.json +2 -1
@@ -0,0 +1,126 @@
1
+ # Context
2
+
3
+ A compound component system for displaying AI model context window usage, token consumption, and cost estimation.
4
+
5
+ The `Context` component provides a comprehensive view of AI model usage through a compound component system. It displays context window utilization, token consumption breakdown (input, output, reasoning, cache), and cost estimation in an interactive hover card interface.
6
+
7
+ See `scripts/context.tsx` for this example.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npx ai-elements@latest add context
13
+ ```
14
+
15
+ ## Features
16
+
17
+ - **Compound Component Architecture**: Flexible composition of context display elements
18
+ - **Visual Progress Indicator**: Circular SVG progress ring showing context usage percentage
19
+ - **Token Breakdown**: Detailed view of input, output, reasoning, and cached tokens
20
+ - **Cost Estimation**: Real-time cost calculation using the `tokenlens` library
21
+ - **Intelligent Formatting**: Automatic token count formatting (K, M, B suffixes)
22
+ - **Interactive Hover Card**: Detailed information revealed on hover
23
+ - **Context Provider Pattern**: Clean data flow through React Context API
24
+ - **TypeScript Support**: Full type definitions for all components
25
+ - **Accessible Design**: Proper ARIA labels and semantic HTML
26
+ - **Theme Integration**: Uses currentColor for automatic theme adaptation
27
+
28
+ ## Props
29
+
30
+ ### `<Context />`
31
+
32
+ | Prop | Type | Default | Description |
33
+ |------|------|---------|-------------|
34
+ | `maxTokens` | `number` | - | The total context window size in tokens. |
35
+ | `usedTokens` | `number` | - | The number of tokens currently used. |
36
+ | `usage` | `LanguageModelUsage` | - | Detailed token usage breakdown from the AI SDK (input, output, reasoning, cached tokens). |
37
+ | `modelId` | `ModelId` | - | Model identifier for cost calculation (e.g., |
38
+ | `...props` | `ComponentProps<HoverCard>` | - | Any other props are spread to the HoverCard component. |
39
+
40
+ ### `<ContextTrigger />`
41
+
42
+ | Prop | Type | Default | Description |
43
+ |------|------|---------|-------------|
44
+ | `children` | `React.ReactNode` | - | Custom trigger element. If not provided, renders a default button with percentage and icon. |
45
+ | `...props` | `ComponentProps<Button>` | - | Props spread to the default button element. |
46
+
47
+ ### `<ContextContent />`
48
+
49
+ | Prop | Type | Default | Description |
50
+ |------|------|---------|-------------|
51
+ | `className` | `string` | - | Additional CSS classes for the hover card content. |
52
+ | `...props` | `ComponentProps<HoverCardContent>` | - | Props spread to the HoverCardContent component. |
53
+
54
+ ### `<ContextContentHeader />`
55
+
56
+ | Prop | Type | Default | Description |
57
+ |------|------|---------|-------------|
58
+ | `children` | `React.ReactNode` | - | Custom header content. If not provided, renders percentage and token count with progress bar. |
59
+ | `...props` | `ComponentProps<div>` | - | Props spread to the header div element. |
60
+
61
+ ### `<ContextContentBody />`
62
+
63
+ | Prop | Type | Default | Description |
64
+ |------|------|---------|-------------|
65
+ | `children` | `React.ReactNode` | - | Body content, typically containing usage breakdown components. |
66
+ | `...props` | `ComponentProps<div>` | - | Props spread to the body div element. |
67
+
68
+ ### `<ContextContentFooter />`
69
+
70
+ | Prop | Type | Default | Description |
71
+ |------|------|---------|-------------|
72
+ | `children` | `React.ReactNode` | - | Custom footer content. If not provided, renders total cost when modelId is provided. |
73
+ | `...props` | `ComponentProps<div>` | - | Props spread to the footer div element. |
74
+
75
+ ### Usage Components
76
+
77
+ All usage components (`ContextInputUsage`, `ContextOutputUsage`, `ContextReasoningUsage`, `ContextCacheUsage`) share the same props:
78
+
79
+ | Prop | Type | Default | Description |
80
+ |------|------|---------|-------------|
81
+ | `children` | `React.ReactNode` | - | Custom content. If not provided, renders token count and cost for the respective usage type. |
82
+ | `className` | `string` | - | Additional CSS classes. |
83
+ | `...props` | `ComponentProps<div>` | - | Props spread to the div element. |
84
+
85
+ ## Component Architecture
86
+
87
+ The Context component uses a compound component pattern with React Context for data sharing:
88
+
89
+ 1. **`<Context>`** - Root provider component that holds all context data
90
+ 2. **`<ContextTrigger>`** - Interactive trigger element (default: button with percentage)
91
+ 3. **`<ContextContent>`** - Hover card content container
92
+ 4. **`<ContextContentHeader>`** - Header section with progress visualization
93
+ 5. **`<ContextContentBody>`** - Body section for usage breakdowns
94
+ 6. **`<ContextContentFooter>`** - Footer section for total cost
95
+ 7. **Usage Components** - Individual token usage displays (Input, Output, Reasoning, Cache)
96
+
97
+ ## Token Formatting
98
+
99
+ The component uses `Intl.NumberFormat` with compact notation for automatic formatting:
100
+
101
+ - Under 1,000: Shows exact count (e.g., "842")
102
+ - 1,000+: Shows with K suffix (e.g., "32K")
103
+ - 1,000,000+: Shows with M suffix (e.g., "1.5M")
104
+ - 1,000,000,000+: Shows with B suffix (e.g., "2.1B")
105
+
106
+ ## Cost Calculation
107
+
108
+ When a `modelId` is provided, the component automatically calculates costs using the `tokenlens` library:
109
+
110
+ - **Input tokens**: Cost based on model's input pricing
111
+ - **Output tokens**: Cost based on model's output pricing
112
+ - **Reasoning tokens**: Special pricing for reasoning-capable models
113
+ - **Cached tokens**: Reduced pricing for cached input tokens
114
+ - **Total cost**: Sum of all token type costs
115
+
116
+ Costs are formatted using `Intl.NumberFormat` with USD currency.
117
+
118
+ ## Styling
119
+
120
+ The component uses Tailwind CSS classes and follows your design system:
121
+
122
+ - Progress indicator uses `currentColor` for theme adaptation
123
+ - Hover card has customizable width and padding
124
+ - Footer has a secondary background for visual separation
125
+ - All text sizes use the `text-xs` class for consistency
126
+ - Muted foreground colors for secondary information
@@ -0,0 +1,32 @@
1
+ # Controls
2
+
3
+ A styled controls component for React Flow-based canvases with zoom and fit view functionality.
4
+
5
+ The `Controls` component provides interactive zoom and fit view controls for React Flow canvases. It includes a modern, themed design with backdrop blur and card styling.
6
+
7
+
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npx ai-elements@latest add controls
13
+ ```
14
+
15
+ ## Features
16
+
17
+ - Zoom in/out controls
18
+ - Fit view button to center and scale content
19
+ - Rounded pill design with backdrop blur
20
+ - Theme-aware card background
21
+ - Subtle drop shadow for depth
22
+ - Full TypeScript support
23
+ - Compatible with all React Flow control features
24
+
25
+ ## Props
26
+
27
+ ### `<Controls />`
28
+
29
+ | Prop | Type | Default | Description |
30
+ |------|------|---------|-------------|
31
+ | `className` | `string` | - | Additional CSS classes to apply to the controls. |
32
+ | `...props` | `ComponentProps<typeof Controls>` | - | Any other props from @xyflow/react Controls component (showZoom, showFitView, showInteractive, position, etc.). |
@@ -0,0 +1,224 @@
1
+ # Conversation
2
+
3
+ Wraps messages and automatically scrolls to the bottom. Also includes a scroll button that appears when not at the bottom.
4
+
5
+ The `Conversation` component wraps messages and automatically scrolls to the bottom. Also includes a scroll button that appears when not at the bottom.
6
+
7
+ <Preview path="conversation" className="p-0" />
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npx ai-elements@latest add conversation
13
+ ```
14
+
15
+ ## Usage with AI SDK
16
+
17
+ Build a simple conversational UI with `Conversation` and [`PromptInput`](/components/prompt-input):
18
+
19
+ Add the following component to your frontend:
20
+
21
+ ```tsx title="app/page.tsx"
22
+ "use client";
23
+
24
+ import {
25
+ Conversation,
26
+ ConversationContent,
27
+ ConversationDownload,
28
+ ConversationEmptyState,
29
+ ConversationScrollButton,
30
+ } from "@/components/ai-elements/conversation";
31
+ import {
32
+ Message,
33
+ MessageContent,
34
+ MessageResponse,
35
+ } from "@/components/ai-elements/message";
36
+ import {
37
+ PromptInput,
38
+ type PromptInputMessage,
39
+ PromptInputTextarea,
40
+ PromptInputSubmit,
41
+ } from "@/components/ai-elements/prompt-input";
42
+ import { MessageSquare } from "lucide-react";
43
+ import { useState } from "react";
44
+ import { useChat } from "@ai-sdk/react";
45
+
46
+ const ConversationDemo = () => {
47
+ const [input, setInput] = useState("");
48
+ const { messages, sendMessage, status } = useChat();
49
+
50
+ const handleSubmit = (message: PromptInputMessage) => {
51
+ if (message.text.trim()) {
52
+ sendMessage({ text: message.text });
53
+ setInput("");
54
+ }
55
+ };
56
+
57
+ return (
58
+ <div className="max-w-4xl mx-auto p-6 relative size-full rounded-lg border h-[600px]">
59
+ <div className="flex flex-col h-full">
60
+ <Conversation>
61
+ <ConversationContent>
62
+ {messages.length === 0 ? (
63
+ <ConversationEmptyState
64
+ icon={<MessageSquare className="size-12" />}
65
+ title="Start a conversation"
66
+ description="Type a message below to begin chatting"
67
+ />
68
+ ) : (
69
+ messages.map((message) => (
70
+ <Message from={message.role} key={message.id}>
71
+ <MessageContent>
72
+ {message.parts.map((part, i) => {
73
+ switch (part.type) {
74
+ case "text": // we don't use any reasoning or tool calls in this example
75
+ return (
76
+ <MessageResponse key={`${message.id}-${i}`}>
77
+ {part.text}
78
+ </MessageResponse>
79
+ );
80
+ default:
81
+ return null;
82
+ }
83
+ })}
84
+ </MessageContent>
85
+ </Message>
86
+ ))
87
+ )}
88
+ </ConversationContent>
89
+ <ConversationDownload messages={messages} />
90
+ <ConversationScrollButton />
91
+ </Conversation>
92
+
93
+ <PromptInput
94
+ onSubmit={handleSubmit}
95
+ className="mt-4 w-full max-w-2xl mx-auto relative"
96
+ >
97
+ <PromptInputTextarea
98
+ value={input}
99
+ placeholder="Say something..."
100
+ onChange={(e) => setInput(e.currentTarget.value)}
101
+ className="pr-12"
102
+ />
103
+ <PromptInputSubmit
104
+ status={status === "streaming" ? "streaming" : "ready"}
105
+ disabled={!input.trim()}
106
+ className="absolute bottom-1 right-1"
107
+ />
108
+ </PromptInput>
109
+ </div>
110
+ </div>
111
+ );
112
+ };
113
+
114
+ export default ConversationDemo;
115
+ ```
116
+
117
+ Add the following route to your backend:
118
+
119
+ ```tsx title="api/chat/route.ts"
120
+ import { streamText, UIMessage, convertToModelMessages } from "ai";
121
+
122
+ // Allow streaming responses up to 30 seconds
123
+ export const maxDuration = 30;
124
+
125
+ export async function POST(req: Request) {
126
+ const { messages }: { messages: UIMessage[] } = await req.json();
127
+
128
+ const result = streamText({
129
+ model: "openai/gpt-4o",
130
+ messages: await convertToModelMessages(messages),
131
+ });
132
+
133
+ return result.toUIMessageStreamResponse();
134
+ }
135
+ ```
136
+
137
+ ## Features
138
+
139
+ - Automatic scrolling to the bottom when new messages are added
140
+ - Smooth scrolling behavior with configurable animation
141
+ - Scroll button that appears when not at the bottom
142
+ - Download conversation as Markdown
143
+ - Responsive design with customizable padding and spacing
144
+ - Flexible content layout with consistent message spacing
145
+ - Accessible with proper ARIA roles for screen readers
146
+ - Customizable styling through className prop
147
+ - Support for any number of child message components
148
+
149
+ ## Props
150
+
151
+ ### `<Conversation />`
152
+
153
+ | Prop | Type | Default | Description |
154
+ |------|------|---------|-------------|
155
+ | `contextRef` | `React.Ref<StickToBottomContext>` | - | Optional ref to access the StickToBottom context object. |
156
+ | `instance` | `StickToBottomInstance` | - | Optional instance for controlling the StickToBottom component. |
157
+ | `children` | `((context: StickToBottomContext) => ReactNode) | ReactNode` | - | Render prop or ReactNode for custom rendering with context. |
158
+ | `...props` | `Omit<React.HTMLAttributes<HTMLDivElement>, ` | - | Any other props are spread to the root div. |
159
+
160
+ ### `<ConversationContent />`
161
+
162
+ | Prop | Type | Default | Description |
163
+ |------|------|---------|-------------|
164
+ | `children` | `((context: StickToBottomContext) => ReactNode) | ReactNode` | - | Render prop or ReactNode for custom rendering with context. |
165
+ | `...props` | `Omit<React.HTMLAttributes<HTMLDivElement>, ` | - | Any other props are spread to the root div. |
166
+
167
+ ### `<ConversationEmptyState />`
168
+
169
+ | Prop | Type | Default | Description |
170
+ |------|------|---------|-------------|
171
+ | `title` | `string` | - | The title text to display. |
172
+ | `description` | `string` | - | The description text to display. |
173
+ | `icon` | `React.ReactNode` | - | Optional icon to display above the text. |
174
+ | `children` | `React.ReactNode` | - | Optional additional content to render below the text. |
175
+ | `...props` | `ComponentProps<` | - | Any other props are spread to the root div. |
176
+
177
+ ### `<ConversationScrollButton />`
178
+
179
+ | Prop | Type | Default | Description |
180
+ |------|------|---------|-------------|
181
+ | `...props` | `ComponentProps<typeof Button>` | - | Any other props are spread to the underlying shadcn/ui Button component. |
182
+
183
+ ### `<ConversationDownload />`
184
+
185
+ A button that downloads the conversation as a Markdown file.
186
+
187
+ ```tsx
188
+ import { ConversationDownload } from "@/components/ai-elements/conversation";
189
+
190
+ <Conversation>
191
+ <ConversationContent>
192
+ {messages.map(...)}
193
+ </ConversationContent>
194
+ <ConversationDownload messages={messages} />
195
+ <ConversationScrollButton />
196
+ </Conversation>
197
+ ```
198
+
199
+ | Prop | Type | Default | Description |
200
+ |------|------|---------|-------------|
201
+ | `messages` | `UIMessage[]` | Required | Array of messages to include in the download. |
202
+ | `filename` | `string` | - | The filename for the downloaded file. |
203
+ | `formatMessage` | `(message: UIMessage, index: number) => string` | - | Custom function to format each message in the output. |
204
+ | `...props` | `Omit<ComponentProps<typeof Button>, ` | - | Any other props are spread to the underlying shadcn/ui Button component. |
205
+
206
+ ### `messagesToMarkdown`
207
+
208
+ A utility function to convert messages to Markdown format. Useful for custom download implementations.
209
+
210
+ ```tsx
211
+ import { messagesToMarkdown } from "@/components/ai-elements/conversation";
212
+
213
+ const markdown = messagesToMarkdown(messages);
214
+
215
+ // With custom formatter
216
+ const customMarkdown = messagesToMarkdown(
217
+ messages,
218
+ (msg, i) =>
219
+ `[${msg.role}]: ${msg.parts
220
+ .filter((p) => p.type === "text")
221
+ .map((p) => p.text)
222
+ .join("")}`
223
+ );
224
+ ```
@@ -0,0 +1,52 @@
1
+ # Edge
2
+
3
+ Customizable edge components for React Flow canvases with animated and temporary states.
4
+
5
+ The `Edge` component provides two pre-styled edge types for React Flow canvases: `Temporary` for dashed temporary connections and `Animated` for connections with animated indicators.
6
+
7
+
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npx ai-elements@latest add edge
13
+ ```
14
+
15
+ ## Features
16
+
17
+ - Two distinct edge types: Temporary and Animated
18
+ - Temporary edges use dashed lines with ring color
19
+ - Animated edges include a moving circle indicator
20
+ - Automatic handle position calculation
21
+ - Smart offset calculation based on handle type and position
22
+ - Uses Bezier curves for smooth, natural-looking connections
23
+ - Fully compatible with React Flow's edge system
24
+ - Type-safe implementation with TypeScript
25
+
26
+ ## Edge Types
27
+
28
+ ### `Edge.Temporary`
29
+
30
+ A dashed edge style for temporary or preview connections. Uses a simple Bezier path with a dashed stroke pattern.
31
+
32
+ ### `Edge.Animated`
33
+
34
+ A solid edge with an animated circle that moves along the path. The animation repeats indefinitely with a 2-second duration, providing visual feedback for active connections.
35
+
36
+ ## Props
37
+
38
+ Both edge types accept standard React Flow `EdgeProps`:
39
+
40
+ | Prop | Type | Default | Description |
41
+ |------|------|---------|-------------|
42
+ | `id` | `string` | - | Unique identifier for the edge. |
43
+ | `source` | `string` | - | ID of the source node. |
44
+ | `target` | `string` | - | ID of the target node. |
45
+ | `sourceX` | `number` | - | X coordinate of the source handle (Temporary only). |
46
+ | `sourceY` | `number` | - | Y coordinate of the source handle (Temporary only). |
47
+ | `targetX` | `number` | - | X coordinate of the target handle (Temporary only). |
48
+ | `targetY` | `number` | - | Y coordinate of the target handle (Temporary only). |
49
+ | `sourcePosition` | `Position` | - | Position of the source handle (Left, Right, Top, Bottom). |
50
+ | `targetPosition` | `Position` | - | Position of the target handle (Left, Right, Top, Bottom). |
51
+ | `markerEnd` | `string` | - | SVG marker ID for the edge end (Animated only). |
52
+ | `style` | `React.CSSProperties` | - | Custom styles for the edge (Animated only). |
@@ -0,0 +1,102 @@
1
+ # Environment Variables
2
+
3
+ Display environment variables with masking and copy functionality.
4
+
5
+ The `EnvironmentVariables` component displays environment variables with value masking, visibility toggle, and copy functionality.
6
+
7
+ See `scripts/environment-variables.tsx` for this example.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npx ai-elements@latest add environment-variables
13
+ ```
14
+
15
+ ## Features
16
+
17
+ - Value masking by default
18
+ - Toggle visibility switch
19
+ - Copy individual values
20
+ - Export format support (`export KEY="value"`)
21
+ - Required badge indicator
22
+
23
+ ## Props
24
+
25
+ ### `<EnvironmentVariables />`
26
+
27
+ | Prop | Type | Default | Description |
28
+ |------|------|---------|-------------|
29
+ | `showValues` | `boolean` | - | Controlled visibility state. |
30
+ | `defaultShowValues` | `boolean` | `false` | Default visibility state. |
31
+ | `onShowValuesChange` | `(show: boolean) => void` | - | Callback when visibility changes. |
32
+ | `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Spread to the container div. |
33
+
34
+ ### `<EnvironmentVariablesHeader />`
35
+
36
+ | Prop | Type | Default | Description |
37
+ |------|------|---------|-------------|
38
+ | `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Spread to the header div. |
39
+
40
+ ### `<EnvironmentVariablesTitle />`
41
+
42
+ | Prop | Type | Default | Description |
43
+ |------|------|---------|-------------|
44
+ | `children` | `React.ReactNode` | - | Custom title text. |
45
+ | `...props` | `React.HTMLAttributes<HTMLHeadingElement>` | - | Spread to the h3 element. |
46
+
47
+ ### `<EnvironmentVariablesToggle />`
48
+
49
+ | Prop | Type | Default | Description |
50
+ |------|------|---------|-------------|
51
+ | `...props` | `React.ComponentProps<typeof Switch>` | - | Spread to the Switch component. |
52
+
53
+ ### `<EnvironmentVariablesContent />`
54
+
55
+ | Prop | Type | Default | Description |
56
+ |------|------|---------|-------------|
57
+ | `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Spread to the content div. |
58
+
59
+ ### `<EnvironmentVariable />`
60
+
61
+ | Prop | Type | Default | Description |
62
+ |------|------|---------|-------------|
63
+ | `name` | `string` | Required | Variable name. |
64
+ | `value` | `string` | Required | Variable value. |
65
+ | `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Spread to the row div. |
66
+
67
+ ### `<EnvironmentVariableGroup />`
68
+
69
+ | Prop | Type | Default | Description |
70
+ |------|------|---------|-------------|
71
+ | `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Spread to the group div. |
72
+
73
+ ### `<EnvironmentVariableName />`
74
+
75
+ | Prop | Type | Default | Description |
76
+ |------|------|---------|-------------|
77
+ | `children` | `React.ReactNode` | - | Custom name content. Defaults to the name from context. |
78
+ | `...props` | `React.HTMLAttributes<HTMLSpanElement>` | - | Spread to the span element. |
79
+
80
+ ### `<EnvironmentVariableValue />`
81
+
82
+ | Prop | Type | Default | Description |
83
+ |------|------|---------|-------------|
84
+ | `children` | `React.ReactNode` | - | Custom value content. Defaults to the masked/unmasked value from context. |
85
+ | `...props` | `React.HTMLAttributes<HTMLSpanElement>` | - | Spread to the span element. |
86
+
87
+ ### `<EnvironmentVariableCopyButton />`
88
+
89
+ | Prop | Type | Default | Description |
90
+ |------|------|---------|-------------|
91
+ | `copyFormat` | `unknown` | - | Format to copy. |
92
+ | `onCopy` | `() => void` | - | Callback after successful copy. |
93
+ | `onError` | `(error: Error) => void` | - | Callback if copying fails. |
94
+ | `timeout` | `number` | `2000` | Duration to show copied state (ms). |
95
+ | `...props` | `React.ComponentProps<typeof Button>` | - | Spread to the Button component. |
96
+
97
+ ### `<EnvironmentVariableRequired />`
98
+
99
+ | Prop | Type | Default | Description |
100
+ |------|------|---------|-------------|
101
+ | `children` | `React.ReactNode` | - | Custom badge text. |
102
+ | `...props` | `React.ComponentProps<typeof Badge>` | - | Spread to the Badge component. |
@@ -0,0 +1,72 @@
1
+ # File Tree
2
+
3
+ Display hierarchical file and folder structure with expand/collapse functionality.
4
+
5
+ The `FileTree` component displays a hierarchical file system structure with expandable folders and file selection.
6
+
7
+ See `scripts/file-tree.tsx` for this example.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npx ai-elements@latest add file-tree
13
+ ```
14
+
15
+ ## Features
16
+
17
+ - Hierarchical folder structure
18
+ - Expand/collapse folders
19
+ - File selection with callback
20
+ - Keyboard accessible
21
+ - Customizable icons
22
+ - Controlled and uncontrolled modes
23
+
24
+ ## Examples
25
+
26
+ ### Basic Usage
27
+
28
+ See `scripts/file-tree-basic.tsx` for this example.
29
+
30
+ ### With Selection
31
+
32
+ See `scripts/file-tree-selection.tsx` for this example.
33
+
34
+ ### Default Expanded
35
+
36
+ See `scripts/file-tree-expanded.tsx` for this example.
37
+
38
+ ## Props
39
+
40
+ ### `<FileTree />`
41
+
42
+ | Prop | Type | Default | Description |
43
+ |------|------|---------|-------------|
44
+ | `expanded` | `Set<string>` | - | Controlled expanded paths. |
45
+ | `defaultExpanded` | `Set<string>` | `new Set()` | Default expanded paths. |
46
+ | `selectedPath` | `string` | - | Currently selected file/folder path. |
47
+ | `onSelect` | `(path: string) => void` | - | Callback when a file/folder is selected. |
48
+ | `onExpandedChange` | `(expanded: Set<string>) => void` | - | Callback when expanded paths change. |
49
+ | `className` | `string` | - | Additional CSS classes. |
50
+
51
+ ### `<FileTreeFolder />`
52
+
53
+ | Prop | Type | Default | Description |
54
+ |------|------|---------|-------------|
55
+ | `path` | `string` | - | Unique folder path. |
56
+ | `name` | `string` | - | Display name. |
57
+ | `className` | `string` | - | Additional CSS classes. |
58
+
59
+ ### `<FileTreeFile />`
60
+
61
+ | Prop | Type | Default | Description |
62
+ |------|------|---------|-------------|
63
+ | `path` | `string` | - | Unique file path. |
64
+ | `name` | `string` | - | Display name. |
65
+ | `icon` | `ReactNode` | - | Custom file icon. |
66
+ | `className` | `string` | - | Additional CSS classes. |
67
+
68
+ ### Subcomponents
69
+
70
+ - `FileTreeIcon` - Icon wrapper
71
+ - `FileTreeName` - Name text
72
+ - `FileTreeActions` - Action buttons container (stops click propagation)