arisa 4.3.4 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arisa",
3
- "version": "4.3.4",
3
+ "version": "4.3.5",
4
4
  "description": "Telegram + Pi Agent modular assistant",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -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,