From 6c4c6a3b8bec93f7dae4ab9921861671ad7a668f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Thu, 25 Sep 2025 00:36:01 +0800 Subject: [PATCH] chore: make lint happy --- plugin/aichat/cfg.go | 3 +++ plugin/aichat/storage.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/aichat/cfg.go b/plugin/aichat/cfg.go index ad0136de..14b2bc0f 100644 --- a/plugin/aichat/cfg.go +++ b/plugin/aichat/cfg.go @@ -28,6 +28,7 @@ var ( apilist = [3]string{"OpenAI", "OLLaMA", "GenAI"} ) +// ModelType 支持打印 string 并生产 protocal type ModelType int func newModelType(typ string) (ModelType, error) { @@ -65,6 +66,7 @@ func (mt ModelType) protocol(modn string, temp float32, topp float32, maxn uint) return } +// ModelBool 支持打印成 "是/否" type ModelBool bool func (mb ModelBool) String() string { @@ -74,6 +76,7 @@ func (mb ModelBool) String() string { return "否" } +// ModelKey 支持隐藏密钥 type ModelKey string func (mk ModelKey) String() string { diff --git a/plugin/aichat/storage.go b/plugin/aichat/storage.go index 43b2ac5f..7195a941 100644 --- a/plugin/aichat/storage.go +++ b/plugin/aichat/storage.go @@ -100,7 +100,7 @@ func newstoragebitmap(bmp int64, minv, maxv int64) func(ctx *zero.Ctx) { ctx.SendChain(message.Text("ERROR: ", err)) return } - stor.setbybmp(int64(r), bmp) + stor.setbybmp(r, bmp) err = stor.saveto(ctx, gid) if err != nil { ctx.SendChain(message.Text("ERROR: set data err: ", err))