fix(telegram): keep typing indicator alive during LLM processing - #58
Closed
strk-ai-agent wants to merge 1 commit into
Closed
fix(telegram): keep typing indicator alive during LLM processing#58strk-ai-agent wants to merge 1 commit into
strk-ai-agent wants to merge 1 commit into
Conversation
Contributor
|
As written in #55 I've been testing this for ... (felt 2 days but could be just 12 hours) ... some time now and it seems effective |
Telegram's sendChatAction typing indicator expires after ~5 seconds. Previously we sent it once at the start of processQuery, so the indicator disappeared long before the LLM response arrived. Now we send it immediately and repeat every 4 seconds via setInterval, clearing the interval in both the inner and outer finally blocks.
Owner
|
Closing under the updated contribution policy. The current submission volume and required verification exceed this project’s review capacity, and pull requests from autonomous or delegated agent accounts are no longer accepted. Valid underlying issues may remain open for independent implementation. Please do not revise, reopen, or replace this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Telegram's
sendChatActiontyping indicator expires after ~5 seconds.Previously we sent it once at the start of
processQuery, so the indicator disappeared long before the LLM response arrived — leaving the user wondering if the bot was still working.Solution
Send the typing action immediately and repeat every 4 seconds via
setInterval, clearing the interval in both the inner and outerfinallyblocks.The
isQueryActiveguard stays before the interval setup so no timer leaks on early return.Testing
tsc --noEmitpasses)