Skip to content

feat(ProsePrompt): new component#6362

Merged
benjamincanac merged 8 commits intov4from
feat/prose-prompt
Apr 17, 2026
Merged

feat(ProsePrompt): new component#6362
benjamincanac merged 8 commits intov4from
feat/prose-prompt

Conversation

@benjamincanac
Copy link
Copy Markdown
Member

@benjamincanac benjamincanac commented Apr 17, 2026

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

CleanShot 2026-04-17 at 15 35 20@2x

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@github-actions github-actions Bot added the v4 #4488 label Apr 17, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cbc2c2d7-d7c8-4a98-ae37-c82a35dfbbc7

📥 Commits

Reviewing files that changed from the base of the PR and between e5259a8 and bf089f1.

⛔ Files ignored due to path filters (1)
  • docs/app/assets/icons/cursor.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • docs/content/docs/1.getting-started/7.ai/1.mcp.md
  • docs/content/docs/1.getting-started/7.ai/3.skills.md
✅ Files skipped from review due to trivial changes (2)
  • docs/content/docs/1.getting-started/7.ai/1.mcp.md
  • docs/content/docs/1.getting-started/7.ai/3.skills.md

📝 Walkthrough

Walkthrough

Adds a new Prose "Prompt" component (src/runtime/components/prose/Prompt.vue) with typed props (description, icon, actions, class, ui), slot support, clipboard copy and deep-link actions (cursor:// and windsurf://). Registers the component in the module mapping (src/module.ts), adds theme support (src/theme/prose/prompt.ts, exported via src/theme/prose/index.ts), and re-exports the component types (src/runtime/types/prose.ts). Introduces new documentation (prompt page and expanded callout examples), a minor callout icon spacing tweak, and adds prose.pre.prompt localization strings across many locale files plus the locale type update (src/runtime/types/locale.ts).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main feature being added: a new ProsePrompt component.
Description check ✅ Passed The description includes a visual example of the new ProsePrompt component in action, demonstrating the feature's functionality with the UI and required implementation details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/prose-prompt

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (4)
src/runtime/locale/en.ts (1)

123-127: Nit: chatReasoning ordering inconsistent with other locales.

In other locale files (e.g., vi.ts, hi.ts, bg.ts), chatReasoning is grouped with the other chat* entries near the top. Here it sits after prose. No functional impact — just a consistency nit for future maintenance.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/runtime/locale/en.ts` around lines 123 - 127, Move the chatReasoning
block so it sits with the other chat* entries near the top of the locale file
(instead of after prose) to match the ordering used in vi.ts, hi.ts, and bg.ts;
locate the chatReasoning identifier and relocate its object (thinking, thought,
thoughtFor) into the same group as chatPrompt, chatPlaceholder, chatEmpty, etc.,
preserving keys and values for consistency.
src/runtime/locale/uz.ts (1)

123-126: LGTM!

Uzbek translations for the new prose.prompt keys look correct.

Nit (optional): In Uzbek, the locative suffix -da is typically attached directly to the noun (e.g., {name}da ochish) rather than separated by a space. Since {name} is a dynamic token (e.g., "Cursor"/"Windsurf"), either form is acceptable — feel free to disregard.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/runtime/locale/uz.ts` around lines 123 - 126, The translation for
prompt.openIn currently uses a space before the locative suffix ("{name} da
ochish"); update the string in src/runtime/locale/uz.ts by removing the space so
the dynamic token and suffix are attached ("{name}da ochish") to match Uzbek
locative usage—locate the prompt object (prompt.openIn) and change its value
accordingly.
src/runtime/locale/pt.ts (1)

123-126: Minor: consider preposition contraction for openIn.

In Portuguese, IDE names are often used with the contracted article (e.g., "Abrir no Cursor" works, but "Abrir no Windsurf" is fine too). Since {name} is interpolated and the gender/article varies per IDE, the current 'Abrir no {name}' may read awkwardly for some names. A neutral alternative is 'Abrir em {name}', which avoids article/gender mismatches across different IDE names.

Optional fix
       prompt: {
         copy: 'Copiar prompt',
-        openIn: 'Abrir no {name}'
+        openIn: 'Abrir em {name}'
       }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/runtime/locale/pt.ts` around lines 123 - 126, The Portuguese locale
string prompt.openIn currently uses "Abrir no {name}", which can produce awkward
gender/article matches for different IDE names; update the value of
prompt.openIn in src runtime locale (the prompt object) to a neutral form such
as "Abrir em {name}" so the interpolated {name} reads correctly across IDEs.
src/runtime/components/prose/Prompt.vue (1)

10-19: Align @defaultValue documentation format.

@defaultValue '["copy"]' with outer single quotes is inconsistent with other components (e.g., ContentSearchButton.vue uses @defaultValue ['meta', 'k']). Remove the outer quotes to match the pattern used throughout the codebase.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/runtime/components/prose/Prompt.vue` around lines 10 - 19, The JSDoc for
the actions prop in the ProsePromptProps interface uses inconsistent quoting:
change the annotation on the actions property from `@defaultValue` '["copy"]' to
`@defaultValue` ['copy'] so it matches the project's JSDoc style (edit the comment
above the actions field in the ProsePromptProps declaration).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/runtime/components/prose/Prompt.vue`:
- Around line 61-73: The deep-link handlers openInCursor and openInWindsurf
currently call window.open with custom-protocol URLs and can silently fail if
the protocol isn't registered; modify these functions to perform the open
attempt but also detect failure and show a user-visible fallback (toast/modal)
and/or documentation link: invoke the URL (via location.href or a clicked
anchor) then start a short timeout (e.g., 1–2s) that is cleared if the page
unloads or document.visibilityState changes, and if the timeout fires show a
toast explaining "Cursor/Windsurf not installed" with next steps; also add a
brief note in the UI/docs about the prerequisite and ensure getPromptText() is
still used to populate the URL.
- Around line 76-115: Add missing data-slot attributes to the template elements
in Prompt.vue: add data-slot="root" on the root <div> (the one using ui.root),
data-slot="icon" on the <UIcon> element, data-slot="content" on the <div> using
ui.content, data-slot="description" on the <p> that shows description, and
data-slot="actions" on the <div> using ui.actions; keep existing bindings and
props (ui.root/ui.icon/ui.content/ui.actions, icon, description, actions, and
methods copyPrompt/openInCursor/openInWindsurf) unchanged, only insert the
corresponding data-slot="..." attributes.

In `@src/runtime/locale/eu.ts`:
- Around line 123-126: The string for prompt.copy in the locale object is likely
a mistranslation (it reads like "copy the invitation"); update the value of
prompt.copy in eu.ts to a more accurate Basque term for an AI/LLM prompt such as
"Kopiatu galdera" or "Kopiatu agindua" (or keep "Kopiatu prompt" if you prefer
the loanword), leaving prompt.openIn unchanged; locate the prompt object and
replace the copy property value accordingly.

In `@src/runtime/locale/hy.ts`:
- Around line 123-126: Replace the corrupted Armenian string assigned to the
prompt.copy key in hy.ts (the prompt object) with a proper Armenian translation
for the "copy" label; remove the English "delays delaysdelays" fragment, ensure
the new value is valid UTF-8 Armenian text, and confirm the exact wording with a
native speaker before committing.

---

Nitpick comments:
In `@src/runtime/components/prose/Prompt.vue`:
- Around line 10-19: The JSDoc for the actions prop in the ProsePromptProps
interface uses inconsistent quoting: change the annotation on the actions
property from `@defaultValue` '["copy"]' to `@defaultValue` ['copy'] so it matches
the project's JSDoc style (edit the comment above the actions field in the
ProsePromptProps declaration).

In `@src/runtime/locale/en.ts`:
- Around line 123-127: Move the chatReasoning block so it sits with the other
chat* entries near the top of the locale file (instead of after prose) to match
the ordering used in vi.ts, hi.ts, and bg.ts; locate the chatReasoning
identifier and relocate its object (thinking, thought, thoughtFor) into the same
group as chatPrompt, chatPlaceholder, chatEmpty, etc., preserving keys and
values for consistency.

In `@src/runtime/locale/pt.ts`:
- Around line 123-126: The Portuguese locale string prompt.openIn currently uses
"Abrir no {name}", which can produce awkward gender/article matches for
different IDE names; update the value of prompt.openIn in src runtime locale
(the prompt object) to a neutral form such as "Abrir em {name}" so the
interpolated {name} reads correctly across IDEs.

In `@src/runtime/locale/uz.ts`:
- Around line 123-126: The translation for prompt.openIn currently uses a space
before the locative suffix ("{name} da ochish"); update the string in
src/runtime/locale/uz.ts by removing the space so the dynamic token and suffix
are attached ("{name}da ochish") to match Uzbek locative usage—locate the prompt
object (prompt.openIn) and change its value accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9ca8885c-dae4-45dc-baa1-6376a99cdef7

📥 Commits

Reviewing files that changed from the base of the PR and between 4ebdb2f and f32f960.

📒 Files selected for processing (69)
  • docs/content/docs/4.typography/callout.md
  • docs/content/docs/4.typography/prompt.md
  • src/module.ts
  • src/runtime/components/prose/Prompt.vue
  • src/runtime/locale/ar.ts
  • src/runtime/locale/az.ts
  • src/runtime/locale/be.ts
  • src/runtime/locale/bg.ts
  • src/runtime/locale/bn.ts
  • src/runtime/locale/ca.ts
  • src/runtime/locale/ckb.ts
  • src/runtime/locale/cs.ts
  • src/runtime/locale/da.ts
  • src/runtime/locale/de.ts
  • src/runtime/locale/de_ch.ts
  • src/runtime/locale/el.ts
  • src/runtime/locale/en.ts
  • src/runtime/locale/es.ts
  • src/runtime/locale/et.ts
  • src/runtime/locale/eu.ts
  • src/runtime/locale/fa_ir.ts
  • src/runtime/locale/fi.ts
  • src/runtime/locale/fr.ts
  • src/runtime/locale/gl.ts
  • src/runtime/locale/he.ts
  • src/runtime/locale/hi.ts
  • src/runtime/locale/hr.ts
  • src/runtime/locale/hu.ts
  • src/runtime/locale/hy.ts
  • src/runtime/locale/id.ts
  • src/runtime/locale/is.ts
  • src/runtime/locale/it.ts
  • src/runtime/locale/ja.ts
  • src/runtime/locale/ka.ts
  • src/runtime/locale/kk.ts
  • src/runtime/locale/km.ts
  • src/runtime/locale/ko.ts
  • src/runtime/locale/ky.ts
  • src/runtime/locale/lb.ts
  • src/runtime/locale/lo.ts
  • src/runtime/locale/lt.ts
  • src/runtime/locale/mn.ts
  • src/runtime/locale/ms.ts
  • src/runtime/locale/nb_no.ts
  • src/runtime/locale/nl.ts
  • src/runtime/locale/pl.ts
  • src/runtime/locale/pt.ts
  • src/runtime/locale/pt_br.ts
  • src/runtime/locale/ro.ts
  • src/runtime/locale/ru.ts
  • src/runtime/locale/sk.ts
  • src/runtime/locale/sl.ts
  • src/runtime/locale/sq.ts
  • src/runtime/locale/sv.ts
  • src/runtime/locale/th.ts
  • src/runtime/locale/tj.ts
  • src/runtime/locale/tr.ts
  • src/runtime/locale/ug_cn.ts
  • src/runtime/locale/uk.ts
  • src/runtime/locale/ur.ts
  • src/runtime/locale/uz.ts
  • src/runtime/locale/vi.ts
  • src/runtime/locale/zh_cn.ts
  • src/runtime/locale/zh_tw.ts
  • src/runtime/types/locale.ts
  • src/runtime/types/prose.ts
  • src/theme/prose/callout.ts
  • src/theme/prose/index.ts
  • src/theme/prose/prompt.ts

Comment thread src/runtime/components/prose/Prompt.vue
Comment thread src/runtime/components/prose/Prompt.vue
Comment thread src/runtime/locale/eu.ts
Comment thread src/runtime/locale/hy.ts
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 17, 2026

npm i https://pkg.pr.new/@nuxt/ui@6362

commit: bf089f1

@benjamincanac benjamincanac merged commit 2451ac6 into v4 Apr 17, 2026
22 checks passed
@benjamincanac benjamincanac deleted the feat/prose-prompt branch April 17, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant