koishi-plugin-chatluna-affinity 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/AffinityDashboardPage.vue +30 -0
- package/client/components/ui/alert.tsx +50 -0
- package/client/components/ui/avatar.tsx +47 -0
- package/client/components/ui/badge.tsx +35 -0
- package/client/components/ui/button.tsx +53 -0
- package/client/components/ui/card.tsx +57 -0
- package/client/components/ui/chart.tsx +136 -0
- package/client/components/ui/sonner.tsx +23 -0
- package/client/components/ui/table.tsx +77 -0
- package/client/components/ui/tabs.tsx +82 -0
- package/client/dashboard/AffinityDashboard.tsx +1123 -0
- package/client/dashboard/mount.tsx +9 -0
- package/client/dashboard/types.ts +85 -0
- package/client/index.ts +13 -0
- package/client/lib/utils.ts +6 -0
- package/client/style.css +125 -0
- package/dist/index.js +38400 -159
- package/dist/style.css +1 -1
- package/lib/index.d.ts +68 -15
- package/lib/index.js +673 -8
- package/package.json +57 -16
- package/readme.md +4 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-chatluna-affinity",
|
|
3
3
|
"description": "ChatLuna Character 好感度系统,提供 {好感度}、{关系}、{黑名单} 变量与工具,并支持 XML 工具调用,仅支持 onebot 平台。",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.2",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
"client"
|
|
11
11
|
],
|
|
12
12
|
"license": "MIT",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsup && vite build",
|
|
15
|
+
"watch": "tsup --watch",
|
|
16
|
+
"clean": "rimraf lib dist",
|
|
17
|
+
"typecheck": "yarn workspace shared-chatluna-xmltools build && tsc --noEmit",
|
|
18
|
+
"test": "node --import tsx --test --test-name-pattern='.*' $(find tests -name '*.test.ts' -print)"
|
|
19
|
+
},
|
|
13
20
|
"keywords": [
|
|
14
21
|
"chatbot",
|
|
15
22
|
"koishi",
|
|
@@ -20,45 +27,79 @@
|
|
|
20
27
|
"type": "git",
|
|
21
28
|
"url": "https://github.com/Sor85/AAAAACAT-chatluna-plugins.git"
|
|
22
29
|
},
|
|
23
|
-
"
|
|
30
|
+
"koishi": {
|
|
31
|
+
"browser": true,
|
|
32
|
+
"public": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"description": {
|
|
36
|
+
"zh": "ChatLuna Character 好感度系统,提供好感度、关系、黑名单变量与控制台仪表盘"
|
|
37
|
+
},
|
|
38
|
+
"service": {
|
|
39
|
+
"required": [
|
|
40
|
+
"chatluna",
|
|
41
|
+
"database"
|
|
42
|
+
],
|
|
43
|
+
"optional": [
|
|
44
|
+
"puppeteer",
|
|
45
|
+
"console",
|
|
46
|
+
"chatluna_group_analysis",
|
|
47
|
+
"chatluna_character"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
24
51
|
"peerDependencies": {
|
|
52
|
+
"@koishijs/plugin-console": "^5.30.0",
|
|
25
53
|
"koishi": "^4.18.7",
|
|
26
54
|
"koishi-plugin-chatluna": "*",
|
|
27
55
|
"koishi-plugin-chatluna-character": "*",
|
|
28
|
-
"@koishijs/plugin-console": "^5.30.0",
|
|
29
56
|
"koishi-plugin-chatluna-group-analysis": "*"
|
|
30
57
|
},
|
|
31
58
|
"peerDependenciesMeta": {
|
|
32
|
-
"koishi-plugin-chatluna-character": {
|
|
33
|
-
"optional": true
|
|
34
|
-
},
|
|
35
59
|
"@koishijs/plugin-console": {
|
|
36
60
|
"optional": true
|
|
37
61
|
},
|
|
38
|
-
"koishi-plugin-
|
|
62
|
+
"koishi-plugin-chatluna-character": {
|
|
39
63
|
"optional": true
|
|
40
64
|
},
|
|
41
65
|
"koishi-plugin-chatluna-group-analysis": {
|
|
42
66
|
"optional": true
|
|
67
|
+
},
|
|
68
|
+
"koishi-plugin-puppeteer": {
|
|
69
|
+
"optional": true
|
|
43
70
|
}
|
|
44
71
|
},
|
|
45
72
|
"devDependencies": {
|
|
73
|
+
"@heroui/react": "^3.1.0",
|
|
74
|
+
"@heroui/styles": "^3.1.0",
|
|
46
75
|
"@koishijs/client": "^5.30.0",
|
|
76
|
+
"@radix-ui/react-avatar": "^1.1.12",
|
|
77
|
+
"@radix-ui/react-slot": "^1.2.5",
|
|
78
|
+
"@radix-ui/react-tabs": "^1.1.14",
|
|
79
|
+
"@tabler/icons-react": "^3.44.0",
|
|
80
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
47
81
|
"@types/node": "^22.10.1",
|
|
82
|
+
"@types/react": "^19",
|
|
83
|
+
"@types/react-dom": "^19",
|
|
84
|
+
"@types/react-is": "^19",
|
|
48
85
|
"@vitejs/plugin-vue": "^6.0.2",
|
|
86
|
+
"class-variance-authority": "^0.7.1",
|
|
87
|
+
"clsx": "^2.1.1",
|
|
88
|
+
"react": "^19.2.7",
|
|
89
|
+
"react-dom": "^19.2.7",
|
|
90
|
+
"react-is": "^19.2.7",
|
|
91
|
+
"recharts": "^3.8.1",
|
|
49
92
|
"rimraf": "^5.0.5",
|
|
50
93
|
"sass": "^1.77.0",
|
|
94
|
+
"shared-chatluna-xmltools": "0.0.1",
|
|
95
|
+
"shared-nav": "0.0.1",
|
|
96
|
+
"sonner": "^2.0.7",
|
|
97
|
+
"tailwind-merge": "^3.6.0",
|
|
98
|
+
"tailwindcss": "^4.0.0",
|
|
51
99
|
"tsup": "^8.0.0",
|
|
100
|
+
"tsx": "^4.20.6",
|
|
52
101
|
"typescript": "^5.7.2",
|
|
53
102
|
"vite": "^6.0.0",
|
|
54
|
-
"
|
|
55
|
-
"shared-chatluna-xmltools": "0.0.1",
|
|
56
|
-
"shared-nav": "0.0.1"
|
|
57
|
-
},
|
|
58
|
-
"scripts": {
|
|
59
|
-
"build": "tsup && vite build",
|
|
60
|
-
"watch": "tsup --watch",
|
|
61
|
-
"clean": "rimraf lib dist",
|
|
62
|
-
"test": "node --import tsx --test --test-name-pattern='.*' $(find src -name '*.test.ts' -print)"
|
|
103
|
+
"vue": "^3.5.21"
|
|
63
104
|
}
|
|
64
105
|
}
|
package/readme.md
CHANGED
|
@@ -34,13 +34,15 @@
|
|
|
34
34
|
### 安装插件
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
|
|
37
|
+
yarn add koishi-plugin-chatluna-affinity
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
安装后,在 Koishi 中启用本插件并完成配置。
|
|
41
41
|
|
|
42
42
|
## 快速上手
|
|
43
43
|
|
|
44
|
+
如果你主要是想在 ChatLuna Character 里使用本插件,建议先看这份伪装成接入指南的教程:[ChatLuna Character 接入指南](./character-prompt-guide.md)。它给出了角色提示词里应该放哪些变量,以及传统 XML 回复和实验性工具调用回复两种接入方式。
|
|
45
|
+
|
|
44
46
|
### 1. 先配置 `scopeId`
|
|
45
47
|
|
|
46
48
|
这是最重要的配置项。
|
|
@@ -293,4 +295,4 @@ scopeId.指令名
|
|
|
293
295
|
|
|
294
296
|
## 许可证
|
|
295
297
|
|
|
296
|
-
MIT © 2024-present chatluna-affinity contributors
|
|
298
|
+
MIT © 2024-present chatluna-affinity contributors
|