koishi-plugin-cocoyyy-console 1.1.1-beta.0 → 1.1.1-beta.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 +3 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1577,11 +1577,13 @@ async function checkShitOrNot(session, parttern_msg, config) {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
chatHistory.push({ role: "assistant", content: [{ type: "text", text: resp }] });
|
|
1579
1579
|
const quoteContent = session.quote.content;
|
|
1580
|
+
logger.info("[checkShitOrNot Info]: 引用消息内容: " + quoteContent);
|
|
1580
1581
|
const { imageUrls, text } = extractImageAndText(quoteContent);
|
|
1581
1582
|
if (!text && imageUrls.length === 0) {
|
|
1582
1583
|
logger.warn("[checkShitOrNot Warn]: 引用消息中未发现文本或图片");
|
|
1583
1584
|
return "引用消息中未发现文本或图片";
|
|
1584
1585
|
}
|
|
1586
|
+
logger.info("[checkShitOrNot Info]: 提取图片 URL:\n" + imageUrls.join(",\n"));
|
|
1585
1587
|
const targetContent = [
|
|
1586
1588
|
...text ? [{ type: "text", text }] : [],
|
|
1587
1589
|
...imageUrls.map((url) => ({ type: "image_url", image_url: { url } }))
|
|
@@ -1625,6 +1627,7 @@ son判断模式列表:
|
|
|
1625
1627
|
if (!dev_mode) {
|
|
1626
1628
|
if (!is_at_bot_quote(session)) return "请提供正确格式,如: [引用消息] @bot son [判断模式]";
|
|
1627
1629
|
} else {
|
|
1630
|
+
if (!session.quote) return "请引用消息后使用功能";
|
|
1628
1631
|
}
|
|
1629
1632
|
if (think_flag) return "请等待思考结果";
|
|
1630
1633
|
const parttern = args?.[0];
|