npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

paul-ai-assistant

v1.0.5

Published

Paul AI 智能辅助组件

Readme

paul-ai-assistant

Paul AI 智能辅助组件

简介

paul-ai-assistant 是一个基于 React 16.14.0 的智能辅助组件库,提供完整的 AI 对话和交互能力。

特性

  • 智能对话交互
  • 支持多种消息类型
  • 可定制的 UI 组件
  • 完整的 TypeScript 支持
  • 基于 React 16.14.0

安装

tnpm install paul-ai-assistant --save

或者使用 yarn:

yarn add paul-ai-assistant

使用

基础用法

import { PaulAiAssistant } from 'paul-ai-assistant';
import 'paul-ai-assistant/es/index.css';

function App() {
  return (
    <PaulAiAssistant
    // 你的配置项
    />
  );
}

开发

环境要求

  • Node.js 16.x
  • Yarn 或 npm

安装依赖

yarn install

开发命令

# 启动开发服务器
yarn start

# 构建生产版本
yarn build

# 代码质量检查
yarn lint

# 自动修复代码格式
yarn prettier

# 运行测试
yarn test

# 运行测试覆盖率
yarn test:coverage

# TypeScript 类型检查
yarn tsc

# 清理构建产物
yarn clean:dist

项目结构

src/
├── AssistantChat/      # 聊天助手核心组件
├── components/         # UI 组件库
├── constants/          # 常量定义
├── context/           # React Context
├── ErrorBoundary/     # 错误边界
├── interface/         # TypeScript 接口定义
├── utils/             # 工具函数
└── index.tsx          # 入口文件

构建

项目使用 Father 4 作为构建工具。

yarn build

构建产物:

  • es/ - ES Module 格式(推荐)
  • dist/ - UMD 格式(如果配置)

文档

项目使用 Dumi 构建文档站点。

# 启动文档开发服务器
yarn start

# 构建文档站点
yarn build:docs

浏览器支持

  • Chrome (最新两个版本)
  • Firefox (最新两个版本)
  • Safari (最新两个版本)
  • Edge (最新两个版本)
  • IE 11+

技术栈

  • UI 框架: React 16.14.0
  • 类型系统: TypeScript 5.x
  • 构建工具: Father 4.x
  • 样式方案: SCSS/LESS + styled-components
  • 状态管理: React Hooks
  • 测试框架: Jest + Enzyme + Testing Library
  • 代码规范: ESLint + Prettier + Stylelint

依赖说明

核心依赖

  • @alife/magic-chat-ui - 聊天 UI 组件
  • @alife/magic-chat-im - 聊天通信层
  • @alife/magic-basic - 基础组件库
  • @formily/antd - 表单方案
  • ahooks - React Hooks 库
  • lodash - 工具库
  • moment - 日期处理

Peer 依赖

  • react >= 16.9.0
  • react-dom >= 16.9.0
  • @alife/magic-request ^2.5.0

常见问题

1. 构建失败

请检查 Node.js 版本是否为 16.x:

node -v

2. 样式不生效

请确保在项目中引入了样式文件:

import 'paul-ai-assistant/es/index.css';

贡献指南

欢迎贡献代码!请遵循以下步骤:

  1. Fork 本仓库
  2. 创建你的特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交你的改动 (git commit -m 'feat: Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 开启一个 Pull Request

提交规范

遵循 Conventional Commits 规范:

  • feat: 新特性
  • fix: 修复 Bug
  • docs: 文档更新
  • style: 代码格式调整(不影响功能)
  • refactor: 代码重构
  • test: 测试相关
  • chore: 构建/工具相关