AI 对话界面
Agent 连接资料源
Agent 请求先收集资料:请求逐字输入,指针在菜单中开启资料源,资料以标签附在消息上,状态从读取中变为有来源依据的总结。
安装
npx @imgcli/cli add agent-connect使用
import { AgentConnect } from "@/components/imgcli/agent-connect";
<AgentConnect
heading="What should we find?"
request="Summarize customer feedback for Q3"
sources={[
{
"label": "Support tickets",
"on": true
},
{
"label": "User interviews",
"on": true
},
{
"label": "Survey results",
"on": true
},
{
"label": "Sales notes",
"on": false
}
]}
status={[
"Reading 3 sources…",
"Summary ready: 5 themes"
]}
/>;默认示例:从支持工单、用户访谈和问卷中汇总第三季度客户反馈。以 30 fps 渲染 156 帧(5.2 秒)。
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
heading | string | "What should we find?" | |
request | string | "Summarize customer feedback for Q3" | |
sources | readonly AgentConnectSource[] | 见使用示例 | |
status | readonly [string, string] | 见使用示例 | Status lines shown after sending; the last one lands with a check. |
fontFamily | string | — | A face from the Imgcli font list, or any loaded CSS font stack. |
accentColor | string | — | |
theme | Partial<ImgcliTheme> | — | |
mode | "light" | "dark" | — | |
speed | number | 1 |
许可
MIT 许可,可免费用于个人及商业项目,保留版权和许可声明。
Copyright (c) 2026 Ricky (Imgcli) <https://imgcli.com>
常见问题
如何在 Remotion 项目中使用Agent 连接资料源?
运行 npx @imgcli/cli add agent-connect。CLI 会把组件源码复制到项目的 components/imgcli/ 目录并安装依赖,之后可以直接修改源码。
Agent 连接资料源能做什么?
Agent 请求先收集资料:请求逐字输入,指针在菜单中开启资料源,资料以标签附在消息上,状态从读取中变为有来源依据的总结。
使用Agent 连接资料源前需要准备什么?
准备 Node.js 20.19 或更高版本,以及一个 Remotion 项目。新项目可以用 npx create-video@latest 创建。免费组件采用 MIT 许可证。