Skip to content

feat(welcome): parallel template messages with LLM inference for fast…#616

Closed
M3gA-Mind wants to merge 1 commit intotinyhumansai:mainfrom
M3gA-Mind:feat/592-faster-welcome-llm
Closed

feat(welcome): parallel template messages with LLM inference for fast…#616
M3gA-Mind wants to merge 1 commit intotinyhumansai:mainfrom
M3gA-Mind:feat/592-faster-welcome-llm

Conversation

@M3gA-Mind
Copy link
Copy Markdown
Contributor

Summary

  • Immediate feedback: Template 1 (time-of-day greeting + connected channels) fires at t≈0ms, before the LLM starts, so the chat bubble is never blank after the wizard closes
  • Loading indicator: Template 2 ("Getting everything ready for you...") publishes at t=4s via tokio::join!, running in parallel with LLM inference rather than blocking it
  • No duplicate greeting: The prompt passed to run_single explicitly tells the agent that both templates have already been shown and to open directly with the personalised setup summary
  • Prompt.md updated: New "Proactive invocation" section documents the three-message flow and adds a "What NOT to do" bullet blocking redundant openers

Changed files

File Change
src/openhuman/agent/welcome_proactive.rs Rewrote run_proactive_welcome to publish 3 events; added time_of_day_greeting() and build_template_greeting() helpers
src/openhuman/agent/agents/welcome/prompt.md Added proactive-invocation section + "no greeting" bullet in What NOT to do

Test plan

  • cargo test -p openhuman welcome_proactive — 7 unit tests cover greeting text for 0, 1, 2, 3 channels and the missing-key fallback
  • cargo check passes clean; cargo fmt --check passes
  • All pre-push hooks pass (Prettier, ESLint, tsc, cargo check)
  • Manual smoke test: complete desktop onboarding wizard → observe three sequential chat bubbles (greeting, loading, LLM response) with no duplicate greeting in the third message

…er perceived welcome (tinyhumansai#592)

Show two template messages immediately while the LLM runs in the
background, cutting the perceived wait from ~15s to ~0s:

- Template 1 (t≈0ms): time-of-day greeting that names any connected
  channels, built from the status snapshot without extra I/O
- Template 2 (t=4s): "Getting everything ready for you..." loading
  indicator, published via tokio::join! alongside the LLM future
- LLM response: published when inference completes, opened directly
  with personalised setup content (no duplicate greeting)

`run_proactive_welcome` now fires three `ProactiveMessageRequested`
events rather than one. The two template helpers (`time_of_day_greeting`,
`build_template_greeting`) are pure functions covered by 6 new unit
tests. `prompt.md` gains a proactive-invocation section explaining that
greeting templates are pre-delivered and the agent must skip them.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

Warning

Rate limit exceeded

@M3gA-Mind has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 48 minutes and 21 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 48 minutes and 21 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b17df03c-4d76-47df-86a7-bdfacdd58ae4

📥 Commits

Reviewing files that changed from the base of the PR and between 7db7140 and 1cba66f.

📒 Files selected for processing (2)
  • src/openhuman/agent/agents/welcome/prompt.md
  • src/openhuman/agent/welcome_proactive.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@M3gA-Mind M3gA-Mind closed this Apr 16, 2026
oxoxDev pushed a commit to oxoxDev/openhuman that referenced this pull request Apr 20, 2026
…tinyhumansai#465)

Backend simplified billing model: fiveHourSpendUsd → cycleLimit5hr,
bypassRateLimit → bypassCycleLimit, removed dailyUsage and token
count fields. Updates all frontend consumers and mock API.
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.

1 participant