From 8a3dde7af5eeff210ca5fc3178c63908bdee046e Mon Sep 17 00:00:00 2001 From: Mark IJbema Date: Thu, 12 Feb 2026 09:57:45 +0100 Subject: [PATCH] feat(settings): implement Prompts and Experimental tabs --- .../components/settings/ExperimentalTab.tsx | 226 ++++++++++++++++-- .../src/components/settings/PromptsTab.tsx | 148 +++++++++++- 2 files changed, 347 insertions(+), 27 deletions(-) diff --git a/packages/kilo-vscode/webview-ui/src/components/settings/ExperimentalTab.tsx b/packages/kilo-vscode/webview-ui/src/components/settings/ExperimentalTab.tsx index 00c0b00658a..46924bae337 100644 --- a/packages/kilo-vscode/webview-ui/src/components/settings/ExperimentalTab.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/settings/ExperimentalTab.tsx @@ -1,30 +1,228 @@ -import { Component } from "solid-js" +import { Component, For, Show, createMemo } from "solid-js" +import { useConfig } from "../../context/config" + +const selectStyle = { + padding: "4px 8px", + "border-radius": "4px", + border: "1px solid var(--vscode-dropdown-border, var(--vscode-panel-border))", + background: "var(--vscode-dropdown-background)", + color: "var(--vscode-dropdown-foreground)", + "font-size": "12px", + "font-family": "var(--vscode-font-family)", + cursor: "pointer", + outline: "none", + "min-width": "100px", +} + +const inputStyle = { + padding: "4px 8px", + "border-radius": "4px", + border: "1px solid var(--vscode-input-border, var(--vscode-panel-border))", + background: "var(--vscode-input-background)", + color: "var(--vscode-input-foreground)", + "font-size": "12px", + "font-family": "var(--vscode-font-family)", + outline: "none", + width: "100px", +} + +interface SettingRowProps { + label: string + description: string + last?: boolean + children: any +} + +const SettingRow: Component = (props) => ( +
+
+
{props.label}
+
+ {props.description} +
+
+ {props.children} +
+) const ExperimentalTab: Component = () => { + const { config, updateConfig } = useConfig() + + const experimental = createMemo(() => config().experimental ?? {}) + + const updateExperimental = (key: string, value: unknown) => { + updateConfig({ + experimental: { ...experimental(), [key]: value }, + }) + } + return (
-

+ + + + {/* Formatter */} + + + + + {/* LSP */} + + + + + {/* Disable paste summary */} + + + + + {/* Batch tool */} + + + + + {/* Continue loop on deny */} + + + + + {/* MCP timeout */} + + { + const value = parseInt(e.currentTarget.value, 10) + if (!isNaN(value) && value > 0) { + updateExperimental("mcp_timeout", value) + } + }} + /> + +

+ + {/* Tool toggles */} + 0}> +

- This section is not implemented yet. It will - contain configuration options and explanatory text related to the selected settings category. During - reimplementation, use this space to validate layout, spacing, scrolling behavior, and navigation state before - wiring up real controls. -

-

+ Tool Toggles + +
+ + {([name, enabled], index) => ( +
+ + {name} + + +
+ )} +
+
+ ) } diff --git a/packages/kilo-vscode/webview-ui/src/components/settings/PromptsTab.tsx b/packages/kilo-vscode/webview-ui/src/components/settings/PromptsTab.tsx index 5d2e2d09c94..5212b834ca8 100644 --- a/packages/kilo-vscode/webview-ui/src/components/settings/PromptsTab.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/settings/PromptsTab.tsx @@ -1,29 +1,151 @@ -import { Component } from "solid-js" +import { Component, For, createSignal } from "solid-js" +import { useConfig } from "../../context/config" + +const inputStyle = { + padding: "4px 8px", + "border-radius": "4px", + border: "1px solid var(--vscode-input-border, var(--vscode-panel-border))", + background: "var(--vscode-input-background)", + color: "var(--vscode-input-foreground)", + "font-size": "12px", + "font-family": "var(--vscode-font-family)", + outline: "none", + flex: "1", +} const PromptsTab: Component = () => { + const { config, updateConfig } = useConfig() + const [newInstruction, setNewInstruction] = createSignal("") + + const instructions = () => config().instructions ?? [] + + const addInstruction = () => { + const value = newInstruction().trim() + if (!value) { + return + } + const current = [...instructions()] + if (!current.includes(value)) { + current.push(value) + updateConfig({ instructions: current }) + } + setNewInstruction("") + } + + const removeInstruction = (index: number) => { + const current = [...instructions()] + current.splice(index, 1) + updateConfig({ instructions: current }) + } + return (
+ {/* Instructions file paths */}
-

- This section is not implemented yet. It will - contain configuration options and explanatory text related to the selected settings category. During - reimplementation, use this space to validate layout, spacing, scrolling behavior, and navigation state before - wiring up real controls. -

+
+ Additional Instruction Files +
+
+ Paths to additional instruction files that are included in the system prompt +
+
+ + {/* Add new instruction path */} +
0 ? "1px solid var(--vscode-panel-border)" : "none", + }} + > + setNewInstruction(e.currentTarget.value)} + onKeyDown={(e) => { + if (e.key === "Enter") { + addInstruction() + } + }} + /> + +
+ + {/* Instructions list */} + + {(path, index) => ( +
+ + {path} + + +
+ )} +
)