Commit Graph
21 Commits
Author SHA1 Message Date
Joseph T. LyonsandMikayla a836f9c23d Add a default_open_ai_model setting for the assistant (#2876)
[This PR has been sitting around for a
bit](https://github.com/zed-industries/zed/pull/2845). I received a bit
of mixed opinions from the team on how this setting should work, if it
should use the full model names or some simpler form of it, etc. I went
ahead and made the decision to do the following:

- Use the full model names in settings - ex: `gpt-4-0613`
- Default to `gpt-4-0613` when no setting is present
- Save the full model names in the conversation history files (this is
how it was prior) - ex: `gpt-4-0613`
- Display the shortened model names in the assistant - ex: `gpt-4`
- Not worry about adding an option to add custom models (can add in a
follow-up PR)
- Not query what models are available to the user via their api key (can
add in a follow-up PR)

Release Notes:

- Added a `default_open_ai_model` setting for the assistant (defaults to
`gpt-4-0613`).

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-22 02:55:27 -04:00
Piotr Osiewicz 2a3c660d1f settings: accept trailing commas (#2606)
Z-2357

I've found a crate that handles both comments and trailing commas in
JSON. It is a fork of `serde_json`, but it is maintained & up-to-date.
Sadly RawValue seems to not play nicely with it; I've ran into
deserialisation issues around use of RawValue. For this PR I've migrated
to `Value` API.

Obviously this is just a point of discussion, not something I'd merge
straight away. There may be better solutions to this particular problem.

I've also noticed that `serde_json_lenient` does not handle trailing
commas after bindings array. I'm not sure how big of an issue that is.

Release Notes:
- Improved handling of trailing commas in settings files.
[#1322](https://github.com/zed-industries/community/issues/1322)
2023-06-19 18:29:03 +02:00
Max Brunsfeld 1cd11bfe66 Remove panic when programatically updating an invalid setting 2023-06-13 09:43:57 -07:00
Max Brunsfeld 7417835f06 Avoid writing spurious nulls to settings file when updating it programatically 2023-06-02 13:02:17 -07:00
Mikayla Makiandmax 2390815d67 Make settings store handle no user settings
co-authored-by: max <max@zed.dev>
2023-06-01 10:09:04 -07:00
Max Brunsfeld 8f95435548 Replicate project-specific settings when collaborating 2023-05-30 18:08:03 -07:00
Max Brunsfeld 89446c7fd4 Start work on respecting project-specific settings 2023-05-29 14:25:49 -07:00
Max Brunsfeld 21ada545b0 Remove assertions about behavior on invalid settings file 2023-05-22 08:48:37 -07:00
Max Brunsfeld e32233c826 Fix spurious setting error logs on non-existent setting keys 2023-05-19 17:15:05 -07:00
Max Brunsfeld 67a25126d4 Define theme/ui text style settings in theme crate 2023-05-17 14:44:59 -07:00
Max Brunsfeld d2ba18eae9 Customize language settings JSON schema in language crate 2023-05-17 09:26:36 -07:00
Max Brunsfeld 39618ae32d Define language settings in the language crate 2023-05-16 17:29:53 -07:00
Max Brunsfeld 9ae10a5dd9 Add a better API for updating settings in the SettingsStore in tests 2023-05-11 17:24:58 -07:00
Max Brunsfeld cee7edabf9 Ensure the SettingsStore global is added in tests 2023-05-10 16:39:59 -07:00
Max Brunsfeld 9b06be2aa2 Define vim_mode setting in vim crate 2023-05-10 12:59:24 -07:00
Max Brunsfeld 926d7b356d Define auto_update setting in the auto_update crate 2023-05-10 12:59:24 -07:00
Max Brunsfeld b6b2c5d1d1 Generalize settings JSON schema logic to work w/ arbitrary setting types 2023-05-10 12:59:24 -07:00
Max Brunsfeld 9a6a2d9d27 Start using the SettingsStore in the app 2023-05-10 12:59:24 -07:00
Max Brunsfeld 316f791a77 Add generic update method to SettingsStore 2023-05-10 12:59:24 -07:00
Max Brunsfeld 24e06334d0 Allow registering additional settings after loading global settings 2023-05-10 12:59:24 -07:00
Max Brunsfeld 5de9652a22 Create proof-of-concept SettingStore struct 2023-05-10 12:59:22 -07:00