|
|
@@ -1,6 +1,6 @@
|
|
|
import React, { useState, useEffect, useMemo, useCallback, useRef } from "react"
|
|
|
import { Button } from "@/components/ui/button"
|
|
|
-import { VSCodeCheckbox, VSCodeRadioGroup, VSCodeRadio } from "@vscode/webview-ui-toolkit/react"
|
|
|
+import { VSCodeCheckbox, VSCodeRadioGroup, VSCodeRadio, VSCodeTextArea } from "@vscode/webview-ui-toolkit/react"
|
|
|
|
|
|
import { useExtensionState } from "@src/context/ExtensionStateContext"
|
|
|
import {
|
|
|
@@ -27,7 +27,6 @@ import {
|
|
|
SelectItem,
|
|
|
SelectTrigger,
|
|
|
SelectValue,
|
|
|
- Textarea,
|
|
|
Popover,
|
|
|
PopoverContent,
|
|
|
PopoverTrigger,
|
|
|
@@ -666,7 +665,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
|
|
|
<div className="text-sm text-vscode-descriptionForeground mb-2">
|
|
|
{t("prompts:roleDefinition.description")}
|
|
|
</div>
|
|
|
- <Textarea
|
|
|
+ <VSCodeTextArea
|
|
|
value={(() => {
|
|
|
const customMode = findModeBySlug(visualMode, customModes)
|
|
|
const prompt = customModePrompts?.[visualMode] as PromptComponent
|
|
|
@@ -848,7 +847,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
|
|
|
modeName: getCurrentMode()?.name || "Code",
|
|
|
})}
|
|
|
</div>
|
|
|
- <Textarea
|
|
|
+ <VSCodeTextArea
|
|
|
value={(() => {
|
|
|
const customMode = findModeBySlug(visualMode, customModes)
|
|
|
const prompt = customModePrompts?.[visualMode] as PromptComponent
|
|
|
@@ -1002,7 +1001,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
|
|
|
language: i18next.language,
|
|
|
})}
|
|
|
</div>
|
|
|
- <Textarea
|
|
|
+ <VSCodeTextArea
|
|
|
value={customInstructions}
|
|
|
onChange={(e) => {
|
|
|
const value =
|
|
|
@@ -1080,7 +1079,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
|
|
|
</Button>
|
|
|
</div>
|
|
|
|
|
|
- <Textarea
|
|
|
+ <VSCodeTextArea
|
|
|
value={getSupportPromptValue(activeSupportOption)}
|
|
|
onChange={(e) => {
|
|
|
const value =
|
|
|
@@ -1140,7 +1139,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
|
|
|
</div>
|
|
|
|
|
|
<div className="mt-4">
|
|
|
- <Textarea
|
|
|
+ <VSCodeTextArea
|
|
|
value={testPrompt}
|
|
|
onChange={(e) => setTestPrompt((e.target as HTMLTextAreaElement).value)}
|
|
|
placeholder={t("prompts:supportPrompts.enhance.testPromptPlaceholder")}
|
|
|
@@ -1245,10 +1244,10 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
|
|
|
}}>
|
|
|
{t("prompts:createModeDialog.roleDefinition.description")}
|
|
|
</div>
|
|
|
- <Textarea
|
|
|
+ <VSCodeTextArea
|
|
|
value={newModeRoleDefinition}
|
|
|
onChange={(e) => {
|
|
|
- setNewModeRoleDefinition(e.target.value)
|
|
|
+ setNewModeRoleDefinition((e.target as HTMLTextAreaElement).value)
|
|
|
}}
|
|
|
rows={4}
|
|
|
className="w-full resize-y"
|
|
|
@@ -1296,10 +1295,10 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
|
|
|
<div className="text-[13px] text-vscode-descriptionForeground mb-2">
|
|
|
{t("prompts:createModeDialog.customInstructions.description")}
|
|
|
</div>
|
|
|
- <Textarea
|
|
|
+ <VSCodeTextArea
|
|
|
value={newModeCustomInstructions}
|
|
|
onChange={(e) => {
|
|
|
- setNewModeCustomInstructions(e.target.value)
|
|
|
+ setNewModeCustomInstructions((e.target as HTMLTextAreaElement).value)
|
|
|
}}
|
|
|
rows={4}
|
|
|
className="w-full resize-y"
|