koishi-plugin-chatluna-think-viewer 1.0.10 → 1.0.11

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.
Files changed (2) hide show
  1. package/index.js +3 -1
  2. package/package.json +1 -1
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
- content: [{ type: 'text', text: `${title}\n\n\`\`\`\n${think}\n\`\`\`` }],
125
+ // 中间标题居中、正文左对齐,避免整段贴左侧
126
+ content: [{ type: 'text', text: markdown }],
125
127
  },
126
128
  { type: 'image', session },
127
129
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-chatluna-think-viewer",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "main": "index.js",
5
5
  "description": "通过命令/关键词查看 chatluna-character 最近一次回复中的 <think> 思考内容。",
6
6
  "license": "MIT",