desktop: Fix with AI on scan findings that need a code change (aiFix: true, AI_FIX_RULES). The host (src-tauri/src/ai_fix.rs) runs the owner's local Claude Code headless in the app folder with Read / Edit / Write / Grep / Glob only (Bash, web tools, sub-agents disallowed) and a prompt it builds from the finding's fields; it refuses while the folder has uncommitted files, streams progress, times out after 10 min with a heartbeat, kills the process group on Cancel or exit, and records the run's changed files so Undo restores exactly those; the window shows the diff with Keep / Undo and rescans. Without claude the button copies the prompt (Copy for AI). Only the claude binary, git and kill / taskkill are started there (tests/security.rs); tests/ai_fix.rs covers the prompt, dirty-tree refusal, undo scope, timeout and cancel
This commit is contained in:
parent
992f5bcc0e
commit
c95f2af8ff
24 changed files with 1023 additions and 10 deletions
|
|
@ -1008,3 +1008,9 @@ button.ck.ck-pick[aria-checked="true"] { border-color: var(--accent-solid); box-
|
|||
.ed-scenes li { display: grid; grid-template-columns: 28px minmax(80px, 140px) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
|
||||
.ed-scene-frame { min-width: 0; }
|
||||
.rot90 { transform: rotate(90deg); }
|
||||
|
||||
/* Fix with AI (ui/AiFix.tsx): the button under a finding, its run log, the diff with Keep / Undo */
|
||||
.ai-actions { display: flex; gap: 8px; margin-top: 6px; }
|
||||
.ai-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 8px; }
|
||||
.ai-panel .row { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
.ai-panel .ai-diff { max-height: 320px; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue