Просмотр исходного кода

Copy the system prompt of the current mode

Matt Rubens 10 месяцев назад
Родитель
Сommit
3524378bf2
1 измененных файлов с 7 добавлено и 4 удалено
  1. 7 4
      webview-ui/src/components/prompts/PromptsView.tsx

+ 7 - 4
webview-ui/src/components/prompts/PromptsView.tsx

@@ -892,10 +892,13 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
 							appearance="icon"
 							title="Copy system prompt to clipboard"
 							onClick={() => {
-								vscode.postMessage({
-									type: "copySystemPrompt",
-									text: selectedPromptContent,
-								})
+								const currentMode = getCurrentMode()
+								if (currentMode) {
+									vscode.postMessage({
+										type: "copySystemPrompt",
+										mode: currentMode.slug,
+									})
+								}
 							}}
 							data-testid="copy-prompt-button">
 							<span className="codicon codicon-copy"></span>