Commit Graph

8449 Commits

Author SHA1 Message Date
Joseph T. Lyons
507a5db09c WIP
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-08-25 15:06:31 -04:00
Conrad Irwin
bde67b2b9c Fix merge-conflict 2023-08-25 11:59:16 -06:00
Conrad Irwin
f18cdcba54 Fix relative line numbers in vim visual mode
In visual mode when your selection ends with a newline we show the
cursor at the end of the previous line (not the start of the current
line). We had only been accounting for this if the cursor was on-screen.
2023-08-25 11:50:41 -06:00
Conrad Irwin
8d5dc266a3 Fix relative line numbers when newest cursor offscreen 2023-08-25 11:50:41 -06:00
Conrad Irwin
790aa5d476 Add relative_line_mode
Co-Authored-By: joseph@zed.dev
2023-08-25 11:50:41 -06:00
Conrad Irwin
1f3e009b32 Fix zed-industries/community#1950 2023-08-25 11:34:07 -06:00
Max Brunsfeld
f798be6e27 Fix rust 1.72 warnings about shadowed glob re-exports 2023-08-25 10:25:21 -07:00
Max Brunsfeld
404f76739c Format let-else statements 2023-08-25 10:11:32 -07:00
Antonio Scandurra
c4966ff57a Remove warning 2023-08-25 17:35:14 +02:00
Antonio Scandurra
75a6a94e96 Add placeholder text for inline assistant prompts 2023-08-25 17:24:26 +02:00
Kirill Bulatov
44c340b5f2 Properly invalidate the hint cache 2023-08-25 17:33:17 +03:00
Antonio Scandurra
b101a7edff Cancel last inline assist when escaping from the editor 2023-08-25 15:54:52 +02:00
Antonio Scandurra
fdbf4680bb Ensure the inline assistant works with gpt-3.5 2023-08-25 15:39:10 +02:00
Kirill Bulatov
2b95f0580e Fix the tests 2023-08-25 16:25:43 +03:00
Kirill Bulatov
c10c3e2b54 Only invalidate when doing first, visible range query 2023-08-25 15:16:55 +03:00
Kirill Bulatov
a63e1571dc Defer querying inlay hints for invisible editor ranges
This way, only the visible part gets frequently queried on typing (and
hint /refresh requests that follow), with queries for invisible ranges
cancelled eagerly.
2023-08-25 15:16:55 +03:00
Kirill Bulatov
0a18aa694f Use stricter inlay range checks to avoid stuck highlights
Often, hint ranges are separated by a single '<` char as in
`Option<Vec<u32>>`. When moving the caret from left to right, avoid
inclusive ranges to faster update the matching hint underline.
2023-08-25 14:46:39 +03:00
Antonio Scandurra
27c90f12f6 Merge remote-tracking branch 'origin/main' into ai-refactoring 2023-08-25 13:37:32 +02:00
Antonio Scandurra
0444b5a775 💄 2023-08-25 13:36:52 +02:00
Kirill Bulatov
8ed280a029 Rebase fixes 2023-08-25 14:30:07 +03:00
Kirill Bulatov
e44516cc6c Add hover tests 2023-08-25 14:26:17 +03:00
Kirill Bulatov
f19c659ed6 Add link_go_to_definition test for inlays 2023-08-25 14:26:17 +03:00
Kirill Bulatov
abd2d012b1 Properly binary search cached inlay hints 2023-08-25 14:26:17 +03:00
Kirill Bulatov
3c55c933d4 Be more lenient with hint resolution, always return some hint 2023-08-25 14:26:17 +03:00
Kirill Bulatov
852427e87b Use inlay highlights in randomized tests 2023-08-25 14:26:17 +03:00
Kirill Bulatov
7cd60d6afb Simplify and restore client resolve capabilities 2023-08-25 14:26:17 +03:00
Kirill Bulatov
dcf570bb03 Fix resolve status conversion 2023-08-25 14:26:17 +03:00
Kirill Bulatov
bcaff0a18a Propagate inlay background highlights to data storage 2023-08-25 14:26:17 +03:00
Kirill Bulatov
4b78678923 Prepare background highlights for inlay highlights 2023-08-25 14:26:17 +03:00
Kirill Bulatov
12ffbe54fb Unify text and inlay highlights 2023-08-25 14:26:17 +03:00
Kirill Bulatov
420f8b7b15 Prepare for inlay and text highlight unification 2023-08-25 14:26:17 +03:00
Kirill Bulatov
4cc9f2f525 Highlight inlay hint parts on cmd-hover
Co-Authored-By: Antonio <antonio@zed.dev>
2023-08-25 14:26:17 +03:00
Kirill Bulatov
f8874a726c Attempt to highlight inlays 2023-08-25 14:26:17 +03:00
Kirill Bulatov
6c5761d05b Pass inlay highlight information 2023-08-25 14:26:17 +03:00
Kirill Bulatov
477fc865f5 Properly resolve inlay label parts' locations and buffers 2023-08-25 14:26:17 +03:00
Kirill Bulatov
7eab18ec89 Pass inlay go to definition data 2023-08-25 14:26:17 +03:00
Kirill Bulatov
ac86bbac75 Prepare for hover functionality refactoring 2023-08-25 14:26:17 +03:00
Kirill Bulatov
80e8714241 Send inlay hint resolve requests 2023-08-25 14:26:17 +03:00
Kirill Bulatov
3434990b70 Store inlay hint resolve data 2023-08-25 14:26:17 +03:00
Kirill Bulatov
e4b78e322e Revert "Strip off inlay hints data that should be resolved"
Without holding all hints in host's cache, this is impossile.
Currenly, we keep hint caches separate and isolated, so this will not
work when we actually resolve.
2023-08-25 14:26:17 +03:00
Kirill Bulatov
d1cb0b3c27 Properly detect hovered inlay hint label part 2023-08-25 14:26:17 +03:00
Kirill Bulatov
d34491e822 Draft inlay hint part hover detection 2023-08-25 14:26:17 +03:00
Antonio Scandurra
971c833e80 Improve background highlighting of inline assists 2023-08-25 12:35:36 +02:00
Antonio Scandurra
144f5c5d41 Use a left bias for the prompt editor 2023-08-25 12:25:43 +02:00
Antonio Scandurra
66a496edd7 Allow generating code without editing it 2023-08-25 12:16:28 +02:00
Antonio Scandurra
c1bd035875 Rework inline assistant 2023-08-25 11:39:27 +02:00
Kyle Caverly
bc7e9088fe
Eager Semantic Indexing Queue (#2886)
Optimization to the Semantic Indexing Engine.

We've transitioned from a framework in which the entire project tree is
walked at each index command, to an eager queuing method, in which an
initial queue of outstanding indexing work is initialized upon workspace
creation, and then subscriptions are leveraged for file change events to
continually keep an updated view on outstanding work.

This optimization contributes towards quicker user feedback, when
initializing or using Semantic Search functionality. It also opens the
doors towards better transparency across the system on outstanding
indexing work.

Release Notes:

- Refactored index operation queue to an eager queuing framework.
- Moved semantic search initialization to workspace creation.
- Adjusted rate limiting strategy on api delays to reduce time spent
waiting for rate limits.
2023-08-25 11:03:05 +02:00
KCaverly
ee97bc54cf cleaned up warnings 2023-08-25 10:38:01 +02:00
Joseph T. Lyons
8288e5591d Automatically enable project search filters when using Search Inside 2023-08-25 02:21:07 -04:00
Joseph T. Lyons
0801e5e437 Merge branch 'main' into add-setting-to-automatically-enable-virtual-environment 2023-08-25 01:50:57 -04:00
Joseph T. Lyons
9fe580acb6 WIP 2023-08-25 01:50:54 -04:00
Mikayla Maki
fbc7b37b2f
Introduce channel notes (#2880)
![Screen Shot 2023-08-24 at 5 26 53
PM](https://github.com/zed-industries/zed/assets/326587/3e84c5a6-1aaf-4335-a880-4c32eb83332d)

### Todo

* [x] Snapshot channel buffers when everyone closes the buffer
* [x] Ensure that users who are in both a project and a channel note
have the same color in both places
* [x] Allow following project collaborators into channel notes
* [x] Expose notes for the current channel under "Current Call" section
of the collaboration panel
* [x] Offline state for the channel notes view
* [x] Make the channel context menu accessible to all members (to expose
the notes)
* [x] Wire in view and Item method overrides

Release Notes:

- N/A
2023-08-24 18:01:28 -07:00
Max Brunsfeld
a95dcfa8bc Make channel notes view searchable and navigable via pane history
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 17:18:18 -07:00
Max Brunsfeld
7b6c0c539c Show non-admin context menu items for all channel members
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 17:17:20 -07:00
Max Brunsfeld
c7c220309d Avoid creating redundant snapshots of channel notes buffers
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 16:55:45 -07:00
Max Brunsfeld
358a20494c Make channel notes read-only when disconnected
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 16:50:13 -07:00
Max Brunsfeld
a327320f7d Show channel notes in current call section of collab panel
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 15:00:54 -07:00
Max Brunsfeld
1ae54ca620 Dedup channel views
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 14:29:04 -07:00
Max Brunsfeld
5888e7b214 Dedup channel buffers 2023-08-24 13:40:44 -07:00
Max Brunsfeld
90f22cb0d2 Replicate editor state when following into channel notes
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 12:36:01 -07:00
Max Brunsfeld
24141c2f16 Ensure collaborators cursor colors are the same in channel buffers as in projects
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 11:31:41 -07:00
Max Brunsfeld
3268cce41a Fix error in update_channel_buffer when there are no operations to store
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 11:26:22 -07:00
Mikayla
199be8241c
Add following into channel notes
co-authored-by: max <max@zed.dev>
2023-08-24 11:25:20 -07:00
KCaverly
131950f670 add handling for Added file events to semantic index 2023-08-24 18:40:08 +02:00
Antonio Scandurra
805e44915c WIP 2023-08-24 17:23:12 +02:00
Antonio Scandurra
cbf7160054 Improve scoring 2023-08-24 16:32:55 +02:00
Antonio Scandurra
c1d9b37dbc Move to an inline refactoring prompt 2023-08-24 15:46:18 +02:00
Antonio Scandurra
2468506189 Always clear refactoring text highlights, even if an error occurs 2023-08-24 14:29:05 +02:00
Antonio Scandurra
71a5964c18 Rename merge_transaction_into to merge_transactions 2023-08-24 14:26:42 +02:00
KCaverly
a892a51ec3 update initialize project call to accomodate for test scenarios
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-24 13:46:43 +02:00
KCaverly
0b204bfdc8 reindex semantic index when search project pane is reactivated in semantic mode
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-24 13:40:04 +02:00
KCaverly
a1519e4c38 move semantic search project intialization to a subscribe event for workspace created
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-24 13:14:19 +02:00
KCaverly
e8e7b294d8 add delete files operation for remaining files in database not included in current worktree
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-24 12:49:20 +02:00
Antonio Scandurra
9674b03855 Make scoring more precise by using floats when diffing AI refactors 2023-08-24 12:45:44 +02:00
Antonio Scandurra
481bcbf204 Normalize indentation when refactoring 2023-08-24 12:45:21 +02:00
KCaverly
afe0e74868 remove worktree_file_mtimes in state as it is no longer used
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-24 12:42:41 +02:00
KCaverly
aa07872a24 accomodate for duplicate entries in indexing queue
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-24 12:36:43 +02:00
KCaverly
3f9f742530 update rate limiting embeddings strategy to delay less 2023-08-24 11:45:52 +02:00
Antonio Scandurra
985397b55c 📝 2023-08-24 09:52:07 +02:00
Conrad Irwin
e4794e3134 vim: Fix linewise copy of last line with no trailing newline
Along the way, delete the VimBindingTestContext by updating the
visual tests to no-longer need it.
2023-08-24 00:00:12 -06:00
Max Brunsfeld
7e83138805
Start work on showing consistent replica ids for channel buffers
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-23 18:37:01 -07:00
Max Brunsfeld
11ef5e2740
Simplify buffer_operations schema
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-23 18:37:01 -07:00
Max Brunsfeld
1d08f44e70
Snapshot channel notes buffers when everyone leaves
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-23 18:37:01 -07:00
Mikayla
4eff8ad186
Add channel notes view
co-authored-by: Max <max@zed.dev>
2023-08-23 18:37:00 -07:00
Mikayla
5a0315c4d5
Achieve end to end channel buffer synchronization
co-authored-by: max <max@zed.dev>
2023-08-23 18:34:43 -07:00
Max Brunsfeld
95ea664725
WIP 2023-08-23 18:34:43 -07:00
Max Brunsfeld
71611ee7a2
Get join_buffer_for_channel compiling
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-23 18:34:43 -07:00
Mikayla
364ed1f840
WIP: pass synchronize channel buffers integration test 2023-08-23 18:34:43 -07:00
Mikayla
a7a4e2e369
Add buffer integration test
Rearrange channel crate structure
Get channel buffer from database

co-authored-by: Max <max@zed.dev>
2023-08-23 18:34:43 -07:00
Max Brunsfeld
ff5035ea37
Start work on storing channel buffers 2023-08-23 18:34:43 -07:00
Max Brunsfeld
29e43384f0
Simplify macro for running a test with both databases 2023-08-23 18:34:43 -07:00
Mikayla Maki
26c3312049
Fix cursor and hover styles changing when dragging the mouse (#2884)
Since the resizing rework on docks, I noticed a lot of cursor flickering
when dragging, that drags trigger hover states in underlying elements
instead of being ignored, and that clicking and dragging off a button
can leave that button's click style active. This PR fixes all three
bugs.

Release Notes:

- Fixed several styling bugs related to dragging the mouse cursor
2023-08-23 18:29:29 -07:00
Mikayla
ff75d1663b
Fix stuck click styling when dragging off of a button 2023-08-23 18:22:48 -07:00
Mikayla
4d2f5a8e04
Fix cursor and hover styles changing when dragging the mouse 2023-08-23 18:08:33 -07:00
Mikayla
707ca34f19
Merge branch 'main' into disclosable-component 2023-08-23 16:30:27 -07:00
Mikayla
2a182b6a7b
Tune styles and disclosable elements 2023-08-23 16:25:40 -07:00
Piotr Osiewicz
1320fadc30
Bump rust embed (#2883)
This is a follow-up to a recent patch I've submitted to this crate to
improve compile time and runtime (in older versions file lookup was
essentially O(n) with respect to path count, now it's O(log n))

Release Notes:

- N/A
2023-08-24 00:16:35 +02:00
KCaverly
b72c4c576b catchup with main 2023-08-23 22:31:39 +02:00
KCaverly
e42b9e910e fix async calls on project updated entries to ensure that all files are updating appropriately 2023-08-23 22:28:30 +02:00
Joseph T. Lyons
af21546a43 collab 0.18.0 2023-08-23 14:19:24 -04:00
Antonio Scandurra
f22acb602e Apply a score boost when consecutive triplets of characters match 2023-08-23 19:21:44 +02:00
Joseph T. Lyons
72f0efb7b7 v0.102.x dev 2023-08-23 12:49:13 -04:00
Antonio Scandurra
301a12923f Merge transactions into the original assistant transaction
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-08-23 18:22:17 +02:00
Antonio Scandurra
a69461dba2 Don't score whitespace matches
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-08-23 17:19:07 +02:00
Antonio Scandurra
e4f49746e1 Group modal assistant edits into the same transaction
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-08-23 17:09:15 +02:00
Nathan Sobo
1bc4f22373
Rework element system, phase 1 (#2881)
This is a deep cut. There's still more work to do until we start
building UI with this. I've approached this as additively as possible,
but I've made a few changes to the rest of the code that I think would
be good to upstream before proceeding too much further.

Most of the interesting pieces are in gpui/playground, which is a
standalone binary that opens a single window and renders a new kind of
element. The layout of these new elements is provided by the taffy
layout engine crate, which conforms to web conventions. The idea is that
playground is relatively cheap to build and work on. As concepts
coalesce in playground, we can drop them into gpui and start
transitioning.
2023-08-23 08:26:38 -06:00
Antonio Scandurra
d3238441ce 🎨 2023-08-23 16:13:37 +02:00
KCaverly
09fd99b1e3 moved semantic_index project intialization to queue and channel method 2023-08-23 15:09:15 +02:00
Antonio Scandurra
2e1a4b2591 Adjust scoring 2023-08-23 13:26:30 +02:00
Antonio Scandurra
aa6d6582fd Add basic styling 2023-08-23 13:09:02 +02:00
Antonio Scandurra
a2671a29a0 Highlight text when the diff is the same 2023-08-23 10:28:43 +02:00
Joseph T. Lyons
7b170304df Shorten setting name 2023-08-23 04:07:10 -04:00
Joseph T. Lyons
711f156308 WIP 2023-08-23 04:04:36 -04:00
Antonio Scandurra
a93583065b Delete unused imports 2023-08-23 09:59:07 +02:00
Antonio Scandurra
c2935056e8 Support multi-byte characters in diff 2023-08-23 09:46:33 +02:00
Antonio Scandurra
a9871a7a70 Add randomized tests for incremental diff 2023-08-23 09:09:01 +02:00
Julia
a394aaa524 Add Tailwind server to JS/TS 2023-08-23 00:11:15 -04:00
Julia
68408f3838 Add VSCode CSS language server & add Tailwind to .css files 2023-08-22 23:50:40 -04:00
Julia
affb73d651 Only generate workspace/configuration for relevant adapter 2023-08-22 23:36:04 -04:00
Nathan Sobo
cd72a42bd4 Mark new crates as publish = false 2023-08-22 20:47:05 -06:00
Nathan Sobo
d375f7992d Merge branch 'main' into divs 2023-08-22 16:35:56 -06:00
Conrad Irwin
27ba77b16f Ensure editor clipboard contains \n too 2023-08-22 13:52:04 -06:00
Joseph T. Lyons
471810a3c2 WIP
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-08-22 15:29:25 -04:00
Conrad Irwin
33d7fe02ee Rewrite paste
- vim: support P for paste before
- vim: support P in visual mode for paste without overriding clipboard
- vim: fix position when using `p` on text copied outside zed
- vim: fix indentation when using `p` on text copied from zed
2023-08-22 13:27:57 -06:00
Conrad Irwin
31db5e4f62
Vim z 2819 (#2875)
Add `$` and `#` and a smoke test for vim-mode respecting the
configuration.
2023-08-22 11:38:06 -06:00
Nathan Sobo
733df38f9b Checkpoint
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-08-22 11:34:06 -06:00
Antonio Scandurra
3a511db5c9 🎨 2023-08-22 18:41:22 +02:00
Piotr Osiewicz
ccb3f6748c chore: fmt 2023-08-22 18:14:07 +02:00
Piotr Osiewicz
ccb9b5d278 Query char_kind for completion triggers.
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2023-08-22 18:12:05 +02: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
KCaverly
328b7e523c reorganized to stop the race 2023-08-22 15:01:21 +02:00
KCaverly
aabdfa210f working on initialization + index breakup 2023-08-22 14:45:27 +02:00
Antonio Scandurra
69b6967838 Integrate the new diff algorithm into the modal assistant 2023-08-22 13:59:45 +02:00
Antonio Scandurra
1ae5a909cd Start on a custom diff implementation 2023-08-22 12:07:41 +02:00
KCaverly
ced2b2aec3 reworked ProjectState to include additional context 2023-08-22 11:58:48 +02:00
Kirill Bulatov
814896de3f Reenable html, remove emmet due to the lack of the code 2023-08-22 12:51:14 +03:00
Kirill Bulatov
a35b3f39c5 Expand word characters for html and css 2023-08-22 12:41:59 +03:00
Piotr Osiewicz
007d1b09ac 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 12:23:30 +03: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
Antonio Scandurra
5453553cfa WIP 2023-08-22 08:16:22 +02:00
Conrad Irwin
168a213a44 Add test for word characters in vim 2023-08-21 22:37:14 -06:00
Conrad Irwin
14fa996cdc Add # and $ for js 2023-08-21 22:36:58 -06:00
Piotr Osiewicz
42b0c5dfdd Remove comment;for real now 2023-08-22 01:04:55 +02:00
Piotr Osiewicz
bca2d02a61 Revert "Remove dead comment"
This reverts commit 046759a366.
2023-08-22 01:04:15 +02:00
Piotr Osiewicz
344a09a4f8 Rename word_boundaries to word_characters 2023-08-22 01:02:25 +02:00
Piotr Osiewicz
046759a366 Remove dead comment 2023-08-22 01:01:27 +02: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
Piotr Osiewicz
6137d88a54 Merge branch 'main' into Z-2819 2023-08-21 17:41:27 +02:00
Piotr Osiewicz
00caad2f17 ..and use it in PHP language config 2023-08-21 17:41:05 +02:00
Piotr Osiewicz
ab5bd0ac5a Use new char_kind (parameterized by language) 2023-08-21 17:39:38 +02:00
Piotr Osiewicz
3e8522b5f2 WIP: Saved state from Friday.
Co-authored-by: Julia Risley <julia@zed.dev>
2023-08-21 17:09:03 +02:00
KCaverly
3d89cd10a4 added sha1 encoding for each document 2023-08-21 16:35:57 +02:00
Antonio Scandurra
5b9d48d723 Avoid diffing when the length is too small 2023-08-21 15:53:43 +02:00
Antonio Scandurra
42f02eb4e7 Incrementally diff input coming from GPT 2023-08-21 15:13:26 +02: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
bfd3e53dcd
Implement component test page 2023-08-19 16:29:24 -07:00
Mikayla
e946b0a2ec
Finish building out adapters and names
Document core traits
Add start for a component storybook
2023-08-19 14:40:05 -07:00
Mikayla
bd3ab82dac
Add disclosable components into channels
Rename components to more closely match their purpose
2023-08-19 05:18:53 -07: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
2d37128693
Actually get it compiling, omg 2023-08-18 19:02:27 -07:00
Mikayla
3178adefde
WIP: Add disclosable channels 2023-08-18 18:11:05 -07: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
Antonio Scandurra
3ad7f528cb Start on a refactoring assistant 2023-08-18 17:58:22 +02:00