Skip to content

docs: let the Getting Started wizard compose a prompt (Ask AI / Copy prompt) - #306

Merged
antfu merged 4 commits into
mainfrom
docs/wizard-ask-ai
Aug 27, 2026
Merged

docs: let the Getting Started wizard compose a prompt (Ask AI / Copy prompt)#306
antfu merged 4 commits into
mainfrom
docs/wizard-ask-ai

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

Summary

Builds on the Getting Started wizard (#303): the user's selections now compose into a prompt, with two ways to act on it.

  • Ask AI — queues the composed prompt and opens the in-docs Ask AI assistant, which sends it and starts a chat. Because the assistant's chat state lives inside the layer's AssistantChat.vue, a shared useAssistantPrompt() state carries the prompt across; AssistantChat.vue is shadowed from the comark-docs layer to consume it (sends on open, then clears). The button is hidden when the assistant is disabled. Its prompt stays concise since the assistant already has the docs as search/read tools.
  • Copy prompt — copies a self-contained prompt for pasting into any external LLM: a short description of what Devframe is, the user's stated intent (their selections), and absolute links to every recommended doc, so a model with no Devframe context has everything it needs.

Both prompts fall back to a sensible "just getting started" phrasing when nothing is selected.

Notes

  • docs/app/components/AssistantChat.vue mirrors the comark-docs layer component verbatim and adds only the pending-prompt consumer; a header comment flags that it should track the layer on future bumps.

Verified in a local nuxt dev: Ask AI opens the panel and sends the composed prompt (the assistant then reads the matching pages), and Copy prompt produces the full contextual prompt with absolute doc URLs.

This PR was created with the help of an agent.

Compose the user's selections into a prompt and add two actions:
- Ask AI queues the prompt and opens the in-docs assistant, which sends it
  and starts a chat. A shared useAssistantPrompt() state carries the prompt;
  AssistantChat.vue is shadowed from the comark-docs layer to consume it.
- Copy prompt copies a self-contained prompt for any external LLM — a short
  Devframe description, the user's intent, and absolute links to every
  recommended doc.
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
devframe Ready Ready Preview Aug 27, 2026 6:58am

@antfu
antfu merged commit f808561 into main Aug 27, 2026
11 checks passed
@antfu
antfu deleted the docs/wizard-ask-ai branch August 27, 2026 07:02
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.

2 participants