diff --git a/source/OpenAIChat.popclipext/Config.ts b/source/OpenAIChat.popclipext/Config.ts index 84c6839e..7b415346 100644 --- a/source/OpenAIChat.popclipext/Config.ts +++ b/source/OpenAIChat.popclipext/Config.ts @@ -47,6 +47,13 @@ export const options = [ "Reset the conversation if idle for this many minutes. Set blank to disable.", defaultValue: "15", }, + { + identifier: "replaceMessage", + label: "Replace the message.", + type: "boolean", + description: "Replace the original message with the polished texts.", + defaultValue: false, + }, { identifier: "showReset", label: "Show Reset Button", @@ -127,10 +134,10 @@ const chat: ActionFunction = async (input, options) => { messages.push(data.choices[0].message); lastChat = new Date(); - // if holding shift and option, paste just the response. + // if holding shift and option or selected replaceMessage option, paste just the response. // if holding shift, copy just the response. // else, paste the last input and response. - if (popclip.modifiers.shift && popclip.modifiers.option) { + if ((popclip.modifiers.shift && popclip.modifiers.option) || options.replaceMessage) { popclip.pasteText(getTranscript(1)); } else if (popclip.modifiers.shift) { popclip.copyText(getTranscript(1));