Commit Graph

5764 Commits

Author SHA1 Message Date
Pavel Laptev
fdfd7dd905
UI: lane resizer color update (#3211) 2024-03-19 12:17:09 +01:00
Josh Junon
961469cce8
Merge pull request #3210 from gitbutlerapp/add-push-to-gitbutler-git
add push to gitbutler-git
2024-03-19 11:27:26 +01:00
Josh Junon
9cb84d369d add push to gitbutler-git 2024-03-19 11:17:20 +01:00
Josh Junon
f08c58dafa
Merge pull request #3209 from gitbutlerapp/add-local-config-fetch-set-on-projects
add local git config get/set tauri commands
2024-03-19 11:11:06 +01:00
Josh Junon
92db784a29 add local git config get/set tauri commands 2024-03-19 11:01:06 +01:00
Josh Junon
3050facc0b
Merge pull request #3208 from gitbutlerapp/remove-unused-imports
remove unused imports
2024-03-19 10:37:07 +01:00
Josh Junon
572b589afa remove unused imports 2024-03-19 10:27:12 +01:00
Josh Junon
d88ff925d9
Merge pull request #3207 from gitbutlerapp/refactor-gitbutler-git-to-be-cli-only
refactor gitbutler-git to be cli-only and allow prompt handlers
2024-03-19 08:38:25 +01:00
Josh Junon
bd288f92ca refactor gitbutler-git to be cli-only and allow prompt handlers 2024-03-19 08:25:57 +01:00
Pavel Laptev
2670fb4ef3
UI: update outline colors, added missing tokens (#3206) 2024-03-19 00:49:41 +01:00
Pavel Laptev
b7a0f7c593
UI: empty board idle animation (#3204)
* refactor: `FullscreenLoading` to `FullviewLoading`
in case we use this not only on pages but on components that are not fullscreen

* refactor: remove unused import

* idle animation for empty board added

* min-height to the empty board suggestions panel
2024-03-18 23:50:04 +01:00
Kiril Videlov
106697e3f6 feat(virtual_branches): remove unnecessary synchronization 2024-03-18 23:22:58 +01:00
Mattias Granlund
d78f95417d Prevent future DI bugs by throwing error
At present we never get optional dependencies, and if that was necessary we'd be explicit about it.
2024-03-18 21:17:44 +01:00
Pavel Laptev
debfb48ba7
CSS fixes (#3200)
* UI: Adjusted padding for better UI alignment

* UI: search field icon updated

* UI: Commit dialog padding fixes

* lint: Fix indentation in commit-box__textarea-wrapper padding.

* fix: commented loading
2024-03-18 20:19:56 +01:00
Mattias Granlund
37d921c83a Fix DI bug in branch header
- `BaseBranch` is both a class and a component, used the wrong import
2024-03-18 20:19:27 +01:00
Mattias Granlund
bcb39aab31 Fix a couple of pr card bugs
- prevent caching checks and pr Octokit requests
- throw exception if checks fail instead of returning error
2024-03-18 19:55:55 +01:00
Mattias Granlund
91fbeec587 Simplify padding in commit dialog
- under some conditions we lost all padding in commit dialog
- with these changes the bottom padding is always correct
2024-03-18 19:49:02 +01:00
Kiril Videlov
8b06269c2a refactor: Removed unnecessary unwrap in setting default target in VirtualBranchesHandle. 2024-03-18 19:31:13 +01:00
Mattias Granlund
ec193efd73 Just a couple of nits 2024-03-18 19:20:18 +01:00
Caleb Owens
ef8734d638 Allow AI use without user and update settings to match 2024-03-18 19:20:18 +01:00
Caleb Owens
fcd4e616ac Add in an error toast when branch messages fail to generate 2024-03-18 19:20:18 +01:00
Caleb Owens
bdb596005d Rename "ConfigKeys" enum to "GitAIConfigKey" 2024-03-18 19:20:18 +01:00
Caleb Owens
9c3093a918 Update tests to use ConfigKeys 2024-03-18 19:20:18 +01:00
Caleb Owens
0538b9a94a Style: Move conditional assignment into a single line 2024-03-18 19:20:18 +01:00
Caleb Owens
62f87863af Improve commit message guidelines for Haiku
- Adds guideline to not use hash symbols before commit message lines
- Wraps commit message lines at 72 characters
- Specifies that only the commit message should be returned in the response
2024-03-18 19:20:18 +01:00
Caleb Owens
7cb17e9180 Fix: Correctly pass model kind to API 2024-03-18 19:20:18 +01:00
Caleb Owens
9ac44479a5 Pass model_kind to API 2024-03-18 19:20:18 +01:00
Caleb Owens
2cc474d2f9 Test toast error messages 2024-03-18 19:20:18 +01:00
Caleb Owens
4a36585f0d return undefined when git config value is null 2024-03-18 19:20:18 +01:00
Caleb Owens
5e524f4ed0 Fix regex and refactor
`/\n+(.*?)\w*/s` wasn't behaving correctly so I used `/\n+(.*)/s` from CommitDialog.svelte.
I want to consolidate this logic at some point because we've
got similar logic multiple times.

The ORing to empty strings isn't required and we can use the falsey nature of "" to
see if we should be showing just the summary or both
2024-03-18 19:20:18 +01:00
Caleb Owens
ff6f9a73e7 use ConfigKeys enum for dummy GitConfig keys
Change git config access to use the ConfigKeys enum instead of
string literals.

Also update import paths to use the new $lib alias for better modularity.
2024-03-18 19:20:18 +01:00
Mattias Granlund
c90d887ab7 Some suggestions for improvement 2024-03-18 19:20:18 +01:00
Caleb Owens
6c2d98d2f4 Refactor to use new context patterns 2024-03-18 19:20:18 +01:00
Caleb Owens
8b9b573b98 Added some tests to cover the aiService 2024-03-18 19:20:18 +01:00
Caleb Owens
d80a334bbd Improve AI client error handling 2024-03-18 19:20:18 +01:00
Caleb Owens
2a1ab3cdec Use default paramaters rather than doing an OR 2024-03-18 19:20:18 +01:00
Caleb Owens
721b9d13fa Add test:watch script to package.json files
Add a test:watch script to the package.json files in the root
and ui directories. This script runs vitest in watch mode for
the development environment, allowing developers to run tests
continuously while making changes to the codebase.
2024-03-18 19:20:18 +01:00
Caleb Owens
1e5c418bd2 Add support for Anthropic's Haiku model
Add a new enum value for Anthropic's Haiku model, which was released
on 2023-03-07. Update the default model to Haiku in the loadConfig
function. Add Haiku to the list of available models in the
configureAnthropicModel function.
2024-03-18 19:20:18 +01:00
Caleb Owens
f50dd13844 Rename model to modelName 2024-03-18 19:20:18 +01:00
Caleb Owens
52427bbed8 Rename AI Provider to AI Client 2024-03-18 19:20:18 +01:00
Caleb Owens
74e3d475ac initial pass of aiService as discussed 2024-03-18 19:20:18 +01:00
Caleb Owens
5457068e3e Small tweaks 2024-03-18 19:20:18 +01:00
Caleb Owens
8fee75762d Ensure set isn't called after initial load 2024-03-18 19:20:18 +01:00
Caleb Owens
5ece49ad41 Fix formatting issues 2024-03-18 19:20:18 +01:00
Caleb Owens
b86b46662c feat: use aiService for commit message generation
Refactor commit message generation to use the summarizer from the
aiService context instead of building it locally. This allows the
summarizer to be shared across components and avoids unnecessary
rebuilds.

Also update the branch name generation in the branch view to use the
summarizer from the aiService context.

Add the aiService to the page context and retrieve the summarizer
observable in the components that need it.

No leaked keys found in the provided git diff.
2024-03-18 19:20:18 +01:00
Caleb Owens
8ddfbd0ffd (non atomic) Moved to storing gitConfig settings with a writable 2024-03-18 19:20:18 +01:00
Caleb Owens
0ca1d9a895 refactor: Refactor code to use onMount for asynchronous data retrieval and setting properties in SummarizerSettings class. Update setters for OpenAIModel in SummarizerSettings class. 2024-03-18 19:20:18 +01:00
Caleb Owens
2774b81381 feat: Skip instrumenting _handle parameter in git_set_global_config and git_get_global_config
This commit skips instrumenting the _handle parameter in the functions git_set_global_config and git_get_global_config for cleaner logs and improved clarity in the code.
2024-03-18 19:20:18 +01:00
Caleb Owens
cfe7369661 refactor: Extracted configuration keys into constants 2024-03-18 19:20:18 +01:00
Caleb Owens
c34a0047ee Spread comment on multiple lines 2024-03-18 19:20:18 +01:00