CopilotKit React 核心
io.github.CopilotKit/CopilotKit/react-core
@copilotkit/react-core——在 Next.js App Router / React Router v7 / TanStack Start / SPA 应用中挂载 CopilotKit provider(来自 @copilotkit/react-core/v2),接入 CopilotChat/CopilotPopup/CopilotSidebar(v2 聊天组件由 react-core/v2 提供,而非仅有 CSS 的 react-ui),通过 useAgent/useAgentContext/useCapabilities 访问和订阅 agent,在多个 agent 间切换,用 useThreads 管理持久的 Intelligence 会话线程,通过 useFrontendTool 注册浏览器端工具,用 useRenderTool/useComponent/useDefaultRenderTool 渲染工具调用,用 useHumanInTheLoop 做执行门控,用 useAttachments 接入文件附件,配置建议词,以及注册活动与自定义消息渲染器。publicLicenseKey 为正式字段(publicApiKey 是已废弃别名)。按任务加载 references/ 下对应的参考文件。