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

@eosway/one-chat

v0.1.0

Published

Vue 3 chat composable and stream adapters for AI platforms.

Readme

@eosway/one-chat

Vue 3 chat composable and stream adapters for AI platforms.

@eosway/one-chat 提供三类核心能力:

  • fetchSse() 通用 SSE 拉流
  • createOpenAICompatibleChatStream() / createAnthropicChatStream() / createDifyChatStream() 平台语义适配
  • useChatStream() 单会话流式聊天 composable
  • useChatConversation() 会话状态管理
  • useChatAssistant() 助手状态管理

安装

pnpm add vue @eosway/one-chat

说明

当前版本优先聚焦:

  • 基于 fetch 的 SSE 读取
  • OpenAI-compatible、Anthropic、Dify 三类流式文本对话
  • 单会话 useChatStream() 状态管理

分层模型

one-chat 按从内到外的方式组织能力,每一层都可以独立使用:

  • useChatStream():最小聊天闭环,只管理当前消息、流式状态、错误和重试。
  • useChatConversation():在聊天之上增加“当前会话”和“会话历史恢复”。
  • useChatAssistant():在会话之上增加“当前助手”和“助手切换”。

推荐的完整模型是:

assistant -> conversations[] -> messages[]

也支持更轻的接法:

  • 不需要助手列表时,直接使用 useChatConversation() + useChatStream()
  • 不需要会话列表时,直接使用 useChatStream()

设计约束

  • useChatStream() 不依赖助手或会话列表,只接收可选的 assistantId 与 conversationId
  • useChatConversation() 只管理会话列表、当前会话和历史消息
  • useChatAssistant() 只管理助手列表和当前助手
  • “助手拥有一组会话” 这类业务编排由上层页面或应用状态负责,不内建在核心 composable 中