Skip to content

Commit

Permalink
refactor(editor): make handleTextOrDiff and handleDefault methods public
Browse files Browse the repository at this point in the history
Make handleTextOrDiff and handleDefault methods public for accessibility and reusability.
  • Loading branch information
phodal committed Sep 23, 2024
1 parent 68e93e8 commit e3c6356
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/core/lib/editor/action/AiActionExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class AiActionExecutor {
this.editor.setEditable(true);
}

private async handleTextOrDiff(action: PromptAction, prompt: string): Promise<string | undefined> {
async handleTextOrDiff(action: PromptAction, prompt: string): Promise<string | undefined> {
this.editor.setEditable(false);

const response = await fetch(this.endpoint(action), {
Expand All @@ -98,7 +98,7 @@ export class AiActionExecutor {
return text;
}

private async handleDefault(action: PromptAction, prompt: string) {
async handleDefault(action: PromptAction, prompt: string) {
this.editor.setEditable(false);
const response = await fetch(this.endpoint(action), {
method: 'POST',
Expand Down

0 comments on commit e3c6356

Please sign in to comment.