koishi-plugin-chatluna-think-viewer 1.0.10 → 1.0.12
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/index.js +3 -1
- package/package.json +8 -28
package/index.js
CHANGED
|
@@ -119,9 +119,11 @@ function apply(ctx, config) {
|
|
|
119
119
|
if (config.renderImage && ctx.chatluna?.renderer) {
|
|
120
120
|
try {
|
|
121
121
|
const title = `### 上一条思考(倒数第 ${targetIndex} 条)`;
|
|
122
|
+
const markdown = `<div align="center">\n${title}\n</div>\n\n<div align="left">\n${think}\n</div>`;
|
|
122
123
|
const rendered = await ctx.chatluna.renderer.render(
|
|
123
124
|
{
|
|
124
|
-
|
|
125
|
+
// 中间标题居中、正文左对齐,避免整段贴左侧
|
|
126
|
+
content: [{ type: 'text', text: markdown }],
|
|
125
127
|
},
|
|
126
128
|
{ type: 'image', session },
|
|
127
129
|
);
|
package/package.json
CHANGED
|
@@ -1,40 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-chatluna-think-viewer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"main": "index.js",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Expose a command/shortcut to read the latest <think> block from chatluna-character.",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"koishi",
|
|
9
|
-
"chatluna",
|
|
10
|
-
"character",
|
|
11
|
-
"think"
|
|
12
|
-
],
|
|
7
|
+
"keywords": ["koishi", "chatluna", "character", "think"],
|
|
13
8
|
"homepage": "https://github.com/sCR0WN-s/koishi-plugin-chatluna-think-viewer",
|
|
14
|
-
"repository": {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
"contributors": [
|
|
19
|
-
"sCR0WN-s <2892511968@qq.com>"
|
|
20
|
-
],
|
|
21
|
-
"peerDependencies": {
|
|
22
|
-
"koishi": "^4.18.0",
|
|
23
|
-
"koishi-plugin-chatluna-character": "^0.0.180"
|
|
24
|
-
},
|
|
9
|
+
"repository": {"type": "git", "url": "git+https://github.com/sCR0WN-s/koishi-plugin-chatluna-think-viewer.git"},
|
|
10
|
+
"contributors": ["sCR0WN-s <2892511968@qq.com>"],
|
|
11
|
+
"peerDependencies": {"koishi": "^4.18.0", "koishi-plugin-chatluna-character": "^0.0.180"},
|
|
25
12
|
"koishi": {
|
|
26
13
|
"description": {
|
|
27
14
|
"zh": "通过命令/关键词查看 chatluna-character 最近一次回复的 <think> 思考内容。",
|
|
28
15
|
"en": "Expose a command/shortcut to read the last <think> block from chatluna-character."
|
|
29
16
|
},
|
|
30
|
-
"service": {
|
|
31
|
-
"required": [
|
|
32
|
-
"chatluna_character"
|
|
33
|
-
]
|
|
34
|
-
}
|
|
17
|
+
"service": {"required": ["chatluna_character"]}
|
|
35
18
|
},
|
|
36
|
-
"files": [
|
|
37
|
-
"index.js",
|
|
38
|
-
"README.md"
|
|
39
|
-
]
|
|
19
|
+
"files": ["index.js", "README.md"]
|
|
40
20
|
}
|