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];
|