From 1df4623d804fcbad0bfac1d52a9b5075c168559d Mon Sep 17 00:00:00 2001
From: MK
Date: Fri, 29 May 2026 14:45:23 +0800
Subject: [PATCH 1/2] feat(docs): add Copy Prompt button for AI assistants
Add a reusable `CopyPrompt` Vue component that copies a ready-made
getting-started prompt to the clipboard, similar to the button on
flueframework.com. The prompt introduces Vite+, points the agent at
https://viteplus.dev/llms-full.txt, and lists the install and core `vp`
commands.
The component is registered globally so any Markdown page can use it, and
is placed in the home-page hero CTA row and at the top of the Getting
Started guide.
Pointer clicks drop focus so the theme's outline-based `.button` border is
not stripped by the global `button:focus:not(:focus-visible)` reset (which
only affects real
diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts
index 9d50a93e76..f9644439ea 100644
--- a/docs/.vitepress/theme/index.ts
+++ b/docs/.vitepress/theme/index.ts
@@ -2,6 +2,7 @@
import BaseTheme from '@voidzero-dev/vitepress-theme/src/viteplus';
import type { Theme } from 'vitepress';
+import CopyPrompt from './components/CopyPrompt.vue';
import Layout from './Layout.vue';
import './styles.css';
import 'virtual:group-icons.css';
@@ -9,4 +10,8 @@ import 'virtual:group-icons.css';
export default {
extends: BaseTheme,
Layout,
+ enhanceApp({ app }) {
+ // Globally available so Markdown pages can use without an import.
+ app.component('CopyPrompt', CopyPrompt);
+ },
} satisfies Theme;
diff --git a/docs/guide/index.md b/docs/guide/index.md
index 5f50a38883..45b2c7f1e1 100644
--- a/docs/guide/index.md
+++ b/docs/guide/index.md
@@ -4,6 +4,10 @@ Vite+ is the unified toolchain and entry point for web development. It manages y
Vite+ ships in two parts: `vp`, the global command-line tool, and `vite-plus`, the local package installed in each project. If you already have a Vite project, use [`vp migrate`](/guide/migrate) to migrate it to Vite+, or paste our [migration prompt](/guide/migrate#migration-prompt) into your coding agent.
+Building with an AI assistant? Copy a ready-made setup prompt:
+
+
+
## Install `vp`
### macOS / Linux
From a31333f00d3fe8da99cdb72b892904390132099e Mon Sep 17 00:00:00 2001
From: MK
Date: Fri, 29 May 2026 14:54:02 +0800
Subject: [PATCH 2/2] style(docs): apply oxfmt formatting to CopyPrompt.vue
The pre-commit lint-staged glob excludes .vue files, so repo-wide
`vp check` flagged the unformatted icon ternary. Collapse it onto one
line as oxfmt expects.
---
docs/.vitepress/theme/components/CopyPrompt.vue | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/docs/.vitepress/theme/components/CopyPrompt.vue b/docs/.vitepress/theme/components/CopyPrompt.vue
index 0a7fd8d7ff..9eef3182e4 100644
--- a/docs/.vitepress/theme/components/CopyPrompt.vue
+++ b/docs/.vitepress/theme/components/CopyPrompt.vue
@@ -78,11 +78,7 @@ onBeforeUnmount(() => {
>