From fc1d6985c9eb0c31b8ea05244e4a270d9ec8ffaa Mon Sep 17 00:00:00 2001 From: gixita Date: Thu, 8 Feb 2024 17:12:12 +0100 Subject: feat: Add custom prompt functionality to block This commit introduces the capability for users to apply custom prompts defined in the configuration to a block. Key changes include: - A new configuration string to store the custom prompt. - A menu item 'Custom prompt on block'. - Implementation of a function to apply the custom prompt to a block, mirroring the existing 'summarize block' functionality. --- src/main.tsx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main.tsx') diff --git a/src/main.tsx b/src/main.tsx index a78d85d..a544760 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -36,6 +36,13 @@ let settings: SettingSchemaDesc[] = [ description: "Shortcut to open plugin command pallete", default: "mod+shift+o" }, + { + key: "custom_prompt_block", + type: "string", + title: "Custom prompt block", + description: "Define your custom prompt and use a block as context", + default: "Translate in French : " + }, ] -- cgit v1.2.3 From fe8403156aa664c8fb203bddc243eb6fc4448b1a Mon Sep 17 00:00:00 2001 From: gixita Date: Sat, 10 Feb 2024 15:03:39 +0100 Subject: Move the custom prompt trigger on the block command --- src/main.tsx | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/main.tsx') diff --git a/src/main.tsx b/src/main.tsx index a544760..a78d85d 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -36,13 +36,6 @@ let settings: SettingSchemaDesc[] = [ description: "Shortcut to open plugin command pallete", default: "mod+shift+o" }, - { - key: "custom_prompt_block", - type: "string", - title: "Custom prompt block", - description: "Define your custom prompt and use a block as context", - default: "Translate in French : " - }, ] -- cgit v1.2.3 From f07b00c527db2947f49d4ea592018902d391d55f Mon Sep 17 00:00:00 2001 From: gixita Date: Sat, 10 Feb 2024 15:11:39 +0100 Subject: Add a custom prompt configuration field in the plugin settings --- src/main.tsx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main.tsx') diff --git a/src/main.tsx b/src/main.tsx index a78d85d..a544760 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -36,6 +36,13 @@ let settings: SettingSchemaDesc[] = [ description: "Shortcut to open plugin command pallete", default: "mod+shift+o" }, + { + key: "custom_prompt_block", + type: "string", + title: "Custom prompt block", + description: "Define your custom prompt and use a block as context", + default: "Translate in French : " + }, ] -- cgit v1.2.3