Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@bdky/aaas-pilot-kit-react-widget

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bdky/aaas-pilot-kit-react-widget

百度数字员工 AaaS Pilot Kit 的 React UI 组件库,开箱即用的数字员工 UI 组件,5 分钟搭建完整交互界面

latest
npmnpm
Version
1.0.13
Version published
Maintainers
3
Created
Source

@bdky/aaas-pilot-kit-react-widget

百度数字员工 AaaS Pilot Kit 的 React UI 组件库,开箱即用的数字员工 UI 组件,5 分钟搭建完整交互界面

Documentation

安装

npm

npm install @bdky/aaas-pilot-kit-react-widget

yarn

yarn add @bdky/aaas-pilot-kit-react-widget

快速开始

import {
    PilotKit,
    Layout,
    ConversationList,
    Input,
    ControlPanel
} from '@bdky/aaas-pilot-kit-react-widget';
import '@bdky/aaas-pilot-kit-react-widget/styles.css';
import {type IOptions} from '@bdky/aaas-pilot-kit';

const options: IOptions = {
    figureId: '209337',
    ttsPer: 'LITE_audiobook_female_1',
    agentConfig: {
        token: 'xxxx',
        robotId: 'xxxx'
    }
};

function App() {
    return (
        <PilotKit options={options}>
            <Layout>
                <ConversationList />
                <Input />
                <ControlPanel />
            </Layout>
        </PilotKit>
    );
}

组件列表

组件说明
PilotKit主容器组件,包含 Provider 和数字人渲染区域
Layout布局组件,支持横向/纵向自适应
ConversationList对话列表组件,自动滚动到底部
Conversation单条对话组件,支持流式渲染
Input输入框组件,支持文本输入和语音输入切换
ControlPanel控制面板,包含静音、挂断等按钮
Subtitle字幕组件,实时显示 AI 回复
RecommendedQuestions推荐问题组件
StartupScreen启动屏幕,用于手动激活
LoadingOverlay加载遮罩层
StatusOverlay状态遮罩层
DebugPanel调试面板(开发环境)

Hooks

Hook说明
usePilotKitContext获取 PilotKit 上下文
useLayout获取布局上下文
useIsMobile检测是否为移动端
useIsTablet检测是否为平板
useIsDesktop检测是否为桌面端
useResponsive响应式断点 Hook

样式导入

// 方式 1: 直接导入 CSS
import '@bdky/aaas-pilot-kit-react-widget/styles.css';

// 方式 2: 导入 CSS 变量(用于自定义主题)
import {styles} from '@bdky/aaas-pilot-kit-react-widget';

参考资料

  • 核心库文档:@bdky/aaas-pilot-kit
  • React 封装库:@bdky/aaas-pilot-kit-react

技术支持

如遇问题请联系:zhangwenxi@baidu.comlifuxin@baidu.com

Keywords

react

FAQs

Package last updated on 14 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts