Skip to content

Commit 82b0d6d

Browse files
scgopiclaude
andcommitted
Settings: show a preferred-version row only for Copilot
Claude Code, Codex, OpenCode and Pi have no version-pin flag at all, so their rows could never become interactive. A permanently disabled control reads as a promise upstream has not made. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016n4hSXVu6wLR4RCfnt6PPG
1 parent 081769d commit 82b0d6d

1 file changed

Lines changed: 12 additions & 17 deletions

File tree

graphcode/Sources/Features/Settings/PreferredVersionsSettingsSection.swift

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,24 @@ struct PreferredVersionsSettingsSection: View {
77

88
var body: some View {
99
Section {
10-
ForEach(CLISessionBackendKind.offerableAsDefault, id: \.self) { backend in
11-
Picker(
12-
backend.displayName,
13-
selection: backend.supportsVersionPreference ? copilotSelection : .constant(false)
14-
) {
15-
Text("Default").tag(false)
16-
if backend.supportsVersionPreference {
17-
Text("Specific version").tag(true)
18-
}
19-
}
20-
.disabled(!backend.supportsVersionPreference)
10+
// Only a backend whose CLI can actually select a version gets a row. The others have
11+
// no such flag, so a permanently disabled row would promise something upstream does
12+
// not offer.
13+
Picker(CLISessionBackendKind.copilotCLI.displayName, selection: copilotSelection) {
14+
Text("Default").tag(false)
15+
Text("Specific version").tag(true)
16+
}
2117

22-
if backend == .copilotCLI, copilotSelection.wrappedValue {
23-
copilotVersionEditor
24-
}
18+
if copilotSelection.wrappedValue {
19+
copilotVersionEditor
2520
}
2621
} header: {
2722
Text("Preferred versions")
2823
} footer: {
2924
Text(
30-
"Default leaves version selection to each CLI; it does not install the latest release. "
31-
+ "Only Copilot currently supports an override. These settings do not change "
32-
+ "which backend new loops or chats use."
25+
"Default leaves version selection to the CLI; it does not install the latest release. "
26+
+ "Copilot is the only backend whose CLI can be pinned to a version. This does not "
27+
+ "change which backend new loops or chats use."
3328
)
3429
.font(.caption2)
3530
.foregroundStyle(.secondary)

0 commit comments

Comments
 (0)