Skip to content

Commit

Permalink
refactor(editor): rename prompt action arrays
Browse files Browse the repository at this point in the history
Renamed ToolbarMenu, BubbleMenu, and SlashCommands to ToolbarMenuPrompts, BubbleMenuPrompts, and SlashCommandsPrompts for clarity and consistency. Removed unused backgroundContext property from PromptsManager.
  • Loading branch information
phodal committed Sep 23, 2024
1 parent 7d5a027 commit 8673551
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions web/core/lib/editor/prompts/prompts-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { TypeOptions } from "@/editor/defs/type-options.type";
import RequirementsPrompts from "@/editor/prompts/requirements-prompts";

export class PromptsManager {
private backgroundContext: string = "";

private constructor() {
}

Expand Down
12 changes: 6 additions & 6 deletions web/core/lib/editor/prompts/requirements-prompts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChangeForm, DefinedVariable, FacetType, OutputForm, PromptAction } from "@/editor/defs/custom-action.type";

const ToolbarMenu: PromptAction[] = [
const ToolbarMenuPrompts: PromptAction[] = [
{
name: 'Generate Requirements',
i18Name: true,
Expand All @@ -10,7 +10,7 @@ const ToolbarMenu: PromptAction[] = [
}
];

const BubbleMenu: PromptAction[] = [
const BubbleMenuPrompts: PromptAction[] = [
{
name: '细化需求',
i18Name: true,
Expand All @@ -28,7 +28,7 @@ const BubbleMenu: PromptAction[] = [
}
];

const SlashCommands: PromptAction[] = [
const SlashCommandsPrompts: PromptAction[] = [
{
name: '需求细化',
i18Name: true,
Expand Down Expand Up @@ -70,9 +70,9 @@ const SlashCommands: PromptAction[] = [
]

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

export default RequirementsPrompts;

0 comments on commit 8673551

Please sign in to comment.