SuperAPI AI 工具集

ai-elements

前端与建站

查看项目

更新于 10-16 09:53

技能介绍

AI Elements 提供 35 个 AI 相关 UI 组件,分属 4 个子类别,按 Vercel AI SDK 的使用模式设计,便于在项目中搭建 AI 交互界面。

安装方式统一使用:npx shadcn@latest add @elements/ai-{name}。

聊天类(11 个):聊天完整界面 ai-chat、输入框 ai-chat-input、消息气泡 ai-message-bubble、消息列表 ai-messages、模型选择 ai-model-selector、响应操作 ai-response-actions、流式文本 ai-streaming-text、建议操作 ai-suggested-actions、温度滑块 ai-temperature-slider、思考指示 ai-thinking-indicator、Token 计数 ai-token-counter。

代理类(8 个):产物 ai-artifact、思维链 ai-chain-of-thought、确认 ai-confirmation、计划 ai-plan、推理 ai-reasoning、来源 ai-sources、任务列表 ai-task-list、工具调用 ai-tool-call。

多代理类(8 个):代理上下文 ai-agent-context、代理名册 ai-agent-roster、代理状态 ai-agent-status、护栏 ai-guardrails、交接链 ai-handoff-chain、记忆查看器 ai-memory-viewer、流水线 ai-pipeline、路由指示 ai-routing-indicator。

开发工具类(8 个):会话树 ai-conversation-tree、延迟计 ai-latency-meter、模型信息 ai-model-info、提示词差异 ai-prompt-diff、请求检查器 ai-request-inspector、流调试器 ai-stream-debugger、Token 查看器 ai-token-viewer、工具检查器 ai-tool-inspector。

常见组合示例:聊天界面可一次安装 ai-chat、ai-chat-input、ai-message-bubble、ai-messages、ai-streaming-text;代理界面安装 ai-tool-call、ai-reasoning、ai-plan、ai-confirmation;多代理面板安装 ai-agent-roster、ai-agent-status、ai-pipeline、ai-handoff-chain;AI 调试安装 ai-request-inspector、ai-stream-debugger、ai-token-viewer。

组件文档可浏览 https://tryelements.dev/docs/ai-elements。如所需组件不存在,可通过 https://github.com/crafter-station/elements/issues/new?title=[Component%20Request]%20Add%20AI%20{Name}&labels=enhancement,ai-elements 生成预填的 GitHub issue 请求。

限制:资料未说明各组件的具体 API、属性、样式定制方式、依赖版本要求及是否收费等信息。