Commit Graph
14412 Commits
Author SHA1 Message Date
Nate Butler bdbb7bcb3b Extend tooltip to take meta + kb 2023-11-14 12:59:53 -05:00
Antonio Scandurra 50f3f29d9e Render blocks in editor2 (#3320)
Release Notes:

- N/A
2023-11-14 17:29:55 +01:00
Antonio Scandurra c4a5f47bc3 Merge remote-tracking branch 'origin/main' into editor2-blocks 2023-11-14 17:16:58 +01:00
Antonio Scandurra ca5ef02d08 Add red background to blocks that need styling 2023-11-14 17:15:33 +01:00
Antonio ScandurraandJulia db02124a74 Return the line length when x is past the last glyph
Co-Authored-By: Julia <julia@zed.dev>
2023-11-14 17:06:18 +01:00
Antonio ScandurraandJulia 05a555e2ef Honor cmd-w to close active item
Co-Authored-By: Julia <julia@zed.dev>
2023-11-14 16:38:20 +01:00
Nate Butler 3ceadaa609 Allow a button to take a color (#3315)
[[PR Description]]
- Allows a button to take a color and resolve it into `IconColor` and
`LabelColor`
- Extend `IconColor` and `LabelColor` to allow them to take a
`Player(i)`
- `impl From<LabelColor> for IconColor`

Release Notes:

- N/A
2023-11-14 10:36:52 -05:00
Joseph T. Lyons 167c8f10bc Add gpt-4-1106-preview model (#3319)
This PR adds the `gpt-4-1106-preview` model. It required forking two
repos from different organizations, as one is a submodule of another.

Update 1:

~Currently, I'm just temporarily pointing towards a personal fork of the
repo, but once [this
PR](https://github.com/zurawiki/tiktoken-rs/pull/49) lands, we can
switch back to using the official crate.~

Update 2:

~PR was merged, we are now pointing to a specific commit on the original
official repo - may want to bump it to an official version once a new
one has been released.~

Update 3:

Author published a [new
version](https://crates.io/crates/tiktoken-rs/0.5.7). Now, we are back
to relying on the official crate.

<img width="1118" alt="SCR-20231114-ibgs"
src="https://github.com/zed-industries/zed/assets/19867440/cc2657b6-98f9-413f-9a0c-f337636f367c">

Release Notes:

- Added support for the
[`gpt-4-1106-preview`](https://openai.com/blog/new-models-and-developer-products-announced-at-devday)
model in the assistant panel.
- Updated the `assistant.default_open_ai_model` setting to default to
`gpt-4-1106-preview`. To override the default, use the following snippet
to your `settings.json` file:

```rs
"assistant": {
    // 1. "gpt-3.5-turbo-0613""
    // 2. "gpt-4-0613""
    // 3. "gpt-4-1106-preview"
    "default_open_ai_model": "<Your choice of model here>"
  },
```
2023-11-14 10:11:08 -05:00
Antonio ScandurraandJulia 1d15d76e5e Re-enable find all references
Co-Authored-By: Julia <julia@zed.dev>
2023-11-14 16:09:29 +01:00
Antonio ScandurraandJulia d4b9bd4ec8 Render block elements
Co-Authored-By: Julia <julia@zed.dev>
2023-11-14 16:03:06 +01:00
Joseph T. Lyons 5a99281019 Bump tiktoken-rs to official release 2023-11-14 09:12:25 -05:00
Joseph T. Lyons 03558fe551 Update tiktoken-rs dependency
The PR to add the `gpt-4-1106-preview` model was merged:

https://github.com/zurawiki/tiktoken-rs/pull/49
2023-11-14 09:00:04 -05:00
Antonio Scandurra 0d6d776a8b WIP 2023-11-14 14:48:59 +01:00
Joseph T. Lyons e90f157320 Add gpt-4-1106-preview model 2023-11-14 08:28:57 -05:00
Conrad Irwin b33dc55f73 command 2 2 (#3317)
- Update command matches faster
- Fix action dispatching...
- Add Text::styled() and use it in command palette
- Fix SingleLine editor font size
- Fix elevation on go_to_line2
- Allow clicking on commands in the command palette

Release Notes:

- N/A
2023-11-13 23:12:03 -07:00
Conrad Irwin 0bbd5b0775 Allow clicking on commands in the command palette 2023-11-13 21:42:27 -07:00
Conrad Irwin 5d10015212 Fix elevation on go_to_line2 2023-11-13 21:42:04 -07:00
Conrad Irwin 223abf15d4 Fix SingleLine editor font size 2023-11-13 21:41:41 -07:00
Conrad Irwin bb2477eb42 Add Text::styled() and use it in command palette
Prevents jumping while typing
2023-11-13 19:53:55 -07:00
Conrad Irwin bc20c70907 Fix action dispatching... 2023-11-13 18:56:59 -07:00
Conrad Irwin dba8da9a6b Update command matches faster 2023-11-13 18:21:08 -07:00
Mikayla Maki b2f6bb6e51 Improve actions macros (#3292)
- `actions!` now uses `#[action]` on each struct to reduce duplication.
- The `#[action]` macro now works on unit structs.
- Renamed `menu::unused` to `menu::init` and added more explanation in
comments.

Release Notes:

- N/A
2023-11-13 17:14:56 -08:00
Mikayla Maki ad4cd610fc WIP: Add some editor tests (#3285)
This is a continuation of
https://github.com/zed-industries/zed/pull/3232, however as I started
working on this it seemed a bit premature.

There are a few GPUI changes to finish getting the editor green (mainly
clipboard and simulate_resize), as well as several editor methods to
port (several around changing selections), as well as several editor
methods that are now fully broken (tagged with 'todo(finish editor
tests)').

I am also comitting the partially ported integration tests, which where
close to compiling.

Release Notes:

- N/A
2023-11-13 16:57:41 -08:00
Mikayla 96d7b68670 Add test tag 2023-11-13 16:51:59 -08:00
Nate Butler 9624355db1 Allow a button to take a color 2023-11-13 19:46:15 -05:00
Mikayla 238a291e61 Fix broken tests and comment out remaining tests 2023-11-13 16:46:06 -08:00
Mikayla b83845913e Merge branch 'main' into editor-tests 2023-11-13 15:53:22 -08:00
Mikaylaandconrad a0ef21d91d WIP
co-authored-by: conrad <conrad.irwin@zed.dev>
2023-11-13 15:53:04 -08:00
Marshall Bowers c8c2526880 Add One Dark (#3314)
- Adds `one-dark`, and sets it as default for now.

Release Notes:

- N/A
2023-11-13 18:50:02 -05:00
Marshall Bowers bdeec3b434 Use "One Dark" as default theme 2023-11-13 18:44:17 -05:00
Marshall Bowers db0bfd17d0 Combine related conditions 2023-11-13 18:22:04 -05:00
Marshall Bowers 8e2a7b803f Merge branch 'main' into one-themes 2023-11-13 18:16:45 -05:00
Nate Butler 062e4fe6a0 Remove unused imports 2023-11-13 17:54:22 -05:00
Nate Butler ea8dc40ccf Reorganize theme2 crate (#3312)
[[PR Description]]

- Colocates defaults with their defs
- Organizes each style module into the `styles` subfolder
(`src/styles/players`, etc)
- Standardizes the use of `dark()` and `light()` throughout (ex:
`StatusColors::dark()`)
- Documents and extents StatusColors

Release Notes:

- N/A
2023-11-13 17:53:29 -05:00
Conrad Irwin 0993d23eb2 Add KeyBindings to CommandPalette (#3313)
Release Notes:

- N/A
2023-11-13 15:53:18 -07:00
Nate Butler a11ce4954e Start refining tab 2023-11-13 17:51:58 -05:00
Conrad Irwin 45966b2960 Add KeyBindings to CommandPalette 2023-11-13 15:40:49 -07:00
Nate Butler 98916f54d2 WIP 2023-11-13 17:38:44 -05:00
Nate Butler 70ff9b5fdd Add one syntax theme 2023-11-13 17:09:55 -05:00
Conrad Irwin 4c0dcd0aad WIP: Rework key dispatch to allow focus to be changed and actions to be dispatched on arbitrary focus handles (#3303)
Will explain more later.

Release Notes:

- N/A
2023-11-13 14:19:10 -07:00
Conrad Irwin f553eae18f Fix test 2023-11-13 13:53:08 -07:00
Nate Butler f00f2ec9f8 Add one_dark theme 2023-11-13 15:48:05 -05:00
Nate Butler 8935763d3d Allow arrays of colors to be passed in 2023-11-13 15:47:57 -05:00
Nate Butler 2e78d9494a Add color converter util 2023-11-13 15:28:20 -05:00
Conrad Irwin 235edc51c8 Merge branch 'main' into dispatch-tree 2023-11-13 13:21:57 -07:00
Mikayla c0b2ecf405 Get editor tests compiling 2023-11-13 12:10:14 -08:00
Marshall Bowers 079616a622 Choose appropriate player colors based on theme appearance 2023-11-13 15:07:13 -05:00
Conrad Irwin 4e819cdbb1 Fix on_action on focusable
We were accidentally dropping the key context
2023-11-13 12:48:36 -07:00
Nate Butler 2d0473c02f Refine command palette (#3311)
[[PR Description]]

Update command palette styles

Release Notes:

- N/A
2023-11-13 13:58:51 -05:00
Nate Butler b2c70dc203 Reorganize theme2 crate 2023-11-13 13:58:23 -05:00