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

@dawnchat/assistant-chat-ui

v0.1.12

Published

Vue 3 Assistant chat timeline UI: message list, tool parts, markdown, permission cards.

Readme

@dawnchat/assistant-chat-ui

面向 Vue 3 的 Assistant 聊天时间轴 UI 包:消息列表、工具块、Markdown 片段、等待态等。与 @dawnchat/assistant-core 无直接依赖;宿主可把任意来源的「类 Agent Loop transcript」适配成本包的数据结构后渲染。

它负责什么

  • ChatMessageList 及各类 ChatPart* 组件
  • 时间轴相关类型(ChatTimelineItem、ChatToolDisplayMeta 等)
  • agentLoopTranscriptToTimelineItems:将 agent-loop 风格消息数组映射为时间轴条目(见 src/adapters/agentLoopTranscript.ts)
  • 基础样式:@dawnchat/assistant-chat-ui/style.css(主题可通过 CSS 变量与宿主对齐)

它不负责什么

  • Assistant runtime、视图注册、工具执行(仅负责展示与交互)
  • LLM / Agent Loop 运行时(由宿主结合 @dawnchat/host-orchestration-sdk 等实现)

安装与引入

在 DawnChat 插件模板中通常声明为 workspace:*,由脚手架在发布/预览时重写为 file:。

应用侧至少需要:

import "@dawnchat/assistant-chat-ui/style.css";
import { ChatMessageList } from "@dawnchat/assistant-chat-ui";

宿主若使用自有设计 token,建议把 --color-* 等变量桥接到现有主题(参考官方 web-ai-assistant 的 style.css 做法)。

与 transcript 的对接

  1. 持有 AgentLoopMessage[](或与本包 adapter 类型兼容的结构)
  2. 调用 agentLoopTranscriptToTimelineItems(transcript, { isRunning, getToolDescription? }) 或封装好的宿主适配函数(如 web assistant 的 toWebAssistantTimelineItems)
  3. 将结果交给 ChatMessageList

getToolDescription 可选:用于在工具条上显示比裸 tool name 更友好的说明(可与宿主工具注册表对齐)。

公开入口

  • @dawnchat/assistant-chat-ui — 组件、类型、adapter、useStreamingPresentation 等
  • @dawnchat/assistant-chat-ui/style.css — 必引样式

开发与测试

# 在 dawnchat-plugins/assistant-workspace 下
bun run --filter @dawnchat/assistant-chat-ui typecheck
bun run --filter @dawnchat/assistant-chat-ui test
bun run --filter @dawnchat/assistant-chat-ui build

相关包