💄 style(vscode): 设置里的提示词框按内容自动撑高
This commit is contained in:
1 parent
5692a570f3
commit
f10e213ae3
1 file changed
+6
-10
@@ -115,6 +115,7 @@ export interface SettingsModalProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const inputClass = 'w-full rounded border border-[var(--vscode-input-border,transparent)] bg-[var(--vscode-input-background)] px-2 py-1 text-xs text-[var(--vscode-input-foreground)] outline-none focus:border-[var(--vscode-focusBorder)]'
|
const inputClass = 'w-full rounded border border-[var(--vscode-input-border,transparent)] bg-[var(--vscode-input-background)] px-2 py-1 text-xs text-[var(--vscode-input-foreground)] outline-none focus:border-[var(--vscode-focusBorder)]'
|
||||||
|
const promptTextareaClass = `${inputClass} field-sizing-content min-h-16 resize-y font-mono`
|
||||||
|
|
||||||
interface FieldProps {
|
interface FieldProps {
|
||||||
label: string
|
label: string
|
||||||
@@ -990,10 +991,9 @@ export function SettingsModal({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
rows={16}
|
|
||||||
value={brainstormPrompt}
|
value={brainstormPrompt}
|
||||||
onChange={e => setBrainstormPrompt(e.target.value)}
|
onChange={e => setBrainstormPrompt(e.target.value)}
|
||||||
className={`${inputClass} resize-y font-mono`}
|
className={promptTextareaClass}
|
||||||
placeholder="新建工单 + 续聊 + 原型段落,一份模板按条件分叉"
|
placeholder="新建工单 + 续聊 + 原型段落,一份模板按条件分叉"
|
||||||
/>
|
/>
|
||||||
</Field>
|
</Field>
|
||||||
@@ -1010,10 +1010,9 @@ export function SettingsModal({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
rows={8}
|
|
||||||
value={implementPlanPrompt}
|
value={implementPlanPrompt}
|
||||||
onChange={e => setImplementPlanPrompt(e.target.value)}
|
onChange={e => setImplementPlanPrompt(e.target.value)}
|
||||||
className={`${inputClass} resize-y font-mono`}
|
className={promptTextareaClass}
|
||||||
/>
|
/>
|
||||||
</Field>
|
</Field>
|
||||||
|
|
||||||
@@ -1027,10 +1026,9 @@ export function SettingsModal({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
rows={4}
|
|
||||||
value={reviewPrompt}
|
value={reviewPrompt}
|
||||||
onChange={e => setReviewPrompt(e.target.value)}
|
onChange={e => setReviewPrompt(e.target.value)}
|
||||||
className={`${inputClass} resize-y font-mono`}
|
className={promptTextareaClass}
|
||||||
/>
|
/>
|
||||||
</Field>
|
</Field>
|
||||||
|
|
||||||
@@ -1047,10 +1045,9 @@ export function SettingsModal({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
rows={4}
|
|
||||||
value={testPrompt}
|
value={testPrompt}
|
||||||
onChange={e => setTestPrompt(e.target.value)}
|
onChange={e => setTestPrompt(e.target.value)}
|
||||||
className={`${inputClass} resize-y font-mono`}
|
className={promptTextareaClass}
|
||||||
/>
|
/>
|
||||||
</Field>
|
</Field>
|
||||||
|
|
||||||
@@ -1064,10 +1061,9 @@ export function SettingsModal({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
rows={4}
|
|
||||||
value={prototypePrompt}
|
value={prototypePrompt}
|
||||||
onChange={e => setPrototypePrompt(e.target.value)}
|
onChange={e => setPrototypePrompt(e.target.value)}
|
||||||
className={`${inputClass} resize-y font-mono`}
|
className={promptTextareaClass}
|
||||||
/>
|
/>
|
||||||
</Field>
|
</Field>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in new issue
Block a user