Commit Graph

8136 Commits

Author SHA1 Message Date
Nathan Sobo
d375f7992d Merge branch 'main' into divs 2023-08-22 16:35:56 -06:00
Nathan Sobo
733df38f9b Checkpoint
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-08-22 11:34:06 -06:00
Nathan Sobo
3921278319 Add more style helpers 2023-08-22 09:16:05 -06:00
Nathan Sobo
53679ce045 Checkpoint 2023-08-22 09:07:45 -06:00
Piotr Osiewicz
d27cebd977
Z 2819 (#2872)
This PR adds new config option to language config called
`word_boundaries` that controls which characters should be recognised as
word boundary for a given language. This will improve our UX for
languages such as PHP and Tailwind.

Release Notes:

- Improved completions for PHP
[#1820](https://github.com/zed-industries/community/issues/1820)

---------

Co-authored-by: Julia Risley <julia@zed.dev>
2023-08-22 10:35:20 +02:00
Joseph T. Lyons
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
Nathan Sobo
ff7b25c538 Checkpoint 2023-08-21 16:14:59 -06:00
Joseph T. Lyons
f66e6863fa Add channel id to call events
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-08-21 13:50:04 -04:00
Kyle Caverly
bbe6d3b261
Semantic index rough edges (#2871)
Small PR aimed at improving a few edge cases for semantic indexing large
projects.

Release Notes (Preview-only).

- Batched large files with a number of documents greater than
EMBEDDINGS_BATCH_SIZE.
- Ensured that the job handle counting mechanism is consistent with
inner file batching.
- Updated tab content names for semantic search, to match text/regex
searches.
2023-08-21 13:43:08 +02:00
Piotr Osiewicz
c68b518aec chore: fix compiler warning
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-21 13:31:45 +02:00
Piotr Osiewicz
67a48ec106 project_search: use search history's current entry as a tab name.
Previously the tab name for Semantic Search was not updated, as we didn't have an active query to go off of

Co-authored-by: Kyle <kyle@zed.dev>
2023-08-21 13:30:32 +02:00
Piotr Osiewicz
61041b0cd1 Do not attempt to reindex a file if previous attempts have failed.
Add doc comment to JobHandle

Co-authored-by: Kyle <kyle@zed.dev>
2023-08-21 13:23:11 +02:00
Piotr Osiewicz
1a88444f2f Increment job counter on JobClient::new
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-21 13:00:56 +02:00
KCaverly
def215af9f update job handle to ensure file count is consistent
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-21 12:47:43 +02:00
KCaverly
1cae4758cc manage for edge case in which file documents are larger than the allowable limit 2023-08-21 11:29:45 +02:00
Piotr Osiewicz
9ea0ed3e95
chore: remove unused features from rodio crate. (#2869)
This reduces our dep count by 1% at the expense of not supporting
playback of .flac, .mp3 and .vorbis formats. We only use .wav anyways.


Release Notes:
- N/A
2023-08-21 11:07:31 +02:00
Nathan Sobo
f4d8763d2b WIP 2023-08-19 23:16:20 -06:00
Nathan Sobo
6663d3f8eb Checkpoint 2023-08-19 22:33:28 -06:00
Nathan Sobo
afff46b335 Checkpoint 2023-08-19 21:24:28 -06:00
Nathan Sobo
2c6f692c56 Checkpoint 2023-08-19 20:29:55 -06:00
Nathan Sobo
0747131bd4 Compiling checkpoint 2023-08-19 19:51:22 -06:00
Mikayla Maki
b7e03507c2
Update components.rs 2023-08-19 04:30:49 -07:00
Nathan Sobo
76993f6b57 WIP: Trying to find a composable approach to styling that plays nice with layout engine 2023-08-18 20:08:29 -06:00
Mikayla Maki
29c339e3b4
Revert "Remove semantic search UI" (#2865)
This reverts commit c0f042b39a, where I
deleted the semantic-search related UI code.

Apologies to @KCaverly for the misunderstanding

Release Notes:

- N/A
2023-08-18 18:05:19 -07:00
Mikayla Maki
15f91f38f6
Remove potential osascript hijacking attack (#2867)
Fixes
https://linear.app/zed-industries/issue/Z-2818/security-vulnerability-dylib-injection

Release Notes:

- Fixed a potential local code-injection if a user installs the Zed CLI
for the first time with a hijacked `osascript` in their path.
2023-08-18 18:00:39 -07:00
Mikayla
d22caf5a19
Fix erorr in revert 2023-08-18 17:59:06 -07:00
Mikayla
5a356a4710
Remove potential osascript hijacking 2023-08-18 17:40:08 -07:00
Max Brunsfeld
ef9686c988
Reorganize the structure of the collab crate's db module (#2866)
This PR just moves some code around, with the goal of making it easier
to find things in the `collab::db` module. That has become a large
module. Previously, most of the logic lived in one giant `impl Database`
item in `db.rs`.

I broke up this `impl` into several different `impl` blocks, grouped by
topic, each in a different file in a folder called `queries`.

I also pulled out the macro-generated id types into their own file,
moved the `TestDb` struct into its own file, and moved the `sea_orm`
entity declarations into a folder called `tables`.

New folder structure:

```
db
├── db_tests.rs
├── ids.rs
├── queries
│   ├── access_tokens.rs
│   ├── channels.rs
│   ├── contacts.rs
│   ├── projects.rs
│   ├── rooms.rs
│   ├── servers.rs
│   ├── signups.rs
│   └── users.rs
├── queries.rs
├── tables
│   ├── access_token.rs
│   ├── channel.rs
│   ├── channel_member.rs
│   ├── channel_path.rs
│   ├── contact.rs
│   ├── follower.rs
│   ├── language_server.rs
│   ├── project.rs
│   ├── project_collaborator.rs
│   ├── room.rs
│   ├── room_participant.rs
│   ├── server.rs
│   ├── signup.rs
│   ├── user.rs
│   ├── worktree.rs
│   ├── worktree_diagnostic_summary.rs
│   ├── worktree_entry.rs
│   ├── worktree_repository.rs
│   ├── worktree_repository_statuses.rs
│   └── worktree_settings_file.rs
├── tables.rs
└── test_db.rs
```

Release Notes:

- N/A
2023-08-18 17:29:15 -07:00
Max Brunsfeld
b35aaf144b Break up Database impl into multiple files, organized by topic 2023-08-18 17:03:34 -07:00
Max Brunsfeld
e964137d79 Reorganize source files of collab::db
* Move all sea_orm tables into a 'tables' module
* Move TestDb into its own file
* Move id types into their own module
2023-08-18 16:23:33 -07:00
Mikayla
48553d7c8f
Revert "Remove semantic search UI"
This reverts commit c0f042b39a.
2023-08-18 16:18:28 -07:00
Nathan Sobo
eec39dc23c WIP 2023-08-18 17:14:29 -06:00
Mikayla Maki
cb55204e22
Move the collab panel to the left by default (#2864)
Increase the indent size on channels
Switch font UI mono

Release Notes:

- Switch the collaboration panel font to Zed's sans-mono (preview only)
- Switch the default dock side to the left (preview-only)
- Increase the indent size on the channels panel (preview-only)
2023-08-18 16:06:10 -07:00
Mikayla Maki
24fbea1557
Update collab_panel.rs 2023-08-18 15:34:35 -07:00
Mikayla
4c15f26eba
Finish rename correctly 2023-08-18 15:26:36 -07:00
Mikayla
4c3227ce2a
Fix example compile erorr 2023-08-18 15:17:24 -07:00
Mikayla
84f35d4e6b
Add pub 2023-08-18 15:12:56 -07:00
Mikayla
8ef671d7a1
Move the collab panel to the left by default
Increase the indent size on channels
Switch font UI mono
2023-08-18 15:04:22 -07:00
Conrad Irwin
f0ebbd01e6
Don't show vim mode when disabled (#2863)
Fixes vim's mode indicator showing up when vim is disabled.
2023-08-18 16:00:46 -06:00
Conrad Irwin
3ab3042e95 Don't show vim mode when disabled 2023-08-18 15:50:34 -06:00
Max Brunsfeld
1c46749ad7 Fix regression in Buffer::language_scope_at
Co-authored-by: Julia <julia@zed.dev>
2023-08-18 12:58:09 -07:00
Max Brunsfeld
08429169e2
Upgrade Tree-sitter for error recovery bug fix (#2860)
Bumps Tree-sitter for
https://github.com/tree-sitter/tree-sitter/pull/2526.

Release Notes:

- Fixed a bug where small syntax errors would mess up syntax
highlighting more than necessary when editing certain languages, like
Scheme and PHP.
2023-08-18 12:01:53 -07:00
Max Brunsfeld
09fcacdfd1 Upgrade Tree-sitter for error recovery bug fix 2023-08-18 11:31:40 -07:00
Conrad Irwin
93461d366c Fix <Enter> to go to non-whitespace character
Fixes: zed-industries/community#831
2023-08-18 12:24:39 -06:00
Conrad Irwin
e3c0e93e46 Fix cursor adjustment on scroll
Fixes: zed-industries/community#1929

Also preserves visual modes correctly.
2023-08-18 11:23:43 -06:00
Conrad Irwin
d1aa82bb48
vim visual block (#2849)
Release notes:

- vim: add Visual Block mode
([#984](https://github.com/zed-industries/community/issues/984)),
([#1415](https://github.com/zed-industries/community/issues/1415)).
- vim: add support for `a<object>` and `i<object>` in visual modes
- vim: fix scroll shortcuts (`ctrl-{f,b,d,u,e,y}`) in visual modes
- allow `shift-enter` to type a newline.
2023-08-18 09:55:40 -06:00
Kirill Bulatov
269dad5a9c Respect completion resolve server capabilities
Only query for additional edits if the server supports it

Co-Authored-By: Julia Risley <julia@zed.dev>
2023-08-18 16:55:47 +03:00
Kyle Caverly
8451e7eb7e
Project search design (#2834)
TODO before merging: 
- [x] Re-run project search when options (case, word, regex) change

/cc @PixelJanitor 
Release Notes:
- Revamped project & buffer search UI.
- Added "Cycle Mode" command for search
2023-08-18 14:38:01 +02:00
Nathan Sobo
b910c85f7f Still need to wire up MouseMove with the new regions 2023-08-18 02:23:06 -06:00
Nathan Sobo
3709eff34b Compiling 2023-08-18 01:59:21 -06:00