update requirements checking

This commit is contained in:
2026-01-22 15:34:50 +03:00
parent a5f6671e8b
commit 19a5942fec
4 changed files with 99 additions and 39 deletions
+5 -1
View File
@@ -1,10 +1,12 @@
import {CallbackCommand} from "../base/callback-command";
import {CallbackQuery} from "typescript-telegram-bot-api";
import {abortOllamaRequest, bot, getOllamaRequest} from "../index";
import {Environment} from "../common/environment";
import {logError} from "../util/utils";
import {MessageStore} from "../common/message-store";
import {StoredMessage} from "../model/stored-message";
import {Requirements} from "../base/requirements";
import {Requirement} from "../base/requirement";
import {Environment} from "../common/environment";
const cancelledText = "```Ollama\n❌ Отменено```";
@@ -13,6 +15,8 @@ export class OllamaCancel extends CallbackCommand {
data = "/cancel_ollama";
text = "Cancel Ollama generation";
requirements = Requirements.Build(Requirement.SAME_USER);
async execute(query: CallbackQuery): Promise<void> {
const chatId = query.message.chat.id;
const fromId = query.from.id;