Skip to content

Commit

Permalink
feat(editor): add new prompts for toolbar, bubble menu, and slash com…
Browse files Browse the repository at this point in the history
…mands

- Added new prompts for toolbar, bubble menu, and slash commands in the editor.
- Exported these prompts for easier access and integration.
  • Loading branch information
phodal committed Sep 23, 2024
1 parent b07d350 commit 68e93e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 7 additions & 7 deletions web/core/lib/editor/prompts/article-prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
PromptAction,
} from "@/editor/defs/custom-action.type";

const ToolbarMenu: PromptAction[] = [
export const ToolbarMenuPrompts: PromptAction[] = [
{
name: 'Generate Outline',
i18Name: true,
Expand Down Expand Up @@ -38,7 +38,7 @@ const ToolbarMenu: PromptAction[] = [
},
];

const BubbleMenu: PromptAction[] = [
export const BubbleMenuPrompts: PromptAction[] = [
{
name: 'Polish',
i18Name: true,
Expand Down Expand Up @@ -71,7 +71,7 @@ const BubbleMenu: PromptAction[] = [
}
];

const SlashCommands: PromptAction[] = [
export const SlashCommandsPrompts: PromptAction[] = [
{
name: 'Summarize',
i18Name: true,
Expand All @@ -96,9 +96,9 @@ const SlashCommands: PromptAction[] = [
]

const ArticlePrompts: PromptAction[] = [
ToolbarMenu,
BubbleMenu,
SlashCommands
ToolbarMenuPrompts,
BubbleMenuPrompts,
SlashCommandsPrompts
].flat();

export default ArticlePrompts;
export default ArticlePrompts;
3 changes: 3 additions & 0 deletions web/core/lib/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ export { AiActionExecutor } from '@/editor/action/AiActionExecutor.ts';
export { OutputForm } from '@/editor/defs/custom-action.type';
export { actionPosition, PromptCompiler } from '@/editor/action/PromptCompiler';
export { BuiltinFunctionExecutor } from '@/editor/action/BuiltinFunctionExecutor';
export {
default as ArticlePrompts, ToolbarMenuPrompts, BubbleMenuPrompts, SlashCommandsPrompts
} from '@/editor/prompts/article-prompts';

0 comments on commit 68e93e8

Please sign in to comment.