Skip to content

Commit 90d6ab7

Browse files
committed
Add configuration picker on the modes page
1 parent 66909b5 commit 90d6ab7

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.changeset/healthy-oranges-drum.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Add a dropdown to select the API configuration for a mode in the Prompts tab

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
4343
customModePrompts,
4444
customSupportPrompts,
4545
listApiConfigMeta,
46+
currentApiConfigName,
4647
enhancementApiConfigId,
4748
setEnhancementApiConfigId,
4849
mode,
@@ -609,6 +610,36 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
609610
</div>
610611
{/* Mode settings */}
611612
<>
613+
<div style={{ marginBottom: "12px" }}>
614+
<div style={{ fontWeight: "bold", marginBottom: "4px" }}>API Configuration</div>
615+
<div style={{ marginBottom: "8px" }}>
616+
<VSCodeDropdown
617+
value={currentApiConfigName || ""}
618+
onChange={(e: any) => {
619+
const value = e.detail?.target?.value || e.target?.value
620+
vscode.postMessage({
621+
type: "loadApiConfiguration",
622+
text: value,
623+
})
624+
}}
625+
style={{ width: "100%" }}>
626+
{(listApiConfigMeta || []).map((config) => (
627+
<VSCodeOption key={config.id} value={config.name}>
628+
{config.name}
629+
</VSCodeOption>
630+
))}
631+
</VSCodeDropdown>
632+
<div
633+
style={{
634+
fontSize: "12px",
635+
marginTop: "5px",
636+
color: "var(--vscode-descriptionForeground)",
637+
}}>
638+
Select which API configuration to use for this mode
639+
</div>
640+
</div>
641+
</div>
642+
612643
{/* Show tools for all modes */}
613644
<div style={{ marginBottom: "16px" }}>
614645
<div

0 commit comments

Comments
 (0)