Skip to content

More agent presets#339

Merged
Kitenite merged 1 commit intomainfrom
western-jackal-fa2c0c
Dec 12, 2025
Merged

More agent presets#339
Kitenite merged 1 commit intomainfrom
western-jackal-fa2c0c

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Dec 12, 2025

More agent presets

Summary by CodeRabbit

  • New Features
    • Added three new preset templates: Claude Danger (with permissions override), Gemini CLI (YOLO), and Cursor Agent (AI-powered terminal coding assistance). These are now available as quick-add options in the presets settings for streamlined terminal configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 12, 2025

Walkthrough

Updates the PRESET_TEMPLATES array in the PresetsSettings component by adding two new preset templates (Claude Danger and Cursor Agent) and replacing one existing entry (Claude Danger Mode becomes Gemini CLI YOLO), affecting only static template data.

Changes

Cohort / File(s) Summary
Preset Templates Update
apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetsSettings.tsx
Added Claude Danger preset with claude --dangerously-skip-permissions command; replaced Claude (Danger Mode) with Gemini YOLO preset (gemini --yolo); added Cursor Agent preset for terminal-based AI coding assistance.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Verify command syntax correctness for each preset (Claude Danger, Gemini YOLO, Cursor Agent)
  • Confirm description text accuracy for Cursor Agent preset
  • Ensure template data structure consistency with existing presets

Possibly related PRs

Poem

🐰 A rabbit hops through presets new,
Claude Danger roars, Gemini's YOLO too,
Cursor Agent joins the CLI crew,
Templates dance—swift, fresh, and true!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete and fails to follow the required template structure. It only contains the title repeated with no substantive content addressing required sections. Fill in all required template sections: provide a detailed Description of the changes, link Related Issues, specify Type of Change, describe Testing performed, and add any Additional Notes. Currently, only a title is present.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title 'More agent presets' clearly summarizes the main change: adding new preset templates (Claude Danger, Gemini YOLO, and Cursor Agent) to the PresetsSettings configuration.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch western-jackal-fa2c0c

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 28869bc and db03e9a.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetsSettings.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
apps/desktop/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

For Electron interprocess communication, ALWAYS use tRPC as defined in src/lib/trpc

Files:

  • apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetsSettings.tsx
apps/desktop/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

apps/desktop/**/*.{ts,tsx}: Please use alias as defined in tsconfig.json when possible
Prefer zustand for state management if it makes sense. Do not use effect unless absolutely necessary

Files:

  • apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetsSettings.tsx
**/*.{ts,tsx,js,jsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Use Biome for code formatting and linting, running at root level for speed

Files:

  • apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetsSettings.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Avoid any type and prioritize type safety in TypeScript code

Files:

  • apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetsSettings.tsx
**/components/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/components/**/*.{ts,tsx}: Structure project folders as one folder per component with PascalCase naming (ComponentName/ComponentName.tsx + index.ts barrel export)
Co-locate component dependencies (utils, hooks, constants, config, tests, stories) next to the file using them
Use one component per file (no multi-component files)

Files:

  • apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetsSettings.tsx
apps/desktop/src/renderer/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Call IPC methods from renderer process using window.ipcRenderer.invoke with type-safe object parameters

Files:

  • apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetsSettings.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Deploy Docs
  • GitHub Check: Deploy Web
  • GitHub Check: Deploy Marketing
  • GitHub Check: Deploy API
  • GitHub Check: Deploy Admin
  • GitHub Check: Build
🔇 Additional comments (2)
apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetsSettings.tsx (2)

23-62: Implementation follows consistent patterns.

The preset templates are well-structured and follow the existing pattern consistently. The TypeScript typing is appropriate, and the code adheres to the component structure guidelines.

However, please address the security and validation concerns raised in the other comments, particularly around warning users about "danger mode" operations and validating command availability.


53-61: [rewritten comment]
[classification tag]

