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-chat-summary

v1.0.0

Published

This is a plugin for summarizing your chat.

Readme

koishi-plugin-chat-summary

npm

这是一个用于总结你的聊天记录的koishi插件

注意:插件目前处于早期版本,在数据处理上稍有缺陷,只使用了一个adapter的koishi用户可以放心使用

命令

chat-summary

chat-summary命令具有两个可选参数,无参默认值为总结12小时内所有群成员发言。

  • -t用于指定用于总结聊天记录的时间范畴,单位为小时。
  • -u用于指定某个用户的消息,at 元素或者 @{platform}:{id} 的格式。

Example:总结12小时内用户名为 我是早濑优香 的用户发言

chat-summary -t 12 -u @我是早濑优香

消息存储

目前使用数据库进行聊天记录的存储,后续会进行重构。

export interface ChatMessages {
  id: number
  groupId: string
  userId: string
  userName: string
  chatContent: string
  sendTime: Date
  messageType: string
  replyToMessageId?: number
  isRecalled: boolean
  attachments?: any // JSON type since attachments can be various types of media
}

总结生成

目前的System Prompt:

  private systemPrompt: string =
    "接下来我会为你提供一段记录的聊天内容,其格式为:\n"
    + "ID为 {userId} 的 {userName} 说了 {chatContent}\n"
    + "如果是图片或视频,格式为:\n"
    + "ID为 {userId} 的 {userName} 发送了一张图片\n"
    + "ID为 {userId} 的 {userName} 发送了一个视频\n"
    + "你需要着重关注这些内容中具有上下文交流、联系的部分,适当舍弃那些你无法理解或缺乏意义的内容\n"
    + "我无法告诉你聊天中图片或视频的内容,如你发现聊天记录中人们针对图片或视频发起了讨论,你可以适当猜测\n"
    + "我需要你根据上面的要求阅读并且以下内容,然后完成我的任务。\n";
  private summarizePrompt: string = 
    "\n请用中文为我总结以上聊天内容,\n"
    + "我的本意是将聊天记录总结出一个报告,不希望没有参与讨论的人们错过某些重要信息\n"
    + "如果你认为这段聊天内容没有意义,请回复“你们往群里灌水就别叫我出来总结了”\n";