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

@qzsy/assistant-ui

v0.3.6

Published

Shuangyuan assistant-ui — assistant-ui base-nova 模板,预接入 @qzsy/sdk

Readme

@qzsy/assistant-ui

assistant-ui 最新 base-nova 模板 + Shuangyuan AI SDK 适配层 — 安装包、配置 API Key,直接得到与 assistant-ui 官网 一致的深色聊天界面。

内置官方 registry 组件(thread / thread-list / threadlist-sidebar),Runtime 通过 ExternalStoreRuntime 对接 @qzsy/sdk(Thread / SSE 续流 / EndUser)。

安装

npm install @qzsy/sdk @qzsy/assistant-ui

一行初始化(推荐)

// App.tsx
import { ShuangyuanAssistant } from "@qzsy/assistant-ui";
import "@qzsy/assistant-ui/styles.css";

export default function App() {
  return (
    <div style={{ height: "100vh" }}>
      <ShuangyuanAssistant />
    </div>
  );
}
# .env(Vite)
VITE_SY_API_KEY=sy_你的项目Key
VITE_SY_BASE_URL=http://localhost:8081
VITE_SY_AGENT=default
VITE_SY_END_USER_ID=demo-user

createShuangyuanAssistant 工厂

适合自定义布局或多页面复用:

"use client";

import { createShuangyuanAssistant } from "@qzsy/assistant-ui";
import "@qzsy/assistant-ui/styles.css";

const sy = createShuangyuanAssistant({
  apiKey: process.env.NEXT_PUBLIC_SY_API_KEY!,
  baseUrl: process.env.NEXT_PUBLIC_SY_BASE_URL,
});

export default function ChatPage() {
  return <sy.App />; // 或 <sy.Provider>{children}</sy.Provider>
}

配置项

| Prop / 环境变量 | 说明 | |----------------|------| | apiKey / VITE_SY_API_KEY | 项目 API Key(sy_...必填 | | baseUrl | SDK 后端地址,默认 http://localhost:8081 | | agent | Agent slug,默认 default | | endUserId | 终端用户隔离 ID |

导出

| 导出 | 用途 | |------|------| | ShuangyuanAssistant | 开箱即用整页(深色 sidebar + Thread) | | createShuangyuanAssistant() | 返回 { App, Provider, config } | | useShuangyuanRuntime() | 自定义布局时挂 Runtime | | createToolFallbackRouter() | 按 tool 名称注册自定义 Tool UI | | @qzsy/assistant-ui/styles.css | Tailwind + base-nova 主题样式 |

能力

  • Thread 列表 / 新建 / 切换 / 搜索
  • SSE 流式回复
  • localStorage 续流(刷新无感恢复)
  • EndUser 隔离
  • 首条消息自动创建 Thread

本地示例

cd examples/basic-chat && npm install && npm run dev
# → http://localhost:5174

维护 UI 组件

包内 UI 来自官方 registry(npx assistant-ui add),位于 packages/assistant-ui/src/components/。升级时在该目录执行:

cd packages/assistant-ui
npx assistant-ui add thread thread-list threadlist-sidebar --overwrite
npm run build