Skip to content

Commit 0b89d87

Browse files
authored
Merge pull request RooVetGit#1061 from RooVetGit/fix_copy_system_prompt
Copy the system prompt of the current mode
2 parents 89388e2 + 3524378 commit 0b89d87

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

webview-ui/src/components/prompts/PromptsView.tsx

+7-4
Original file line numberDiff line numberDiff line change
@@ -892,10 +892,13 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
892892
appearance="icon"
893893
title="Copy system prompt to clipboard"
894894
onClick={() => {
895-
vscode.postMessage({
896-
type: "copySystemPrompt",
897-
text: selectedPromptContent,
898-
})
895+
const currentMode = getCurrentMode()
896+
if (currentMode) {
897+
vscode.postMessage({
898+
type: "copySystemPrompt",
899+
mode: currentMode.slug,
900+
})
901+
}
899902
}}
900903
data-testid="copy-prompt-button">
901904
<span className="codicon codicon-copy"></span>

0 commit comments

Comments
 (0)