Comment on lines +24 to +32
{
name: "Claude (Danger Mode)",
description: "Claude Code with permissions auto-approved",
preset: {
name: "Claude Danger",
cwd: "",
commands: ["claude --dangerously-skip-permissions"],
},
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cat -n apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetsSettings.tsx

Repository: superset-sh/superset

Length of output: 8312


🏁 Script executed:

# Search for preset execution logic
rg -n "executePreset|runPreset|ipcRenderer.invoke.*command" apps/desktop/src/renderer --type=ts --type=tsx -A 5

Repository: superset-sh/superset

Length of output: 91


🏁 Script executed:

# Search for warning or confirmation UI related to presets
rg -n "Dialog|confirm|warning|danger" apps/desktop/src/renderer --type=ts --type=tsx | grep -i "preset\|danger\|permission" -A 2 -B 2

Repository: superset-sh/superset

Length of output: 91


🏁 Script executed:

# Look for where the preset commands are actually executed
rg -n "\.commands\[" apps/desktop/src/renderer --type=ts --type=tsx -B 3 -A 3

Repository: superset-sh/superset

Length of output: 91


🏁 Script executed:

rg -n "executePreset|runPreset|exec.*command|spawn.*command" apps/desktop/src/renderer --type-list | head -20

Repository: superset-sh/superset

Length of output: 453


🏁 Script executed:

rg -n "commands\[" apps/desktop/src/renderer -C 3

Repository: superset-sh/superset

Length of output: 1027


🏁 Script executed:

# Search in main process for preset execution
rg -n "executePreset|runPreset|exec.*preset" apps/desktop/src/main -C 3

Repository: superset-sh/superset

Length of output: 46


🏁 Script executed:

# Check PresetRow component for any warnings
cat -n apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetRow.tsx

Repository: superset-sh/superset

Length of output: 188


🏁 Script executed:

# Look for where commands are actually run
rg -n "ipcRenderer.invoke|window.ipc" apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/ -C 5

Repository: superset-sh/superset

Length of output: 46


🏁 Script executed:

find apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings -type f -name "*.tsx" -o -name "*.ts"

Repository: superset-sh/superset

Length of output: 755


🏁 Script executed:

# Search for where presets are executed
rg -n "createPreset|preset" apps/desktop/src/main -C 3

Repository: superset-sh/superset

Length of output: 46


🏁 Script executed:

# Look for terminal or command execution logic
rg -n "spawn|exec|terminal" apps/desktop/src/main -C 2

Repository: superset-sh/superset

Length of output: 32033


🏁 Script executed:

# Check the presets hook/query
cat -n apps/desktop/src/renderer/react-query/presets.ts

Repository: superset-sh/superset

Length of output: 144


🏁 Script executed:

cat -n apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetRow/PresetRow.tsx

Repository: superset-sh/superset

Length of output: 3536


🏁 Script executed:

# Find the presets hook/query
find apps/desktop/src/renderer -name "*.ts" -o -name "*.tsx" | xargs grep -l "usePresets\|presets" | head -10

Repository: superset-sh/superset

Length of output: 645


🏁 Script executed:

# Search for where preset commands might be executed
rg -n "commands.*forEach|commands\.map|for.*commands" apps/desktop/src/renderer apps/desktop/src/main -C 3

Repository: superset-sh/superset

Length of output: 2260


🏁 Script executed:

# Check for any IPC handlers related to preset execution
rg -n "handle.*preset\|ipcMain\.handle" apps/desktop/src/main -C 3

Repository: superset-sh/superset

Length of output: 46


🏁 Script executed:

cat -n apps/desktop/src/renderer/react-query/presets/index.ts

Repository: superset-sh/superset

Length of output: 2230


🏁 Script executed:

cat -n apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabsCommandDialog/index.tsx

Repository: superset-sh/superset

Length of output: 2408


🏁 Script executed:

# Search for where presets are actually used/executed
rg -n "preset.*command|executeCommand\|runCommand" apps/desktop/src/renderer -C 5

Repository: superset-sh/superset

Length of output: 3652


🏁 Script executed:

# Look for confirmation dialogs or warnings in the codebase
rg -n "Dialog|Alert|Confirm" apps/desktop/src/renderer/screens/main/components/WorkspaceView -C 2

Repository: superset-sh/superset

Length of output: 18782


🏁 Script executed:

# Find Terminal component and how it executes commands
rg -n "initialCommands\|Terminal.*component" apps/desktop/src/renderer -C 5 | head -50

Repository: superset-sh/superset

Length of output: 46


🏁 Script executed:

# Search for where commands are actually written to terminal
rg -n "write.*command|\.write\(" apps/desktop/src/renderer/screens/main/components/WorkspaceView -C 3

Repository: superset-sh/superset

Length of output: 2952


🏁 Script executed:

cat -n apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/Terminal.tsx | head -100

Repository: superset-sh/superset

Length of output: 5020


🏁 Script executed:

# Find where initialCommands are sent to main process
rg -n "initialCommands" apps/desktop/src/renderer -B 3 -A 3

Repository: superset-sh/superset

Length of output: 8443


🏁 Script executed:

# Check createOrAttach method to see how initialCommands are handled
rg -n "createOrAttach" apps/desktop/src -B 5 -A 10

Repository: superset-sh/superset

Length of output: 50376


🏁 Script executed:

# Find where initialCommands are written to terminal
rg -n "initialCommands" apps/desktop/src/lib/trpc/routers/terminal -B 3 -A 3

Repository: superset-sh/superset

Length of output: 1737


🏁 Script executed:

# Check the terminal router implementation
cat -n apps/desktop/src/lib/trpc/routers/terminal/terminal.ts | head -150

Repository: superset-sh/superset

Length of output: 5069


🏁 Script executed:

# Check if initialCommands are actually used in createOrAttach
rg -n "initialCommands" apps/desktop/src/main/lib/terminal/session.ts -B 3 -A 3

Repository: superset-sh/superset

Length of output: 656


🏁 Script executed:

# Check the full CreateSessionParams type
rg -n "CreateSessionParams\|interface.*Params" apps/desktop/src/main/lib/terminal/types.ts -B 2 -A 8

Repository: superset-sh/superset

Length of output: 46


Add confirmation dialog when executing presets with dangerous flags.

These presets execute immediately without any warning or confirmation when selected:

  • "Claude (Danger Mode)" runs --dangerously-skip-permissions
  • "Codex (Danger Mode)" runs with --ask-for-approval never
  • "Gemini CLI (YOLO)" runs with --yolo

The commands are written directly to the terminal via setupDataHandler in session.ts (line 166-167) with no validation or user confirmation. Add an AlertDialog in TabsCommandDialog to warn users before executing presets containing dangerous flags.

Comment on lines 44 to +52
{
name: "Claude (Danger Mode)",
description: "Claude Code with permissions auto-approved",
name: "Gemini CLI (YOLO)",
description: "Google Gemini CLI with auto-approve all actions",
preset: {
name: "Claude Danger",
name: "Gemini YOLO",
cwd: "",
commands: ["claude --dangerously-skip-permissions"],
commands: ["gemini --yolo"],
},
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Google Gemini CLI --yolo flag documentation

💡 Result:

The --yolo (short: -y) flag enables "YOLO mode" in the Gemini CLI: it auto-approves all actions the agent would otherwise prompt for (file edits, shell commands, tool runs), i.e., it disables interactive permission prompts for rapid/headless automation. It can also be selected via --approval-mode=yolo. Use with extreme caution (run only in trusted/sandboxed environments). Example: gemini --yolo "Fix failing tests" or gemini -p "Refactor X" --approval-mode=yolo. [1][2][3]

Sources:

  • Gemini CLI docs (Google Developers / Code Assist). [1]
  • Official gemini-cli docs (GitHub Pages / config & CLI reference). [2]
  • gemini-cli repository / flag reference (shows -y, --yolo and --approval-mode). [3]

🌐 Web query:

Gemini CLI auto-approve actions command line flag

💡 Result:

Use the --yolo flag or the --approval-mode flag.

Examples:

  • gemini --yolo (auto-approve all actions). [1]
  • gemini --approval-mode=yolo (same as --yolo). [1][2]
  • gemini --approval-mode=auto_edit (auto-approve edit/write tools but still prompt for others). [1][2]

References: Gemini CLI docs and CLI API reference. [1] [2]


Remove or warn users about the inherent risks of the --yolo mode.

The gemini --yolo flag is a documented Gemini CLI feature that auto-approves all actions without prompts, as documented in the official Gemini CLI reference. However, the official documentation explicitly warns: "Use with extreme caution (run only in trusted/sandboxed environments)." Adding this preset without a prominent security disclaimer could lead users to inadvertently execute untrusted AI-generated commands. Consider either removing this preset or adding a clear warning in the UI that explains the severe risks of auto-approval mode.

🤖 Prompt for AI Agents
In
apps/desktop/src/renderer/screens/main/components/SettingsView/PresetsSettings/PresetsSettings.tsx
around lines 44 to 52, the preset exposing "gemini --yolo" provides an
auto-approve mode that is dangerous; either remove this preset or add a clear,
prominent security warning and require an explicit opt-in before use. Fix by (a)
removing the preset entry entirely or (b) keeping it only after adding metadata
fields like "danger: true" and "warningText" explaining "auto-approves all
actions — use only in trusted/sandboxed environments," display that warning in
the UI when the preset is selected, and require a checkbox/confirmation to
enable it; ensure the preset is not selected by default and update any preset
documentation/tests accordingly.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 12, 2025

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

Service Status
Neon Database (Neon)

Thank you for your contribution! 🎉


Preview resources have been processed for cleanup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant