Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

feat(settings): REF-style Agents pane (enable/disable + default)

enesb79a2a933be9
diff --git a/src/renderer/components/SettingsPanel.tsx b/src/renderer/components/SettingsPanel.tsx
index 374d4d3e2..8e828319f 100644
--- a/src/renderer/components/SettingsPanel.tsx
+++ b/src/renderer/components/SettingsPanel.tsx
@@ -4,6 +4,10 @@ import { useSettings } from '../state/settings'
import { NODE_COLORS } from '../state/workspace'
import type { CustomAgent } from '@shared/types'
import type { PromptInjectionMode } from '@shared/agents/config'
+import { AGENT_CONFIG, BUILTIN_AGENT_IDS, type AgentId } from '@shared/agents/config'
+import { AgentIcon } from '../lib/agentIcons'
+import { SegmentedPill } from './SegmentedPill'
+import { isAgentEnabled, setAgentEnabled, setDefaultAgent } from '../state/agentAvailability'
interface SettingsPanelProps {
onClose: () => void
@@ -155,6 +159,50 @@ export function SettingsPanel({ onClose }: SettingsPanelProps) {
</label>
</section>
+ {(() => {
+ const rows: { id: AgentId; label: string }[] = [
+ ...BUILTIN_AGENT_IDS.map((id) => ({ id, label: AGENT_CONFIG[id].label })),
+ ...customAgents.map((c) => ({ id: c.id, label: c.label || c.id }))
+ ]
+ return (
+ <section>
+ <h3>Agents</h3>
+ <p className="set-note">
+ Enable or disable agents in the Add menus, and pick the default (⌘⇧C).
+ </p>
+ {rows.map((row) => {
+ const enabled = isAgentEnabled(settings, row.id)
+ const isDefault = settings.defaultAgent === row.id
+ return (
+ <div key={row.id} className="agents-row">
+ <span className="agents-row-icon">
+ <AgentIcon agentId={row.id} size={18} />
+ </span>
+ <span className="agents-row-label">{row.label}</span>
+ <button
+ type="button"
+ className={`set-btn agents-default${isDefault ? ' active' : ''}`}
+ aria-pressed={isDefault}
+ onClick={() => update(setDefaultAgent(settings, row.id))}
+ >
+ {isDefault ? 'Default' : 'Set default'}
+ </button>
+ <SegmentedPill<'enabled' | 'disabled'>
+ value={enabled ? 'enabled' : 'disabled'}
+ ariaLabel={`${row.label} availability`}
+ options={[
+ { value: 'enabled', label: 'Enabled' },
+ { value: 'disabled', label: 'Disabled' }
+ ]}
+ onChange={(v) => update(setAgentEnabled(settings, row.id, v === 'enabled'))}
+ />
+ </div>
+ )
+ })}
+ </section>
+ )
+ })()}
+
<section>
<h3>Custom agents</h3>
<p className="set-note">
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index b61b90956..fbb7b8248 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -3197,3 +3197,24 @@ body,
background: var(--accent);
color: #fff;
}
+.agents-row {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ padding: 6px 0;
+}
+.agents-row-icon {
+ display: inline-flex;
+ width: 18px;
+ height: 18px;
+ flex: none;
+}
+.agents-row-label {
+ flex: 1;
+ font-size: 13px;
+ color: rgba(255, 255, 255, 0.9);
+}
+.agents-default.active {
+ border-color: var(--accent);
+ color: var(--accent);
+}