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

koishi-plugin-chatluna-think-viewer

v2.3.0

Published

通过命令/关键词查看 chatluna-character 最近一次回复的 <think> 思考内容,并在消息格式异常时自动拦截/撤回。

Readme

koishi-plugin-chatluna-think-viewer

通过指令或关键词查看 chatluna-character 最近一次回复里的 <think> 思考内容,并提供输出拦截/撤回保护,防止模型把内部思考或异常格式直接发到群里。

功能

  • 读取 chatluna-character 内存中的思考记录,支持指令和无前缀关键词触发。
  • 可选私聊使用开关。
  • 异常输出自动处理:先发送、再检测;命中规则则按设置撤回(或直接阻断)。默认拦截 <think>/<status>/<output>/<analysis>/<system> 等标签、think/json/yaml 代码块。
  • 关键词模式:默认子串匹配(不区分大小写);可切换为正则模式。
  • 严格输出模式:可选,仅允许 <output><message>…</message></output> 结构,不符即撤回/阻断。

安装

npm install koishi-plugin-chatluna-think-viewer

配置示例(koishi.yml)

plugins:
  chatluna-character: {}
  chatluna-think-viewer:
    command: think
    keywords:
      - 查看思考
    allowPrivate: false
    emptyMessage: 暂时没有可用的思考记录。
    guardEnabled: true
    guardMode: recall      # recall=先发后撤回;block=直接阻断
    guardDelay: 1          # 撤回延迟(秒)
    guardKeywordMode: true # true=子串匹配;false=正则匹配
    guardStrictOutputOnly: false
    guardForbiddenPatterns:
      - '<think>'
      - '<status>'
      - '<output>'

使用

  • 群里发送 think 或配置的关键词,查看最新 <think>think 2 查看倒数第 2 条 AI 回复的思考。
  • 如果最终发送的消息含异常标签/格式,守卫会按配置撤回或阻断,并在日志记录原因。

依赖

  • koishi >= 4.18.0
  • koishi-plugin-chatluna-character (所有版本)

许可证

MIT