Commit Graph
100 Commits
Author SHA1 Message Date
Nathan Sobo 8a851ad7f8 Fix annoying system prompt (#2538)
I was having fun, but it was too much. It makes the assistant too
annoying to be useful.

Release Notes:

Use `N/A` in this section if this item should be skipped in the release
notes.

Add release note lines here:

* Dialed back the system prompt on the assistant.
2023-05-29 22:05:40 -06:00
Nathan Sobo 063613bf4e Fix annoying system prompt
I was having fun, but it was too much. It makes the assistant too annoying to be useful.
2023-05-29 21:47:59 -06:00
Nathan Sobo ffbfbe422b WIP: Not sure I actually want to rip this out 2023-05-26 16:11:58 -06:00
Nathan Sobo 3904971bd8 Hide assistant gutter 2023-05-26 15:38:03 -06:00
Nathan Sobo 8f6e67f440 Cancel assists on escape 2023-05-26 14:49:27 -06:00
Nathan SoboandAntonio Scandurra 80080a43e4 Start on an assistant panel based on multi-buffers
Each message is represented as a multibuffer excerpt to allow for
fluid editing of the conversation transcript.

Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-05-26 10:09:55 -06:00
Nathan Sobo 0b7d095c0a Introduce the ability to talk to GPT-4 within buffers on preview and dev (#2524)
This adds basic ability to interact with OpenAI inside a buffer.

Release Notes:

* If`OPENAI_API_KEY` is defined in your environment, you can now run the
`ai: assist` command to pass the text of your current buffer to GPT-4.
If you're editing a file with a `.zmd` extension, you can also invoke
the model with `cmd-enter.` (preview-only)
2023-05-24 12:00:43 -06:00
Nathan Sobo 26051de160 Clean up 2023-05-24 11:08:00 -06:00
Nathan Sobo 747322a02d Merge remote-tracking branch 'origin/main' into zmd 2023-05-24 11:04:07 -06:00
Nathan Sobo d495c1b804 Only run AI agent on dev and preview 2023-05-24 10:58:33 -06:00
Nathan Sobo ba79a8ba94 WIP 2023-05-24 10:26:14 -06:00
Nathan Sobo 50e1e17d09 WIP 2023-05-24 09:53:08 -06:00
Nathan Sobo 051c7566cc WIP 2023-05-24 09:38:37 -06:00
Nathan Sobo 8abaf66602 WIP 2023-05-24 09:21:50 -06:00
Nathan Sobo 6368ade1da WIP 2023-05-24 09:12:16 -06:00
Nathan Sobo 637ed79603 WIP 2023-05-23 18:16:49 -06:00
Nathan Sobo 65fc50745b WIP 2023-05-23 18:04:33 -06:00
Nathan Sobo d934da1905 WIP 2023-05-23 15:25:34 -06:00
Nathan Sobo 7be41e19f7 WIP 2023-05-23 08:52:21 -06:00
Nathan Sobo 073967c80b WIP 2023-05-23 01:56:28 -06:00
Nathan Sobo 5362e7d346 WIP 2023-05-23 01:52:37 -06:00
Nathan Sobo 394e87d17c WIP 2023-05-23 01:23:01 -06:00
Nathan Sobo 0de5a444d3 WIP 2023-05-23 00:22:21 -06:00
Nathan Sobo 234dbc3ca9 WIP 2023-05-23 00:16:44 -06:00
Nathan Sobo c4d88bc529 WIP 2023-05-22 23:43:02 -06:00
Nathan Sobo 30de64845f WIP 2023-05-22 23:11:27 -06:00
Nathan Sobo 7e6cccfa3d WIP: Stream in completions
Drop dependency on tokio introduced by async-openai and do it ourselves.

The approach I'm taking of replacing instead of appending is causing issues. Need to just append.
2023-05-22 20:28:22 -06:00
Nathan Sobo d5cf595761 Enable "test-support" feature on editor dependencies for tests (#2499)
Enable the `"test-support"` feature whenever we depend on the `editor`
crate in tests.

If we don't do this, we end up depending on `livekit_client` without
enabling `"test-support"`, and this causes us to link against
`WebRTC.framework` in its build script, which causes a dynamic linker
error when starting the tests.

Fixes
https://linear.app/zed-industries/issue/Z-1646/cant-run-package-tests-for-activity-monitor-and-auto-update

Release Notes:

* No notes
2023-05-20 10:19:59 -06:00
Nathan Sobo 986eafd84e Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
Nathan Sobo 912fd23006 Parse markdown into an OpenAI chat completion request 2023-05-20 09:43:12 -06:00
Nathan Sobo ba50b35de6 wip 2023-05-13 14:34:09 -06:00
Nathan Sobo 6c60853842 Don't close panel on event unless active; add tests 2023-05-12 15:44:09 -06:00
Nathan Sobo bd795d7607 Preserve panel size when re-docking between left and right 2023-05-12 15:15:11 -06:00
Nathan Sobo 214354b4da Make panels independently resizable 2023-05-12 09:44:14 -06:00
Nathan Sobo ee3637216e Add TreeMap::remove_between that can take abstract start and end points
This commit introduces a new adaptor trait for SeekTarget that works around
frustrating issues with lifetimes. It wraps the arguments in a newtype wrapper
that lives on the stack to avoid the lifetime getting extended to the caller
of the method.

This allows us to introduce a PathSuccessor object that can be passed as the
end argument of remove_between to remove a whole subtree.
2023-05-12 08:21:01 -07:00
Nathan SoboandJulia Risley 5549669316 Test moving panels
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-05-10 10:41:03 -06:00
Nathan Sobo cc21421ea8 Rename item to panel in various locations 2023-05-10 09:54:20 -06:00
Nathan Sobo 9173916ab8 Remove unused terminal_button module 2023-05-09 20:24:37 -06:00
Nathan Sobo f554877ff4 Render the bottom dock buttons before the right dock buttons 2023-05-09 17:41:24 -06:00
Nathan SoboandJoseph Lyons ba248244ec Allow terminal to be docked left, bottom, or right
Co-Authored-By: Joseph Lyons <joseph@zed.dev>
2023-05-09 17:36:49 -06:00
Nathan SoboandJoseph Lyons 6a7feb4c4c Allow the project panel to be docked right or left
Co-Authored-By: Joseph Lyons <joseph@zed.dev>
2023-05-09 17:26:54 -06:00
Nathan Sobo 0d78266ddb Replace todo with unimplemented to reduce distractions 2023-05-09 16:41:10 -06:00
Nathan Sobo 6d16d2224d Merge branch 'main' into panels 2023-05-09 16:35:04 -06:00
Nathan Sobo 5e8b7bd06d Replace todo with unimplemented to reduce distractions 2023-05-09 16:31:53 -06:00
Nathan Sobo 6645323f1b WIP 2023-05-09 13:28:34 -06:00
Nathan Sobo 1ddbda5095 Rename DockItem to Panel 2023-05-09 10:18:11 +02:00
Nathan Sobo 03f8c1206a Rename Sidebar to Dock 2023-05-09 10:18:10 +02:00
Nathan Sobo 1919a826f9 Remove dock from workspace 2023-05-09 10:18:10 +02:00
Nathan Sobo a45282eb63 Merge pull request #2414 from zed-industries/spawn-weak-for-views
Pass a `WeakViewHandle` to `ViewContext::spawn`
2023-04-26 06:10:44 -06:00
Nathan Sobo e6604d1641 Fix missing actions in the command palette
Previously, the workspace view was on the stack when we were computing the
available actions, which excluded it. This is a stopgap. We should find a
better solution ASAP.
2023-04-21 15:59:29 -06:00
Nathan Sobo 83bf3d071d WIP 2023-04-21 15:36:52 -06:00
Nathan Sobo 55db28e074 Eliminate ReadModel trait 2023-04-21 15:05:19 -06:00
Nathan Sobo 5dac95c47c Eliminate ReadView trait 2023-04-21 15:03:57 -06:00
Nathan Sobo bce51c521a Merge pull request #2403 from zed-industries/into-element
Rename Element to AnyElement, Drawable to Element, and make containers generic over any Element type
2023-04-21 14:44:22 -06:00
Nathan Sobo 993dbf86cb Merge remote-tracking branch 'origin/main' into into-element 2023-04-21 14:27:25 -06:00
Nathan Sobo 09111b65d8 Merge pull request #2401 from zed-industries/simplify-context-lifetimes
Remove unnecessary lifetime parameter from WindowContext
2023-04-21 14:26:26 -06:00
Nathan Sobo caf3d5c163 Fix more formatting 2023-04-21 14:25:49 -06:00
Nathan Sobo c1810e8ec9 Fix formatting 2023-04-21 13:09:36 -06:00
Nathan SoboandMax Brunsfeld fe492eacbf Refine naming of element-related types and traits
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 13:06:37 -06:00
Nathan Sobo 1b2e480e1e Remove unnecessary replace 2023-04-20 15:26:48 -06:00
Nathan Sobo 0bce80b6f8 Fix remaining vim failures 2023-04-20 15:25:11 -06:00
Nathan Sobo d70644618a WIP: Make PickerDelegate a fully owned object instead of a view
This avoids issues with the parent view being on the stack when we want to
interact with the delegate from the picker. Still have several picker usages
to convert.
2023-04-19 22:05:29 -06:00
Nathan Sobo 5514349b6b Add Component elements 2023-04-18 22:49:06 -06:00
Nathan Sobo b89c4e06be WIP: Compiling, many warnings, haven't tested 2023-04-12 12:54:24 -06:00
Nathan Sobo 25ad635577 WIP 2023-04-12 12:38:26 -06:00
Nathan Sobo 4cb13fb39c WIP 2023-04-12 12:22:26 -06:00
Nathan Sobo a25f962185 WIP 2023-04-12 12:13:35 -06:00
Nathan Sobo 40896352ff wip 2023-04-12 10:28:53 -06:00
Nathan Sobo 868301bedb WIP 2023-04-12 10:07:17 -06:00
Nathan Sobo b54f08db77 WIP 2023-04-12 06:51:03 -06:00
Nathan Sobo d9e4136b02 WIP 2023-04-11 21:56:37 -06:00
Nathan Sobo e6cc132b19 WIP 2023-04-11 18:48:00 -06:00
Nathan Sobo e115baa60c WIP 2023-04-11 18:21:56 -06:00
Nathan Sobo 3de8fe0f87 WIP 2023-04-10 17:27:47 -06:00
Nathan Sobo 6638407ff9 WIP: Everything shredded 2023-04-10 16:10:32 -06:00
Nathan Sobo 7536645eea WIP 2023-04-08 08:01:05 -06:00
Nathan Sobo 9d23a98157 WIP 2023-04-08 06:43:39 -06:00
Nathan Sobo 676dbdc57b Merge pull request #2365 from zed-industries/dont_export_gpui_platform_module
Don't export platform::* from gpui
2023-04-07 12:12:05 -06:00
Nathan Sobo 2186de38ab Merge AppContext impl blocks 2023-04-07 11:54:08 -06:00
Nathan Sobo 2615a11f7c Don't export platform::* from gpui
I'd like to avoid cluttering the top-level namespace with all the platform-
specific types.
2023-04-07 11:45:53 -06:00
Nathan Sobo dad403f483 Merge pull request #2362 from zed-industries/eliminate-mutable-app-context
Merge MutableAppContext into AppContext
2023-04-06 16:19:47 -06:00
Nathan Sobo 95eb918b4c Fix broken test due to trimmed trailing whitespace during formatting 2023-04-06 16:10:39 -06:00
Nathan Sobo 8136d8a8a6 Fix formatting 2023-04-06 15:54:44 -06:00
Nathan Sobo de9bf6dfbd Merge MutableAppContext into AppContext
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06:00
Nathan Sobo e5861d6c35 Fix typos in EULA 2023-04-05 18:02:35 -06:00
Nathan Sobo 0d0f6b5a05 Update EULA 2023-04-05 08:18:51 -06:00
Nathan Sobo cdfe873802 Merge pull request #2343 from zed-industries/handles
Make typed handles wrappers around their untyped equivalents
2023-04-03 09:20:37 -04:00
Nathan Sobo 138aa0492a Add downcast_ref to AnyViewHandle
I use unsafe code to transmute an AnyViewHandle to a ViewHandle<T> when
the type matches. Because ViewHandle<T> is repr(transparent) to the
wrapped AnyViewHandle, this is safe.
2023-04-02 16:10:16 -06:00
Nathan Sobo 71cf6ec5ae Use into_any instead of weird 'as' hack 2023-04-02 15:55:30 -06:00
Nathan Sobo 27258a0889 Remove From trait for AnyViewHandle in favor of into_any method
I think it's more explicit.
2023-04-02 15:50:42 -06:00
Nathan Sobo aed8df96ff Wrap AnyWeak handles with their typed counterparts 2023-04-02 15:42:03 -06:00
Nathan Sobo 82a713fd1d Store AnyViewHandle inside ViewHandle and Deref to it 2023-04-02 14:59:55 -06:00
Nathan Sobo d89936e4a9 Merge pull request #2319 from zed-industries/copy-highlight-json
Add "editor: copy highlight json" command
2023-03-24 17:17:45 -06:00
Nathan Sobo f0992e7d67 Trim empty tokens; copy selected range if non-empty 2023-03-24 17:10:50 -06:00
Nathan Sobo 3dfedd1b21 Merge adjacent chunks with the same highlight name in copied JSON 2023-03-24 16:52:00 -06:00
Nathan Sobo 195215f1e0 Add "editor: copy highlight json" command
Nate needs this to feed to Figma for highlighted code in designs.
2023-03-24 16:37:57 -06:00
Nathan Sobo e017b99384 Fix typo 2023-03-22 09:13:10 -06:00
Nathan Sobo d429ce0f62 Merge pull request #2308 from zed-industries/feedback-icon
Use an envelope as the feedback icon so we can use the speech bubble for discussions
2023-03-20 09:14:34 -06:00
Nathan Sobo 10e6c5b651 Use an envelope as the feedback icon
This makes room to use the speech bubble for discussion threads.
2023-03-20 09:04:30 -06:00
Nathan Sobo 385dfe1661 Merge pull request #2289 from zed-industries/sort-language-names-case-agnostically
Sort language names case agnostically
2023-03-14 20:00:52 -06:00