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

flare-chat-ui

v1.0.6

Published

Chat GUI 能力包。

Downloads

1,382

Readme

flare-chat-ui

Chat GUI 能力包。

依赖:

  1. flare-chat-core
  2. flare-generative-ui
  3. flare-canvas-ui

职责:

  1. 会话列表。
  2. 消息时间线。
  3. 输入区与发送交互。
  4. 纯 UI 组件渲染(不含业务编排)。

不包含:

  1. kernel 调用实现。
  2. 业务领域写死逻辑。

架构边界文档

  • docs/CHAT-UI-BOUNDARY.md
  • docs/SSOT-CHAT-UI-BOUNDARY.md(SSOT)
  • docs/SSOT-CHAT-UI-INTERACTION-FLOW.md(交互数据流 SSOT)
  • docs/SSOT-CHAT-UI-CODING-PREFERENCES.md(编码规范与偏好 SSOT)
  • docs/SSOT-CHAT-UI-CAPABILITY-MAP.md(UI 能力清单与边界地图 SSOT)
  • docs/SSOT-CHAT-UI-COMPONENT-INVENTORY.md(UI 组件清单 SSOT)
  • docs/CHAT-UI-LEGACY-MIGRATION.md(legacy -> 新目录迁移手册)

当前目录迁移状态(2026-04-18)

src/chat-gui/ 已进入新旧双轨:

  1. ui/:纯展示组件
  2. legacy/:历史实现冻结区(渐进拆分来源)

兼容说明:

  1. 历史 components/workspace/ 路径当前仍可用(兼容链接)
  2. 新增逻辑仅允许进入 ui/
  3. ChatWorkspace 启动入口已不再作为 chat-ui 对外能力;启动由 chat-core/宿主承担

development mode(本地调试)

用于纯组件调试,不依赖真实业务后端:

  1. cd packages/flare-chat-ui
  2. npm install
  3. npm run dev

默认地址:http://127.0.0.1:9090

约定:

  1. playground 默认使用本地 mock runtime(会话/消息/流式事件均为模拟)。
  2. 不接入真实采购业务逻辑。
  3. 端口与标题通过环境变量配置,不在代码里写死业务地址。

接入真实 kernel(非 mock):

  1. VITE_FLARE_CHAT_DEV_DEFAULT_BACKEND=real
  2. VITE_FLARE_CHAT_KERNEL_BASE_URL=http://127.0.0.1:8002

本地 API 联调建议:

  1. 优先使用仓库根目录的 .env.local.env.development.local
  2. 本地联调地址放环境变量,不要新建临时源码文件
  3. 例如:VITE_FLARE_CHAT_API_BASE_URL=http://127.0.0.1:18001

可选环境变量:

  1. FLARE_CHAT_UI_DEV_HOST(端口固定为 9090)
  2. VITE_FLARE_CHAT_FUNCTION_TYPE
  3. VITE_FLARE_CHAT_DEFAULT_SESSION_TITLE
  4. VITE_FLARE_CHAT_PROJECT_NAME
  5. VITE_FLARE_CHAT_PROJECT_TITLE
  6. VITE_FLARE_CHAT_SOURCE_API_ENABLEDtrue 时启用真实文件 API)
  7. VITE_FLARE_CHAT_SOURCE_API_BASE_URL(如 http://127.0.0.1:8001
  8. VITE_FLARE_CHAT_SOURCE_API_TOKEN(Bearer token)
  9. VITE_FLARE_CHAT_KERNEL_BASE_URL(默认 http://127.0.0.1:8002

迁移说明(legacy)

历史 ChatWorkspace 宿主实现已移动到 src/chat-gui/legacy/,仅用于过渡。 该路径不再代表 chat-ui 的主入口能力。

模式展示规则(第一版):

  1. 用户可见模式仅 需求梳理智能寻源
  2. auto / 未启用时不显示模式标记。
  3. 启用后仅在输入区工具行右侧显示可关闭标记(× 需求梳理 / × 智能寻源)。
  4. 需求梳理的多轮推进由后端 canonical state 与 patch 事件驱动,UI 不保留旧模式别名。

tips 机制文档

需求梳理 tips 的触发边界与事件流见:

  • docs/requirement-tips-flow.md

workspace 架构与重构手册(强约束)

为避免重构偏航,workspace 前端统一遵循以下文档:

  1. 架构手册(分层、数据流、authoritative 边界)
    • docs/frontend-architecture-manual.md
  2. functional 注释规范(代码绑定文档标准)
    • docs/frontend-functional-doc-standard.md
  3. 重构执行手册(批次、验收、TDD 矩阵)
    • docs/frontend-refactor-playbook.md
  4. workspace 数据流手册(root->hook->domain->render)
    • docs/workspace-data-flow-manual.md
  5. 端到端联调清单(页面路径验收)
    • ../docs/architecture/requirement-e2e-manual-checklist.md