Keep Telegram streaming overflow messages tied to the primary live message, reuse them across edits, and delete stale overflow replies when streamed content shrinks.
Mirrors Claude Code's /btw: ask the agent a quick question without
interrupting the in-flight main task.
- frontends/btw_cmd.py: snapshot backend.history under lock + deepcopy →
background-thread backend.raw_ask single-turn answer; never writes
backend.history; never touches task_queue. Reuses backend.raw_ask +
make_messages, no new LLM instance.
- frontends/chatapp_common.py: register /btw in HELP_COMMANDS; handle
/btw in AgentChatMixin (sync via asyncio.to_thread); install() at
module bottom so the slash hook is wired for any frontend that
imports chatapp_common.
- frontends/stapp.py: persist display_queue + partial_response in
st.session_state so the streaming bubble survives Streamlit reruns;
new render_main_stream() helper covers both new tasks and resume;
/btw branch uses plain st.rerun() (preserves dq) so the main task's
remaining output renders in a follow-up bubble; non-/btw prompts
explicitly call agent.abort() to keep the original "submit cancels"
UX. Strip <summary> meta tags from text segments and drop dangling
"LLM Running (Turn N) ..." markers in resumed partials to clean up
the rendered chat.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When the model only outputs tool calls with no meaningful text,
combined_content may contain only whitespace text blocks (e.g. '\n').
Strict API proxies reject this with HTTP 400 'empty content' error.
Filter out such blocks before sending to the API.
Added instructions for setting up a virtual environment and installing dependencies.
error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
The previous implementation called send_typing once with an empty
typing_ticket, which had no effect. The iLink API requires a valid
typing_ticket obtained from getconfig first.
Changes:
- Add get_typing_ticket() method to fetch ticket via getconfig API
- Replace single send_typing call with continuous typing loop
- Typing refreshes every 2 seconds until agent finishes processing
- Stops cleanly via threading.Event when message handling completes
Co-authored-by: succ985 <succ985@users.noreply.github.com>
Replace fixed 5s sleep with the same backoff pattern already used in
dcapp.py: 5 -> 10 -> 20 -> ... -> 300s, resetting to 5s when a session
survived >=60s. Uses time.monotonic() to avoid clock-jump skew.