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

@fv-ui/ai-chat-core

v2.0.0

Published

@fv-ui/ai-chat 的跨端纯逻辑层:消息树/适配器协议/SSE 解析/存储协议/编排 composables/语言包(零 Element Plus、零 DOM、零 fetch)

Readme

@fv-ui/ai-chat-core

@fv-ui/ai-chat 的跨端纯逻辑层:树形消息模型、ChatAdapter 协议(OpenAI/Fv 系 SSE)、SSE 解析、存储协议、useChat/useMessages/useSend/useXStream/useRecord 编排、语言包。

  • 零 Element Plus、零 DOM API、零 fetch——平台能力经 PlatformBridge 注入(httpClient/decodeText/recorder/createAudioUrl/revokeAudioUrl)。
  • Web 默认实现:import { createWebBridge } from '@fv-ui/ai-chat-core/platform/web' 后 setPlatformBridge(createWebBridge())(@fv-ui/ai-chat 包入口已默认注入)。
  • uni-app 端请自实现 PlatformHttpClient(uni.request enableChunked)注入。

已知技术债

  • resolveTextDecoder 兜底路径每次 new TextDecoder(),与 webTextDecoder() 单例语义存在差异:每 chunk 独立 decode,多字节字符理论上可能在 chunk 边界分裂。仅 uni-app 注入非流式解码时走兜底路径,不影响 web 端正确性,暂不改动。

已知边界

  • storage.ts 的 localStorage 探测带 typeof window !== 'undefined' 守卫,SSR/非 DOM 环境自动降级为内存实现。
  • useRecord 的 URL.createObjectURL/revokeObjectURL 已下沉为桥能力 createAudioUrl/revokeAudioUrl(core 零 DOM:小程序无 Blob/objectURL);web 桥经 URL.createObjectURL 实现,uni 桥返回 null(走文件路径)。
  • platform.ts 的 decodeText 兜底使用全局 TextDecoder,uni-app 端应显式注入 decodeText(经 PlatformBridge 或 resolveTextDecoder 参数)。