Loading...
Loading...
Compare original and translation side by side
copilotkit-docssearch-docssearch-code.mcp.jsoncopilotkit-docssearch-docssearch-code.mcp.json@ag-ui/client@ag-ui/core@copilotkit/*@copilotkit/*@ag-ui/client@ag-ui/core@copilotkit/*@copilotkit/*@copilotkit/react-core -> hooks, CopilotKit provider, types
@copilotkit/react-ui -> CopilotChat, CopilotPopup, CopilotSidebar
@copilotkit/react-textarea -> CopilotTextarea (removed in v2)
@copilotkit/runtime -> CopilotRuntime, service adapters, framework integrations
@copilotkit/runtime-client-gql -> GraphQL client, message types
@copilotkit/shared -> utility types, constants
@copilotkit/sdk-js -> LangGraph/LangChain SDK@copilotkit/react-core -> hooks, CopilotKit provider, types
@copilotkit/react-ui -> CopilotChat, CopilotPopup, CopilotSidebar
@copilotkit/react-textarea -> CopilotTextarea (removed in v2)
@copilotkit/runtime -> CopilotRuntime, service adapters, framework integrations
@copilotkit/runtime-client-gql -> GraphQL client, message types
@copilotkit/shared -> utility types, constants
@copilotkit/sdk-js -> LangGraph/LangChain SDK| v1 API | v2 Replacement |
|---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| Removed -- use standard textarea + |
| v1 API | v2 替代方案 |
|---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| 已移除 -- 使用标准textarea + |
references/v1-to-v2-migration.mdreferences/v1-to-v2-migration.md@copilotkit/*@copilotkit/react-core -> @copilotkit/react (consolidated into one package)
@copilotkit/react-ui -> @copilotkit/react (consolidated into one package)
@copilotkit/react-textarea -> removed (no v2 equivalent)
@copilotkit/runtime -> @copilotkit/runtime (same package, new agent-based API)
@copilotkit/runtime-client-gql -> removed (replaced by AG-UI protocol, re-exported from @copilotkit/react)
@copilotkit/shared -> @copilotkit/shared (same package)
@copilotkit/sdk-js -> @copilotkit/agent (new package for agent definitions)@copilotkit/*@copilotkit/react-core -> @copilotkit/react (consolidated into one package)
@copilotkit/react-ui -> @copilotkit/react (consolidated into one package)
@copilotkit/react-textarea -> removed (no v2 equivalent)
@copilotkit/runtime -> @copilotkit/runtime (same package, new agent-based API)
@copilotkit/runtime-client-gql -> removed (replaced by AG-UI protocol, re-exported from @copilotkit/react)
@copilotkit/shared -> @copilotkit/shared (same package)
@copilotkit/sdk-js -> @copilotkit/agent (new package for agent definitions)CopilotRuntimeCopilotRuntimeAbstractAgentimport { CopilotRuntime, OpenAIAdapter } from "@copilotkit/runtime";
const runtime = new CopilotRuntime({ actions: [...] });
// used with copilotKitEndpoint() for Next.js, Express, etc.import { CopilotRuntime, createCopilotEndpoint } from "@copilotkit/runtime";
import { BuiltInAgent } from "@copilotkit/agent";
const runtime = new CopilotRuntime({
agents: { myAgent: new BuiltInAgent({ model: "openai:gpt-4o" }) },
});
const app = createCopilotEndpoint({ runtime, basePath: "/api/copilotkit" });CopilotRuntimeCopilotRuntimeAbstractAgentimport { CopilotRuntime, OpenAIAdapter } from "@copilotkit/runtime";
const runtime = new CopilotRuntime({ actions: [...] });
// used with copilotKitEndpoint() for Next.js, Express, etc.import { CopilotRuntime, createCopilotEndpoint } from "@copilotkit/runtime";
import { BuiltInAgent } from "@copilotkit/agent";
const runtime = new CopilotRuntime({
agents: { myAgent: new BuiltInAgent({ model: "openai:gpt-4o" }) },
});
const app = createCopilotEndpoint({ runtime, basePath: "/api/copilotkit" });import { CopilotKit } from "@copilotkit/react-core";
<CopilotKit runtimeUrl="/api/copilotkit">
{children}
</CopilotKit>import { CopilotKitProvider } from "@copilotkit/react";
<CopilotKitProvider runtimeUrl="/api/copilotkit">
{children}
</CopilotKitProvider>import { CopilotKit } from "@copilotkit/react-core";
<CopilotKit runtimeUrl="/api/copilotkit">
{children}
</CopilotKit>import { CopilotKitProvider } from "@copilotkit/react";
<CopilotKitProvider runtimeUrl="/api/copilotkit">
{children}
</CopilotKitProvider>| Concept | v1 | v2 |
|---|---|---|
| Package scope | | |
| Protocol | GraphQL | AG-UI (SSE) |
| Provider component | | |
| Define frontend tool | | |
| Share app state | | |
| Agent interaction | | |
| Handle interrupts | | |
| Render tool calls | | |
| Chat suggestions | | |
| Runtime class | | |
| Endpoint setup | | |
| Agent definition | | |
| Chat components | | |
| 概念 | v1 | v2 |
|---|---|---|
| 包作用域 | | |
| 协议 | GraphQL | AG-UI (SSE) |
| Provider组件 | | |
| 定义前端工具 | | |
| 共享应用状态 | | |
| Agent交互 | | |
| 处理中断 | | |
| 渲染工具调用 | | |
| 聊天建议 | | |
| 运行时类 | | |
| 端点配置 | | |
| Agent定义 | | |
| 聊天组件 | | |