koishi-plugin-cocoyyy-console 1.1.0 → 1.1.1-beta.0
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 +5 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1538,8 +1538,7 @@ async function callOpenRouter(api_url, api_key, api_model = "gpt-4o-mini", messa
|
|
|
1538
1538
|
logger.error("[callOpenRouter Error]: OpenRouter 请求失败", {
|
|
1539
1539
|
status,
|
|
1540
1540
|
detail,
|
|
1541
|
-
url: err.config?.url
|
|
1542
|
-
payload: err.config?.data
|
|
1541
|
+
url: err.config?.url
|
|
1543
1542
|
});
|
|
1544
1543
|
const errorMessage = `test error${status ? `(${status})` : ""}: ${detail}`;
|
|
1545
1544
|
return { err: errorMessage, resp: null };
|
|
@@ -1626,7 +1625,6 @@ son判断模式列表:
|
|
|
1626
1625
|
if (!dev_mode) {
|
|
1627
1626
|
if (!is_at_bot_quote(session)) return "请提供正确格式,如: [引用消息] @bot son [判断模式]";
|
|
1628
1627
|
} else {
|
|
1629
|
-
if (!session.quote) return "请引用消息后使用功能";
|
|
1630
1628
|
}
|
|
1631
1629
|
if (think_flag) return "请等待思考结果";
|
|
1632
1630
|
const parttern = args?.[0];
|
|
@@ -2083,7 +2081,7 @@ var is_gaming = false;
|
|
|
2083
2081
|
var chatPrompt = [];
|
|
2084
2082
|
var chatHistory2 = [];
|
|
2085
2083
|
var gameTimeout = null;
|
|
2086
|
-
var GAME_TIMEOUT_MINUTES =
|
|
2084
|
+
var GAME_TIMEOUT_MINUTES = -1;
|
|
2087
2085
|
async function startSituationPuzzle(config) {
|
|
2088
2086
|
chatPrompt = [];
|
|
2089
2087
|
chatHistory2 = [];
|
|
@@ -2097,6 +2095,9 @@ async function startSituationPuzzle(config) {
|
|
|
2097
2095
|
}
|
|
2098
2096
|
chatPrompt.push({ role: "assistant", content: [{ type: "text", text: resp }] });
|
|
2099
2097
|
is_gaming = true;
|
|
2098
|
+
if (GAME_TIMEOUT_MINUTES <= 0) {
|
|
2099
|
+
GAME_TIMEOUT_MINUTES = local_config2?.game?.timeout_minutes || 10;
|
|
2100
|
+
}
|
|
2100
2101
|
clearGameTimeout();
|
|
2101
2102
|
gameTimeout = setTimeout(async () => {
|
|
2102
2103
|
logger.info(`[SituationPuzzle Timeout]: 游戏已超时(${GAME_TIMEOUT_MINUTES}分钟),自动结束游戏`);
|