Skip to content

feat: GenAI Shortcuts for PromptInput#4107

Open
ernst-dev wants to merge 54 commits intomainfrom
dev-v3-ernstka-shortcuts
Open

feat: GenAI Shortcuts for PromptInput#4107
ernst-dev wants to merge 54 commits intomainfrom
dev-v3-ernstka-shortcuts

Conversation

@ernst-dev
Copy link
Copy Markdown
Member

@ernst-dev ernst-dev commented Dec 12, 2025

Description

Adds shortcuts features to PromptInput:

  • Underlying input becomes a div with contenteditable enabled to allow rendering custom elements
  • Adds menu system to attach to triggers with filters @ or /
  • Complex rendering logic to ensure cross-browser consistency
  • Reference representation through inline Token elements

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ernst-dev ernst-dev force-pushed the dev-v3-ernstka-shortcuts branch from cb759ce to 5e2c3a3 Compare February 18, 2026 17:30
@mxschll mxschll self-requested a review February 20, 2026 17:43
@ernst-dev ernst-dev force-pushed the dev-v3-ernstka-shortcuts branch from b3fa438 to 3f4d535 Compare February 26, 2026 15:14
@ernst-dev ernst-dev marked this pull request as ready for review February 26, 2026 15:32
@ernst-dev ernst-dev requested a review from a team as a code owner February 26, 2026 15:32
@ernst-dev ernst-dev force-pushed the dev-v3-ernstka-shortcuts branch from 3f4d535 to 9f0faad Compare February 26, 2026 15:35
@gethinwebster gethinwebster removed the request for review from a team February 27, 2026 09:13
@ernst-dev ernst-dev force-pushed the dev-v3-ernstka-shortcuts branch from 69b458f to d2ebfd6 Compare March 6, 2026 09:01
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 96.40174% with 91 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.35%. Comparing base (a6cdcd0) to head (392a014).

Files with missing lines Patch % Lines
src/prompt-input/tokens/use-token-mode.ts 92.09% 43 Missing ⚠️
src/prompt-input/core/event-handlers.ts 96.27% 17 Missing ⚠️
src/prompt-input/core/caret-controller.ts 95.62% 16 Missing ⚠️
src/prompt-input/internal.tsx 95.68% 5 Missing ⚠️
src/prompt-input/components/token-mode.tsx 90.62% 3 Missing ⚠️
src/prompt-input/core/dom-utils.ts 98.27% 2 Missing ⚠️
src/prompt-input/core/trigger-utils.ts 98.56% 2 Missing ⚠️
src/prompt-input/components/menu-dropdown.tsx 94.44% 1 Missing ⚠️
src/prompt-input/core/token-utils.ts 99.28% 1 Missing ⚠️
...prompt-input/utils/insert-text-content-editable.ts 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4107      +/-   ##
==========================================
- Coverage   97.45%   97.35%   -0.10%     
==========================================
  Files         909      925      +16     
  Lines       26637    29116    +2479     
  Branches     9614    10530     +916     
==========================================
+ Hits        25958    28346    +2388     
- Misses        673      764      +91     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ernst-dev ernst-dev force-pushed the dev-v3-ernstka-shortcuts branch from d7e193a to 7c9cae2 Compare March 12, 2026 17:11
@ernst-dev ernst-dev force-pushed the dev-v3-ernstka-shortcuts branch from 3d5686c to 992d693 Compare March 25, 2026 18:27
"i18nStrings.datePlaceholder": "GG/MM/AAAA",
"i18nStrings.isoDatePlaceholder": "AAAA-MM-GG",
"i18nStrings.slashedDatePlaceholder": "AAAA/MM/GG",
"i18nStrings.isoDatePlaceholder": "GG-MM-AAAA",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These two strings should not change. Instead, i18nStrings.datePlaceholder should be changed to AAAA/MM/GG

"i18nStrings.datePlaceholder": "JJ/MM/AAAA",
"i18nStrings.isoDatePlaceholder": "AAAA-MM-JJ",
"i18nStrings.slashedDatePlaceholder": "AAAA/MM/JJ",
"i18nStrings.isoDatePlaceholder": "JJ-MM-AAAA",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same as in Italian, these two strings should not have been change, it is the previous one that was wrong.

We can address existing issues separately but let's not introduce regressions.

"i18nStrings.datePlaceholder": "DD/MM/YYYY",
"i18nStrings.isoDatePlaceholder": "YYYY-MM-DD",
"i18nStrings.slashedDatePlaceholder": "YYYY/MM/DD",
"i18nStrings.isoDatePlaceholder": "DD-MM-YYYY",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Similar feedback here as with French and Italian below

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.

4 participants