koishi-plugin-cocoyyy-console 1.1.3-alpha.4 → 1.1.3-alpha.5
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 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2428,7 +2428,8 @@ var gameList = [
|
|
|
2428
2428
|
];
|
|
2429
2429
|
var commandList = [
|
|
2430
2430
|
"gamelist",
|
|
2431
|
-
"startgame"
|
|
2431
|
+
"startgame",
|
|
2432
|
+
"endgame"
|
|
2432
2433
|
];
|
|
2433
2434
|
function registerGameCommands(ctx, game_config, ai_config) {
|
|
2434
2435
|
if (game_config?.config_path) {
|
|
@@ -2493,7 +2494,6 @@ function registerGameCommands(ctx, game_config, ai_config) {
|
|
|
2493
2494
|
let resp_text = "";
|
|
2494
2495
|
switch (now_game) {
|
|
2495
2496
|
case gameList[0].command:
|
|
2496
|
-
await session.send("正在结束游戏...");
|
|
2497
2497
|
resp_text = await endSituationPuzzle(ai_config);
|
|
2498
2498
|
now_game = null;
|
|
2499
2499
|
return checkResp(resp_text);
|
|
@@ -2539,6 +2539,7 @@ async function situationPuzzleMiddleware(session, ai_config) {
|
|
|
2539
2539
|
const withoutTags = content.replace(/<[^>]+>/g, " ");
|
|
2540
2540
|
const text = withoutTags.replace(/\s+/g, " ").trim();
|
|
2541
2541
|
try {
|
|
2542
|
+
if (is_thinking) return "正在思考,请耐心等待...";
|
|
2542
2543
|
is_thinking = true;
|
|
2543
2544
|
if (text.includes("reroll")) {
|
|
2544
2545
|
const resp2 = await rerollSituationPuzzle(ai_config);
|