Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions src/renderer/components/ChatInterface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1202,14 +1202,40 @@ const ChatInterface: React.FC<Props> = ({
githubIssue={task.metadata?.githubIssue || null}
jiraIssue={task.metadata?.jiraIssue || null}
/>
{autoApproveEnabled && (
<span
className="inline-flex h-7 select-none items-center gap-1.5 rounded-md border border-border bg-muted px-2.5 text-xs font-medium text-foreground"
title="Auto-approve enabled"
{Boolean(agentMeta[agent]?.autoApproveFlag) && (
<button
type="button"
onClick={() => {
const next = !autoApproveEnabled;
void rpc.db.saveTask({
...task,
metadata: {
...task.metadata,
autoApprove: next,
},
});
if (next) {
// Kill the running PTY so the session manager restarts it
// with autoApprove: true on next spawn.
window.electronAPI.ptyKill(terminalId);
}
Comment thread
Fizza-Mukhtar marked this conversation as resolved.
Outdated
}}
className={`inline-flex h-7 select-none items-center gap-1.5 rounded-md border px-2.5 text-xs font-medium transition-colors ${
autoApproveEnabled
? 'border-orange-500/40 bg-orange-500/10 text-orange-600 hover:bg-orange-500/20 dark:text-orange-400'
: 'border-border bg-muted text-muted-foreground hover:bg-accent hover:text-foreground'
}`}
title={
autoApproveEnabled
? 'Auto-approve enabled — click to disable'
: 'Enable auto-approve (skip permissions)'
}
>
<span className="h-1.5 w-1.5 rounded-full bg-orange-500" />
<span
className={`h-1.5 w-1.5 rounded-full ${autoApproveEnabled ? 'bg-orange-500' : 'bg-muted-foreground'}`}
/>
Auto-approve
</span>
</button>
)}
</div>
</div>
Expand Down