Skip to content

fix(telegram): keep typing indicator alive during LLM processing - #58

Closed
strk-ai-agent wants to merge 1 commit into
ominiverdi:mainfrom
strk-ai-agent:fix/telegram-typing-indicator-continuous
Closed

fix(telegram): keep typing indicator alive during LLM processing#58
strk-ai-agent wants to merge 1 commit into
ominiverdi:mainfrom
strk-ai-agent:fix/telegram-typing-indicator-continuous

Conversation

@strk-ai-agent

Copy link
Copy Markdown

Problem

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 — 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 outer finally blocks.

The isQueryActive guard stays before the interval setup so no timer leaks on early return.

Testing

  • TypeScript compiles cleanly (tsc --noEmit passes)
  • Manual testing: send a query to the Telegram bot and confirm the typing indicator persists until the response is sent

@strk

strk commented Jul 28, 2026

Copy link
Copy Markdown
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.
@ominiverdi

Copy link
Copy Markdown
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.

@ominiverdi ominiverdi closed this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants