Compare commits

...

7 Commits

Author SHA1 Message Date
源文雨
ec59133f96 🔖 v1.10.6 2025-12-23 18:29:10 +08:00
源文雨
8fc733ffd1 chore: make lint happy 2025-12-23 17:36:37 +08:00
源文雨
6deaa8b36e chore: make lint happy 2025-12-23 17:32:31 +08:00
源文雨
e187a3159c chore: make lint happy 2025-12-23 17:31:44 +08:00
github-actions[bot]
0d80a43055 chore: bump deps (#1249)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-23 17:31:18 +08:00
源文雨
9bad003301 🔖 v1.10.5 2025-12-23 17:25:36 +08:00
源文雨
a5a1edda2d fix(aichat): cannot save config 2025-12-23 17:25:13 +08:00
10 changed files with 46 additions and 32 deletions

View File

@@ -38,7 +38,7 @@ jobs:
git config --local user.name 'github-actions[bot]'
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add --all
git commit -m "chore: bump deps"
git commit -m "chore(nix): bump deps"
- name: Create Pull Request
if: ${{ !github.head_ref }}
continue-on-error: true
@@ -46,3 +46,4 @@ jobs:
with:
delete-branch: true
branch-suffix: short-commit-hash
title: "chore(nix): bump deps"

View File

@@ -18,6 +18,7 @@ jobs:
with:
ref: master
fetch-depth: 0
submodules: 'recursive'
- name: Tidy Modules
run: |
@@ -42,3 +43,5 @@ jobs:
if: ${{ !github.head_ref }}
continue-on-error: true
uses: peter-evans/create-pull-request@v8
with:
title: "chore(lint): 改进代码样式"

View File

@@ -57,6 +57,8 @@ run:
issues-exit-code: 1
tests: false
go: '1.24'
skip-dirs:
- data
# output configuration options
output:

6
go.mod
View File

@@ -11,8 +11,8 @@ require (
github.com/FloatTech/rendercard v0.2.0
github.com/FloatTech/sqlite v1.7.2
github.com/FloatTech/ttl v0.0.0-20250224045156-012b1463287d
github.com/FloatTech/zbpctrl v1.7.1-0.20251222053912-c0e551828149
github.com/FloatTech/zbputils v1.7.2-0.20251221141527-35f149bccf9a
github.com/FloatTech/zbpctrl v1.7.1
github.com/FloatTech/zbputils v1.7.2-0.20251223092310-25b804fef625
github.com/RomiChan/syncx v0.0.0-20240418144900-b7402ffdebc7
github.com/RomiChan/websocket v1.4.3-0.20251002072000-d3eb41798438
github.com/Tnze/go-mc v1.20.2
@@ -47,7 +47,7 @@ require (
github.com/sirupsen/logrus v1.9.3
github.com/tidwall/gjson v1.18.0
github.com/wcharczuk/go-chart/v2 v2.1.2
github.com/wdvxdr1123/ZeroBot v1.8.2-0.20251002074418-56567b7fc282
github.com/wdvxdr1123/ZeroBot v1.8.2
gitlab.com/gomidi/midi/v2 v2.3.16
golang.org/x/image v0.34.0
golang.org/x/sys v0.39.0

12
go.sum
View File

@@ -15,10 +15,10 @@ github.com/FloatTech/sqlite v1.7.2 h1:b8COegNLSzofzOyARsVwSbz9OOzWEa8IElsTlx1TBL
github.com/FloatTech/sqlite v1.7.2/go.mod h1:/4tzfCGhrZnnjC1U8vcfwGQeF6eR649fhOsS3+Le0+s=
github.com/FloatTech/ttl v0.0.0-20250224045156-012b1463287d h1:mUQ/c3wXKsUGa4Sg9DBy01APXKB68PmobhxOyaJI7lY=
github.com/FloatTech/ttl v0.0.0-20250224045156-012b1463287d/go.mod h1:fHZFWGquNXuHttu9dUYoKuNbm3dzLETnIOnm1muSfDs=
github.com/FloatTech/zbpctrl v1.7.1-0.20251222053912-c0e551828149 h1:iJgVyjZhzNbwpvB3A0rUZpeOfV8rNpFa9isrrya3L9o=
github.com/FloatTech/zbpctrl v1.7.1-0.20251222053912-c0e551828149/go.mod h1:xmM4dSwHA02Gei3ogCRiG+RTrw/7Z69PfrN5NYf8BPE=
github.com/FloatTech/zbputils v1.7.2-0.20251221141527-35f149bccf9a h1:q2kVZfYBeJXzdBw92BPGTeRZWft0SGB3e11VFsv+wx8=
github.com/FloatTech/zbputils v1.7.2-0.20251221141527-35f149bccf9a/go.mod h1:99hNZ2re2AwUdiMC5y+8nX8ObWwluFF7+k3jZTO+P+c=
github.com/FloatTech/zbpctrl v1.7.1 h1:0yPEmCForhyMbnhTckmjDUFFDZgQp1RjO2bVF4ZVqOs=
github.com/FloatTech/zbpctrl v1.7.1/go.mod h1:xmM4dSwHA02Gei3ogCRiG+RTrw/7Z69PfrN5NYf8BPE=
github.com/FloatTech/zbputils v1.7.2-0.20251223092310-25b804fef625 h1:7CnuhyOR1WhA5A/Pf2Lh0iOQBvZnMz1KLXWB/hJbKwc=
github.com/FloatTech/zbputils v1.7.2-0.20251223092310-25b804fef625/go.mod h1:LBanthv/2ExuzTMCuMDXLkvSPxDJTyNp4MrLoJQzIL4=
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
github.com/PuerkitoBio/goquery v1.10.3 h1:pFYcNSqHxBD06Fpj/KsbStFRsgRATgnf3LeXiUkhzPo=
github.com/PuerkitoBio/goquery v1.10.3/go.mod h1:tMUX0zDMHXYlAQk6p35XxQMqMweEKB7iK7iLNd4RH4Y=
@@ -213,8 +213,8 @@ github.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9R
github.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ=
github.com/wcharczuk/go-chart/v2 v2.1.2 h1:Y17/oYNuXwZg6TFag06qe8sBajwwsuvPiJJXcUcLL6E=
github.com/wcharczuk/go-chart/v2 v2.1.2/go.mod h1:Zi4hbaqlWpYajnXB2K22IUYVXRXaLfSGNNR7P4ukyyQ=
github.com/wdvxdr1123/ZeroBot v1.8.2-0.20251002074418-56567b7fc282 h1:YctW/t88sQ0H8cJ69PWULU6xWfh8kNsX/XgCpW2OPHw=
github.com/wdvxdr1123/ZeroBot v1.8.2-0.20251002074418-56567b7fc282/go.mod h1:trueIIVRywKJa3ov4QphzVvzYzgCNrlXdf9JvPJOFW8=
github.com/wdvxdr1123/ZeroBot v1.8.2 h1:H4qNHgeYLLm3ID5T9MKnO4fI0SWWl0rFCGLCUr8u10M=
github.com/wdvxdr1123/ZeroBot v1.8.2/go.mod h1:trueIIVRywKJa3ov4QphzVvzYzgCNrlXdf9JvPJOFW8=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=

View File

@@ -26,11 +26,11 @@ schema = 3
version = "v0.0.0-20250224045156-012b1463287d"
hash = "sha256-C5xBt0roPgahradCOTgkhL+j5bvoSXmGwdqcu0aSczc="
[mod."github.com/FloatTech/zbpctrl"]
version = "v1.7.1-0.20251222053912-c0e551828149"
version = "v1.7.1"
hash = "sha256-wkeiaUTpPVbpH7fcXeoLtG+aGIMJbvoc/9sbi2IXK0I="
[mod."github.com/FloatTech/zbputils"]
version = "v1.7.2-0.20251221141527-35f149bccf9a"
hash = "sha256-rYeX7AqJ+/YQFvCjRjruSItwDpz2+GmeeDxBK19AEoo="
version = "v1.7.2-0.20251223092310-25b804fef625"
hash = "sha256-iidCYw0+eBr4PLRxpAcxGKKBdQNUCLF7UBcd959FIe0="
[mod."github.com/PuerkitoBio/goquery"]
version = "v1.10.3"
hash = "sha256-Mth7nYm/MtcOhPMbHj7gXF+Mot7eDUBVN570RitGR/c="
@@ -248,8 +248,8 @@ schema = 3
version = "v2.1.2"
hash = "sha256-GXWWea/u6BezTsPPrWhTYiTetPP/YW6P+Sj4YdocPaM="
[mod."github.com/wdvxdr1123/ZeroBot"]
version = "v1.8.2-0.20251002074418-56567b7fc282"
hash = "sha256-KaoqopWcXqiRhGYNaA3UqYtXf27yMuBEj/bvqOWxaC4="
version = "v1.8.2"
hash = "sha256-/GrCbvSCFQgIDAyg1MKCms2FIjyY4/YAQkucfbdud3k="
[mod."github.com/yusufpapurcu/wmi"]
version = "v1.2.4"
hash = "sha256-N+YDBjOW59YOsZ2lRBVtFsEEi48KhNQRb63/0ZSU3bA="

View File

@@ -3,13 +3,13 @@
package banner
// Version ...
var Version = "v1.10.4"
var Version = "v1.10.6"
// Copyright ...
var Copyright = "© 2020 - 2025 FloatTech"
// Banner ...
var Banner = "* OneBot + ZeroBot + Golang\n" +
"* Version " + Version + " - 2025-12-23 00:25:15 +0800 CST\n" +
"* Version " + Version + " - 2025-12-23 18:28:52 +0800 CST\n" +
"* Copyright " + Copyright + ". All Rights Reserved.\n" +
"* Project: https://github.com/FloatTech/ZeroBot-Plugin"

View File

@@ -182,17 +182,18 @@ func init() {
logrus.Infoln("[aichat] 回复内容:", t)
recCfg := airecord.GetConfig()
record := ""
if !stor.norecord() {
if !fastfailnorecord && !stor.norecord() {
record = ctx.GetAIRecord(recCfg.ModelID, recCfg.Customgid, t)
}
if record != "" {
ctx.SendChain(message.Record(record))
} else {
if id != nil {
id = ctx.SendChain(message.Reply(id), message.Text(t))
} else {
id = ctx.SendChain(message.Text(t))
if record != "" {
ctx.SendChain(message.Record(record))
continue
}
fastfailnorecord = true
}
if id != nil {
id = ctx.SendChain(message.Reply(id), message.Text(t))
} else {
id = ctx.SendChain(message.Text(t))
}
process.SleepAbout1sTo2s()
}
@@ -262,6 +263,9 @@ func init() {
en.OnFullMatch("查看AI聊天配置", ensureconfig, zero.SuperUserPermission).SetBlock(true).
Handle(func(ctx *zero.Ctx) {
gid := ctx.Event.GroupID
if gid == 0 {
gid = -ctx.Event.UserID
}
stor, err := newstorage(ctx, gid)
if err != nil {
ctx.SendChain(message.Text("ERROR: ", err))

View File

@@ -13,6 +13,10 @@ const (
bitmapnrat = 0x040000
)
var (
fastfailnorecord = false
)
type storage ctxext.Storage
func newstorage(ctx *zero.Ctx, gid int64) (storage, error) {

View File

@@ -12,7 +12,7 @@
"0409": {
"identity": {
"name": "ZeroBot-Plugin",
"version": "1.10.4.2318"
"version": "1.10.6.2327"
},
"description": "",
"minimum-os": "vista",
@@ -36,23 +36,23 @@
"#1": {
"0000": {
"fixed": {
"file_version": "1.10.4.2318",
"product_version": "v1.10.4",
"timestamp": "2025-12-23T00:25:24+08:00"
"file_version": "1.10.6.2327",
"product_version": "v1.10.6",
"timestamp": "2025-12-23T18:29:03+08:00"
},
"info": {
"0409": {
"Comments": "OneBot plugins based on ZeroBot",
"CompanyName": "FloatTech",
"FileDescription": "https://github.com/FloatTech/ZeroBot-Plugin",
"FileVersion": "1.10.4.2318",
"FileVersion": "1.10.6.2327",
"InternalName": "",
"LegalCopyright": "© 2020 - 2025 FloatTech. All Rights Reserved.",
"LegalTrademarks": "",
"OriginalFilename": "ZBP.EXE",
"PrivateBuild": "",
"ProductName": "ZeroBot-Plugin",
"ProductVersion": "v1.10.4",
"ProductVersion": "v1.10.6",
"SpecialBuild": ""
}
}