Checkbox to experiment with letting Cline edit through diffs (#48)

Co-authored-by: Jozi <jozigila@gmail.com>
This commit is contained in:
Matt Rubens
2024-12-07 16:35:55 -05:00
committed by GitHub
parent dafe286076
commit 5d9d36c128
15 changed files with 174 additions and 14 deletions

View File

@@ -27,6 +27,8 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
setAlwaysAllowBrowser,
soundEnabled,
setSoundEnabled,
diffEnabled,
setDiffEnabled,
openRouterModels,
setAllowedCommands,
allowedCommands,
@@ -50,6 +52,7 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
vscode.postMessage({ type: "alwaysAllowBrowser", bool: alwaysAllowBrowser })
vscode.postMessage({ type: "allowedCommands", commands: allowedCommands ?? [] })
vscode.postMessage({ type: "soundEnabled", bool: soundEnabled })
vscode.postMessage({ type: "diffEnabled", bool: diffEnabled })
onDone()
}
}
@@ -288,6 +291,20 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
</div>
)}
<div style={{ marginBottom: 5 }}>
<VSCodeCheckbox checked={diffEnabled} onChange={(e: any) => setDiffEnabled(e.target.checked)}>
<span style={{ fontWeight: "500" }}>Enable editing through diffs</span>
</VSCodeCheckbox>
<p
style={{
fontSize: "12px",
marginTop: "5px",
color: "var(--vscode-descriptionForeground)",
}}>
When enabled, Cline will be able to apply diffs to make changes to files.
</p>
</div>
<div style={{ marginBottom: 5 }}>
<VSCodeCheckbox checked={soundEnabled} onChange={(e: any) => setSoundEnabled(e.target.checked)}>
<span style={{ fontWeight: "500" }}>Enable sound effects</span>