koishi-plugin-cocoyyy-console 1.1.1-beta.0 → 1.1.1

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/lib/index.js CHANGED
@@ -44,6 +44,7 @@ var import_koishi13 = require("koishi");
44
44
  var import_koishi = require("koishi");
45
45
  var FunctionConfigSchema = import_koishi.Schema.object({
46
46
  dev_mode: import_koishi.Schema.boolean().default(false).description("开发测试模式"),
47
+ reload_button: import_koishi.Schema.boolean().default(true).description("重载开关(用于重载无实际用途)"),
47
48
  tag_flag: import_koishi.Schema.boolean().default(true).description("标签功能是否启用"),
48
49
  repeat_flag: import_koishi.Schema.boolean().default(true).description("复读功能是否启用"),
49
50
  rbq_flag: import_koishi.Schema.boolean().default(true).description("*人功能是否启用"),
@@ -1577,11 +1578,13 @@ async function checkShitOrNot(session, parttern_msg, config) {
1577
1578
  }
1578
1579
  chatHistory.push({ role: "assistant", content: [{ type: "text", text: resp }] });
1579
1580
  const quoteContent = session.quote.content;
1581
+ logger.info("[checkShitOrNot Info]: 引用消息内容: " + quoteContent);
1580
1582
  const { imageUrls, text } = extractImageAndText(quoteContent);
1581
1583
  if (!text && imageUrls.length === 0) {
1582
1584
  logger.warn("[checkShitOrNot Warn]: 引用消息中未发现文本或图片");
1583
1585
  return "引用消息中未发现文本或图片";
1584
1586
  }
1587
+ logger.info("[checkShitOrNot Info]: 提取图片 URL: " + imageUrls.join(", "));
1585
1588
  const targetContent = [
1586
1589
  ...text ? [{ type: "text", text }] : [],
1587
1590
  ...imageUrls.map((url) => ({ type: "image_url", image_url: { url } }))
@@ -1625,6 +1628,7 @@ son判断模式列表:
1625
1628
  if (!dev_mode) {
1626
1629
  if (!is_at_bot_quote(session)) return "请提供正确格式,如: [引用消息] @bot son [判断模式]";
1627
1630
  } else {
1631
+ if (!session.quote) return "请引用消息后使用功能";
1628
1632
  }
1629
1633
  if (think_flag) return "请等待思考结果";
1630
1634
  const parttern = args?.[0];
@@ -1,6 +1,7 @@
1
1
  import { Schema } from 'koishi';
2
2
  interface FunctionConfig {
3
3
  dev_mode: boolean;
4
+ reload_button: boolean;
4
5
  tag_flag: boolean;
5
6
  repeat_flag: boolean;
6
7
  rbq_flag: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-cocoyyy-console",
3
3
  "description": "自用koishi插件,功能包含复读,记录黑历史,*人等",
4
- "version": "1.1.1-beta.0",
4
+ "version": "1.1.1",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "contributors": [