arisa 4.3.3 → 4.3.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/package.json +2 -2
- package/src/transport/telegram/bot.js +19 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arisa",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.5",
|
|
4
4
|
"description": "Telegram + Pi Agent modular assistant",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"homepage": "https://arisa.sh",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@earendil-works/pi-coding-agent": "
|
|
40
|
+
"@earendil-works/pi-coding-agent": "0.80.6",
|
|
41
41
|
"@sinclair/typebox": "^0.34.41",
|
|
42
42
|
"grammy": "^1.42.0"
|
|
43
43
|
},
|
|
@@ -851,17 +851,8 @@ export async function createTelegramBot({ config, artifactStore, toolRegistry, t
|
|
|
851
851
|
return;
|
|
852
852
|
}
|
|
853
853
|
|
|
854
|
-
if (getChatState(ctx.chat.id).processing) {
|
|
855
|
-
await ctx.answerCallbackQuery({
|
|
856
|
-
text: action.type === "effort" || action.type === "model-effort"
|
|
857
|
-
? "Wait for the current response before changing effort."
|
|
858
|
-
: "Wait for the current response before changing models.",
|
|
859
|
-
show_alert: true
|
|
860
|
-
});
|
|
861
|
-
return;
|
|
862
|
-
}
|
|
863
|
-
|
|
864
854
|
const models = getProviderModels();
|
|
855
|
+
const chatBusy = getChatState(ctx.chat.id).processing;
|
|
865
856
|
|
|
866
857
|
if (action.type === "select") {
|
|
867
858
|
const model = models[action.value];
|
|
@@ -873,6 +864,7 @@ export async function createTelegramBot({ config, artifactStore, toolRegistry, t
|
|
|
873
864
|
return;
|
|
874
865
|
}
|
|
875
866
|
|
|
867
|
+
// Reasoning models open the effort picker only — no session reset yet.
|
|
876
868
|
if (modelSupportsThinking(model)) {
|
|
877
869
|
await showEffortPicker(ctx, {
|
|
878
870
|
model,
|
|
@@ -883,6 +875,14 @@ export async function createTelegramBot({ config, artifactStore, toolRegistry, t
|
|
|
883
875
|
return;
|
|
884
876
|
}
|
|
885
877
|
|
|
878
|
+
if (chatBusy) {
|
|
879
|
+
await ctx.answerCallbackQuery({
|
|
880
|
+
text: "Wait for the current response before changing models.",
|
|
881
|
+
show_alert: true
|
|
882
|
+
});
|
|
883
|
+
return;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
886
|
const currentModelId = resolveChatModel(config, ctx.chat.id);
|
|
887
887
|
const currentEffort = resolveChatThinkingLevel(config, ctx.chat.id);
|
|
888
888
|
if (model.id === currentModelId && currentEffort === "off") {
|
|
@@ -925,6 +925,7 @@ export async function createTelegramBot({ config, artifactStore, toolRegistry, t
|
|
|
925
925
|
return;
|
|
926
926
|
}
|
|
927
927
|
|
|
928
|
+
// Effort-only updates do not reset the session, so they are safe while busy.
|
|
928
929
|
if (model.id === currentModelId) {
|
|
929
930
|
await persistChatEffort(ctx.chat.id, model, action.level);
|
|
930
931
|
await ctx.api.editMessageText(
|
|
@@ -936,6 +937,14 @@ export async function createTelegramBot({ config, artifactStore, toolRegistry, t
|
|
|
936
937
|
return;
|
|
937
938
|
}
|
|
938
939
|
|
|
940
|
+
if (chatBusy) {
|
|
941
|
+
await ctx.answerCallbackQuery({
|
|
942
|
+
text: "Wait for the current response before changing models.",
|
|
943
|
+
show_alert: true
|
|
944
|
+
});
|
|
945
|
+
return;
|
|
946
|
+
}
|
|
947
|
+
|
|
939
948
|
await persistChatModel(ctx.chat.id, model, action.level);
|
|
940
949
|
await ctx.api.editMessageText(
|
|
941
950
|
ctx.chat.id,
|