Skip to content

feat(chat): AI-powered thread quick actions (starter suggestions)#3363

Open
rafavalls wants to merge 2 commits into
mainfrom
rafavalls/thread-quick-actions
Open

feat(chat): AI-powered thread quick actions (starter suggestions)#3363
rafavalls wants to merge 2 commits into
mainfrom
rafavalls/thread-quick-actions

Conversation

@rafavalls
Copy link
Copy Markdown
Collaborator

@rafavalls rafavalls commented May 14, 2026

What is this contribution about?

Adds contextual starter suggestions to the chat UI — 3 short, agent-specific questions generated by the configured LLM based on the agent's description and instructions. Suggestions appear in the empty-state sidebar before the first message and as quick-action chips after each assistant response.

New pieces:

  • POST /api/:org/decopilot/agent-suggestions — endpoint that calls the LLM to generate suggestions
  • suggestions-generator.ts — LLM utility (same pattern as title generation)
  • thread-suggestions.tsxThreadSuggestions (base UI) and AfterMessageSuggestions (post-message variant)
  • use-agent-suggestions.ts — React Query hook, fetches once and caches indefinitely per agent

Screenshots/Demonstration

UI shows pill-style suggestion chips with a CornerDownRight icon; clicking one sends the message immediately.

How to Test

  1. Open an agent chat with a configured AI provider
  2. On the empty state, starter suggestions should appear below the ice breakers
  3. After the agent replies, the same suggestions should appear below the last message
  4. Clicking a suggestion sends it as a new message
  5. Suggestions are not shown while the agent is streaming or has a pending approval

Migration Notes

No migrations needed.

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working
  • Documentation is updated (if needed)
  • No breaking changes

Summary by cubic

Adds agent‑specific starter suggestions to the chat to speed up first asks and follow‑ups. Three short prompts are generated from the agent description and shown in the empty state and after each assistant reply; clicking one sends it. Suggestions now animate in with a subtle, staggered fade‑in.

  • New Features
    • API: POST /api/:org/decopilot/agent-suggestions generates 3 suggestions from the configured model and agent description; returns an empty list when models/provider are unavailable. Uses suggestions-generator.ts.
    • UI: ThreadSuggestions and AfterMessageSuggestions render pill chips in the sidebar (below ice breakers) and below the last message; hidden while streaming or when approvals are pending. Adds 200ms fade-in + slide-up animation, staggered by 60ms, respecting reduced motion.
    • Data: use-agent-suggestions React Query hook fetches once and caches indefinitely per agent; added query key in query-keys.ts.

Written for commit 4fc96ef. Summary will update on new commits.

Generates 3 contextual starter questions per agent using the configured
LLM, shown both in the empty-state sidebar and after each assistant
message. Suggestions are fetched once and cached indefinitely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Release Options

Suggested: Minor (2.326.0) — based on feat: prefix

React with an emoji to override the release type:

Reaction Type Next Version
👍 Prerelease 2.325.1-alpha.1
🎉 Patch 2.325.1
❤️ Minor 2.326.0
🚀 Major 3.0.0

Current version: 2.325.0

Note: If multiple reactions exist, the smallest bump wins. If no reactions, the suggested bump is used (default: patch).

Each suggestion fades in + slides up subtly (200ms ease-out),
staggered 60ms apart. Respects prefers-reduced-motion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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