Skip to content

Write the busy-ack with one short model call instead of templates - #1667

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
Birfy:busyack-llm
Oct 29, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
Birfy:busyack-llm

Conversation

@Birfy

@Birfy Birfy commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #1665

Written-by: Dev-1
Owner: Dev
Reviewer: Reviewer
Tip: f6e8180
Tree: 289dc6f41e504a5f658e7ca5593b87210a7761f0

What changed

Before: a busy Bot answered a new message with a template that quoted a truncated piece of it inside a fixed phrase (「「那些 needs-human 的i...」记下了,马上接着处理。」, #1630).
After: the host publishes the ack at once with an empty text (the client draws avatar + blinking dots, #1657) and asks one short model call — config.flybot.modelFor['busy-ack'] when set, else the chat's own model, reasoning off, 80 output tokens — for one natural sentence in the message's language about what the message asks and what the turn is doing, with no quoting and no stock phrases. Hard 3 s timeout; a timeout, error, empty/overlong answer or missing route leaves the text empty, so nothing is sent and the dots clear with the turn. A late answer never revives a cleared ack. The template generator, topicOf truncation and tool-word tables are removed. Tests mock the model; docs/subsystems/core-host.md and a changelog fragment updated.

Verification at the tip

Tip SHA: f6e8180
Ran: TZ=UTC npm run verify (exit 0; core 1949 pass / 0 fail), node scripts/ds-bot-patches.mjs generate + check, node .github/scripts/changelog.mjs check.
Not run (and why): live/LIVE deployment (out of scope, not touched); no real-model latency measurement.

Checkpoint

{
  "pr": 1667,
  "claim": "Dev",
  "issue": 1665,
  "summary": "The busy-ack is written by one short model call instead of templates. It is published pending at once (dots), filled by the model in the user's language, bounded by a 3 s hard timeout. On timeout or error no text is sent and the pending ack clears with the turn. Template and truncation code removed.",
  "files": ["core/src/host/busy-ack.js", "core/test/busy-ack.test.js", "docs/subsystems/core-host.md", "changelog.d/1665-busy-ack-model.changed.md", "patches/ds-bot/files/src/host/busy-ack.js", "patches/ds-bot/files/test/busy-ack.test.js"],
  "checks": { "ran": "npm run verify", "result": "green", "at": "f6e8180a269b23e6d4b6bce4ab053716a6981a39" },
  "next": "none — ready for review"
}

@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 29, 2026
@Birfy

Birfy commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at f6e8180
Written-by: Reviewer
Attestation: f6e8180 role=Reviewer

Reviewed the diff at this tip: template/truncation generator removed; ack published pending (empty text → client dots) and filled by one model call with ACK_SYSTEM (user's language, actual content + current work, no quoting, no stock phrases); route = modelFor['busy-ack'] or the chat's own, reasoning off, maxTokens 80; hard 3 s bound via AbortSignal.timeout plus a race timer; errors/timeouts/empty/overlong → no text; late answer cannot revive a cleared ack. Room path keeps the relay header out of the prompt.

Ran at this tip:

$ TZ=UTC npm run verify
# exit 0 — core: tests 1949 pass 0 fail; plugins/social, tree, timeline, workflow, .github scripts, interop, live-e2e lint/tests all 0 fail
$ cd core && node --import ./test/harness-resolve.mjs --test test/busy-ack.test.js test/busy-ack-client.test.js
# tests 20 pass 20 fail 0

@github-actions github-actions Bot added the pass label Oct 29, 2026
@Birfy
Birfy enabled auto-merge October 29, 2026 09:02
@Birfy
Birfy added this pull request to the merge queue Oct 29, 2026
Merged via the queue into ThinkFlowLab:main with commit 2349444 Oct 29, 2026
11 of 15 checks passed
@Birfy
Birfy deleted the busyack-llm branch October 29, 2026 09:06
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Busy-ack: write the line with one short model call instead of templates

1 participant