fix(vscode): stop trimming edit mode fields on every keystroke

Removes .trim() from onChange handlers for description, prompt, and
model fields so spaces can be typed without being stripped. The create
mode form still trims on submit which is correct for one-shot actions.
This commit is contained in:
Mark IJbema
2026-03-25 09:20:43 +01:00
parent c5fd59e3f2
commit ae97759d4d
@@ -446,7 +446,7 @@ const AgentBehaviourTab: Component = () => {
<TextField
value={currentAgentConfig().description ?? ""}
placeholder={language.t("settings.agentBehaviour.createMode.description.placeholder")}
onChange={(val) => updateAgentConfig(name, { description: val.trim() || undefined })}
onChange={(val) => updateAgentConfig(name, { description: val || undefined })}
/>
</Card>
</Show>
@@ -462,7 +462,7 @@ const AgentBehaviourTab: Component = () => {
value={currentAgentConfig().prompt ?? ""}
placeholder={language.t("settings.agentBehaviour.createMode.prompt.placeholder")}
multiline
onChange={(val) => updateAgentConfig(name, { prompt: val.trim() || undefined })}
onChange={(val) => updateAgentConfig(name, { prompt: val || undefined })}
/>
</Card>
@@ -478,7 +478,7 @@ const AgentBehaviourTab: Component = () => {
placeholder="e.g. anthropic/claude-sonnet-4-20250514"
onChange={(val) =>
updateAgentConfig(name, {
model: val.trim() || undefined,
model: val || undefined,
})
}
/>