* Update "Yes, I'll use my own key" to "Yes, I'll provide my own key"
in the AI settings
* Add copy explaining GitButler's AI provider support and the
requirement to be logged in to use the GitButler API
* Remove unnecessary line breaks and simplify JSX in the AI settings
* Add copy about Anthropic's Opus and Sonnet models
- Change model kind selection from a dropdown to radio buttons
- Update copy for key option selection
- Conditionally show model version and API key inputs based on
selected model kind
- Add form element to handle model kind changes
- Update layout and styling of settings page
The most significant changes are:
- Switching from a dropdown to radio buttons for selecting the model
kind (OpenAI or Anthropic)
- Conditionally rendering the model version and API key inputs based
on the selected model kind
- Adding a form to handle changes to the selected model kind
This refactors the settings page to improve the user experience when
selecting the model configuration. The radio buttons make the options
clearer, and conditionally showing fields reduces clutter.
- Use await instead of then when calling the summarizer.branch
method to get the branch message
- Update the condition to check the currentSection value using ==
instead of ===
Update the instructions for generating commit messages to clarify
that a warning should be given if any leaked keys are found in the
provided git diff, rather than a more general warning about leaked
keys.
This change improves the specificity and accuracy of the instructions,
making it clear that a warning is only necessary if keys are actually
detected in the diff under analysis.
The main changes in this commit are:
- Remove the `cloud` object from various branch and commit
components, including:
- BranchList.svelte
- Branch.svelte
- MiniCommitInfo.svelte
- CommitMessageBox.svelte
- Update the corresponding type imports to only import the `User` type
instead of also importing `getCloudApiClient`
- Remove the `cloud` prop from the usages of these components
- Adjust the indentation of the `<AiSettings>` component in the
settings page
These changes were made to remove the unused `cloud` object from
several components related to branches and commits. The `cloud` prop
was being passed down to these components but was not actually being
used within them. Removing this unnecessary prop helps simplify the
components and their usage.
Add UI components for configuring the model kind (OpenAI or
Anthropic), key option (Butler API or bring your own key),
and associated settings.
The model kind can be set to either OpenAI or Anthropic. The
key option allows using the Butler API proxy or providing
your own API key.
When using your own key, the API key and model version can
be specified for the selected model kind (OpenAI or
Anthropic).
The selected options are persisted and loaded from the
backend settings.
Refactor AIProvider classes to include model options for OpenAIProvider
and AnthropicAIProvider. Also, add functions to get and set the model
for both providers to allow for more flexibility in model selection.
- Modified Summarizer to use different AI providers based on the selected model
kind and token option.
- Added functionality to build Summarizer contextually based on user and settings.
- Introduced OpenAIProvider and AnthropicAIProvider for specific AI services.
- Integrated gitGetConfig and gitSetConfig functions for potential future use.
I've been able to use the OpenAI library as they support being in the browser if you pass the "dangerouslyAllowBrowser" flag.
Anthropics don't have any interest in supporting browers making API calls and causes sugnificant CORS problems, so I've made use of the Tauri HTTP library, so this commit also sets that up
Add instructions to only respond with the commit message and to warn
about any leaked keys. This improves the specificity and security of
the assistant's output.
- updated `DecorativeSplitView` in order to get raw SVG
- updated `DecorativeSplitView` layout
- replaced raster WebP images with SVG
- updated icons for the Welcome screen
- updated `DecorativeSplitView` in order to get raw SVG
- updated `DecorativeSplitView` layout
- replaced raster WebP images with SVG
- updated icons for the Welcome screen
- Neutral colors updated
- `Space` renamed to `size`
- `size-btn` renamed to `size-control`
- Sizes in PX automatically generated to REM
- Design tokens file now fully generated without manual editing
- Moved dialog styles background to the `main.css` file