diff --git a/apps/desktop/src/components/settings/AgentSetupModalContent.svelte b/apps/desktop/src/components/settings/AgentSetupModalContent.svelte new file mode 100644 index 00000000000..295835a9b81 --- /dev/null +++ b/apps/desktop/src/components/settings/AgentSetupModalContent.svelte @@ -0,0 +1,236 @@ + + +Set up GitButler for your coding agents + +
+
+
+
+

1. Install the but CLI

+

+ Your agent runs but to branch, commit, and open pull requests. +

+ {#if step === "cli"} + +
+ +
+ {/if} +
+
+ + {#if step !== "cli"} +
+
+
+

2. Choose your agents

+ {#if step === "agents"} +

Detected agents are already ticked.

+
+ {#each frameworks as framework (framework.id)} +
+ toggle(framework.id)} + /> + +
+ {/each} +
+
+ + +
+ {/if} +
+
+ {/if} + + {#if data.projectId && (step === "scope" || step === "review")} +
+
+
+

3. Where should this apply?

+ {#if step === "scope"} +
+ + +
+
+ + +
+ {/if} +
+
+ {/if} + + {#if step === "review"} +
+
+
+

Review

+

These files will be written:

+
    + {#each chosen as framework (framework.id)} + {@const entry = framework.scopes.find((item) => item.scope === scope)} + {#if entry} +
  • {entry.skillPath}
  • + {/if} + {/each} +
+ {#if chosen.length === 0} +

None of the agents you picked can install at this scope.

+ {/if} +
+
+ {/if} +
+ + + + {#if step === "review"} + + {/if} + + + diff --git a/apps/desktop/src/components/settings/AgentSetupPrompt.svelte b/apps/desktop/src/components/settings/AgentSetupPrompt.svelte new file mode 100644 index 00000000000..12d96a3b728 --- /dev/null +++ b/apps/desktop/src/components/settings/AgentSetupPrompt.svelte @@ -0,0 +1,66 @@ + diff --git a/apps/desktop/src/components/settings/AgentSkillList.svelte b/apps/desktop/src/components/settings/AgentSkillList.svelte new file mode 100644 index 00000000000..fd3e16563e2 --- /dev/null +++ b/apps/desktop/src/components/settings/AgentSkillList.svelte @@ -0,0 +1,122 @@ + + +{#if outdatedCount > 0} +
+ + {outdatedCount} + {outdatedCount === 1 ? "skill is" : "skills are"} out of date. + + +
+{/if} + + + {#if status.response && alwaysShown.length === 0 && !showAll} + + {#snippet title()}No coding agents detected{/snippet} + {#snippet caption()} + GitButler looks for each agent's config to decide what to show here. Choose "Show all + agents" to install a skill anyway. + {/snippet} + + {/if} + + {#each shown as framework (framework.id)} + + {/each} + + +{#if rest.length > 0} +
+ +
+{/if} + + diff --git a/apps/desktop/src/components/settings/AgentSkillRow.svelte b/apps/desktop/src/components/settings/AgentSkillRow.svelte new file mode 100644 index 00000000000..3618b586374 --- /dev/null +++ b/apps/desktop/src/components/settings/AgentSkillRow.svelte @@ -0,0 +1,124 @@ + + +{#if scopeState} + + {#snippet title()} + + {framework.name} + {#if detected} + Detected + {/if} + {#if scopeState.installed && !scopeState.installed.upToDate} + + Outdated + + {/if} + + {/snippet} + + {#snippet caption()} + {#if scopeState.installed} + {scopeState.installed.path} + {:else} + {framework.description} + {/if} + {/snippet} + + {#snippet actions()} + +
+ {#if scopeState.installed} + {#if !scopeState.installed.upToDate} + + {/if} + {#if scopeState.instructionPath} + + + {/if} +
+ {/snippet} +
+ + +{/if} + + diff --git a/apps/desktop/src/components/settings/AgentWorkflowPolicyModal.svelte b/apps/desktop/src/components/settings/AgentWorkflowPolicyModal.svelte new file mode 100644 index 00000000000..b3cd6d120af --- /dev/null +++ b/apps/desktop/src/components/settings/AgentWorkflowPolicyModal.svelte @@ -0,0 +1,243 @@ + + + await save(close)} +> +

+ These preferences are written into the GitButler section of your agent instruction files. + {#if policyState?.diverged} +
Your instruction files currently disagree; saving will make them consistent. + {/if} +

+ +
+ {#each groups as group, groupIndex (group[0]?.group)} +

+ {group[0]?.groupTitle} +

+ {#each group as option (option.id)} + {@const isDisabled = disabled(option.repoLocalOnly)} +
+ toggle(option.id)} + /> + +
+ {/each} + {/each} +
+ + {#snippet controls(close)} + + + {/snippet} +
+ + diff --git a/apps/desktop/src/components/settings/AgentsAndCliSettings.svelte b/apps/desktop/src/components/settings/AgentsAndCliSettings.svelte new file mode 100644 index 00000000000..951e03af646 --- /dev/null +++ b/apps/desktop/src/components/settings/AgentsAndCliSettings.svelte @@ -0,0 +1,33 @@ + + +{#if !projectId} + + +{/if} + +

+ {projectId ? "Skills for this project" : "Skills for all your projects"} +

+

+ {projectId + ? "Installed into this repository, so they travel with it and apply to everyone who works here." + : "Installed into your home directory, so they apply everywhere you use this agent."} +

+ + diff --git a/apps/desktop/src/components/settings/CliInstallCard.svelte b/apps/desktop/src/components/settings/CliInstallCard.svelte new file mode 100644 index 00000000000..87139f8b538 --- /dev/null +++ b/apps/desktop/src/components/settings/CliInstallCard.svelte @@ -0,0 +1,109 @@ + + + + + {#snippet title()} + GitButler CLI but + {/snippet} + + {#snippet caption()} + {#if managedByPackageManager} + The but CLI is managed by your package manager. Please use your package manager to + install, update, or remove it. + {:else if linkState?.blockedReason} + {linkState.blockedReason} + {:else if linkState?.installed} + Installed at {linkState.linkPath}. Removing it deletes the + symlink only — the but binary inside GitButler stays where it is. + {:else if platformName === "windows"} + On Windows, you can manually copy the executable (`but`) to a directory in your + PATH. Click "Show command" for instructions. + {:else} + Installs the GitButler CLI (`but`) in your PATH, allowing you to use it from + the terminal. This action will request admin privileges. Alternatively, you could create a + symlink manually. + {/if} + {/snippet} + + {#if !managedByPackageManager} +
+
+ {#if linkState?.installed} + + {:else if platformName !== "windows"} + + {/if} + +
+
+ + {#if showSymlink} + + {/if} + {/if} +
+
diff --git a/apps/desktop/src/components/settings/GeneralSettings.svelte b/apps/desktop/src/components/settings/GeneralSettings.svelte index a37b6bb827f..6d582201a9b 100644 --- a/apps/desktop/src/components/settings/GeneralSettings.svelte +++ b/apps/desktop/src/components/settings/GeneralSettings.svelte @@ -1,11 +1,7 @@ {#if userService.user} @@ -277,73 +266,6 @@ - - - {#snippet title()} - Install the GitButler CLI but - {/snippet} - - {#snippet caption()} - {#if $appSettings?.ui.cliIsManagedByPackageManager} - The but CLI is managed by your package manager. Please use your package manager to - install, update, or remove it. - {:else if platformName === "windows"} - On Windows, you can manually copy the executable (`but`) to a directory in your - PATH. Click "Show Command" for instructions. - {:else} - Installs the GitButler CLI (`but`) in your PATH, allowing you to use it from - the terminal. This action will request admin privileges. Alternatively, you could create a - symlink manually. - {/if} - {/snippet} - - {#if !$appSettings?.ui.cliIsManagedByPackageManager} -
-
- {#if platformName !== "windows"} - - {/if} - -
-
- - {#if showSymlink} - - {/if} - {/if} -
-
- diff --git a/apps/desktop/src/components/settings/GeneralSettingsModalContent.svelte b/apps/desktop/src/components/settings/GeneralSettingsModalContent.svelte index 21c0fed7e89..405b29a0f3c 100644 --- a/apps/desktop/src/components/settings/GeneralSettingsModalContent.svelte +++ b/apps/desktop/src/components/settings/GeneralSettingsModalContent.svelte @@ -1,5 +1,6 @@