Skip to content

Commit

Permalink
feat
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Dec 23, 2024
1 parent 68d3c84 commit 8921378
Show file tree
Hide file tree
Showing 29 changed files with 569 additions and 244 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

apps/www/src/app/api/ai

**/tsconfig.tsbuildinfo

.yarn/*
Expand Down
2 changes: 1 addition & 1 deletion apps/www/content/docs/ai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ docs:

- Combobox menu with predefined commands:
- Generate: continue writing, add summary, explain
- Edit: improve writing, make it longer or shorter, fix spelling & grammar, simplify language
- Edit: improve writing, emojify, make it longer or shorter, fix spelling & grammar, simplify language
- Three trigger modes:
- Cursor mode: trigger at block end
- Selection mode: trigger with selected text
Expand Down
10 changes: 10 additions & 0 deletions apps/www/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ const nextConfig = async (phase: string) => {
// https://nextjs.org/docs/api-reference/next.config.js/react-strict-mod
reactStrictMode: true,

// eslint-disable-next-line @typescript-eslint/require-await
async rewrites() {
return [
{
destination: '/:path*?locale=cn', // Rewrite it to the corresponding path without /cn
source: '/cn/:path*', // Match any path under /cn
},
];
},

// typescript: {
// ignoreBuildErrors: true,
// },
Expand Down
2 changes: 1 addition & 1 deletion apps/www/public/r/styles/default/ai-demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"type": "registry:example"
},
{
"content": "import { jsx } from '@udecode/plate-test-utils';\n\njsx;\n\nexport const aiValue: any = (\n <fragment>\n <hh2>AI Menu</hh2>\n <hp>Generate and refine content with AI.</hp>\n <hp>Access the AI menu in many ways:</hp>\n <hp indent={1} listStyleType=\"decimal\">\n <htext>Press \"⌘ + J\".</htext>\n </hp>\n <hp indent={1} listStart={2} listStyleType=\"decimal\">\n <htext>Select text and click \"Ask AI\" in the floating toolbar</htext>\n </hp>\n <hp indent={1} listStart={3} listStyleType=\"decimal\">\n <htext>Right-click a block and select \"Ask AI\"</htext>\n </hp>\n <hp indent={1} listStart={4} listStyleType=\"decimal\">\n <htext>Press space in an empty block. Try it out:</htext>\n </hp>\n <hp indent={2} listStyleType=\"disc\">\n <htext />\n </hp>\n <hp>Once opened, you can:</hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Search commands in the input field:</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Use arrow keys to navigate, Enter to select</htext>\n </hp>\n <hp>\n <htext>Generating commands:</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Continue writing</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Add a summary</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Explain</htext>\n </hp>\n <hp>\n <htext>Generating suggestions:</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Accept</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Discard</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Try again</htext>\n </hp>\n <hp>\n <htext>Editing commands:</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Improve writing</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Make it longer or shorter</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Fix spelling & grammar</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Simplify language</htext>\n </hp>\n <hp>Editing suggestions:</hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Replace the selection</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Insert below</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Discard</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Try again</htext>\n </hp>\n <hp>\n <htext>Note: chat history is preserved until the menu is closed.</htext>\n </hp>\n </fragment>\n);\n",
"content": "import { jsx } from '@udecode/plate-test-utils';\n\njsx;\n\nexport const aiValue: any = (\n <fragment>\n <hh2>AI Menu</hh2>\n <hp>Generate and refine content with AI.</hp>\n <hp>Access the AI menu in many ways:</hp>\n <hp indent={1} listStyleType=\"decimal\">\n <htext>Press \"⌘ + J\".</htext>\n </hp>\n <hp indent={1} listStart={2} listStyleType=\"decimal\">\n <htext>Select text and click \"Ask AI\" in the floating toolbar</htext>\n </hp>\n <hp indent={1} listStart={3} listStyleType=\"decimal\">\n <htext>Right-click a block and select \"Ask AI\"</htext>\n </hp>\n <hp indent={1} listStart={4} listStyleType=\"decimal\">\n <htext>Press space in an empty block. Try it out:</htext>\n </hp>\n <hp indent={2} listStyleType=\"disc\">\n <htext />\n </hp>\n <hp>Once opened, you can:</hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Search commands in the input field:</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Use arrow keys to navigate, Enter to select</htext>\n </hp>\n <hp>\n <htext>Generating commands:</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Continue writing</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Add a summary</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Explain</htext>\n </hp>\n <hp>\n <htext>Generating suggestions:</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Accept</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Discard</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Try again</htext>\n </hp>\n <hp>\n <htext>Editing commands:</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Improve writing</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Emojify</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Make it longer or shorter</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Fix spelling & grammar</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Simplify language</htext>\n </hp>\n <hp>Editing suggestions:</hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Replace the selection</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Insert below</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Discard</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Try again</htext>\n </hp>\n <hp>\n <htext>Note: chat history is preserved until the menu is closed.</htext>\n </hp>\n </fragment>\n);\n",
"path": "example/values/ai-value.tsx",
"target": "components/ai-value.tsx",
"type": "registry:example"
Expand Down
Loading

0 comments on commit 8921378

Please sign in to comment.