Commit Graph

156 Commits

Author SHA1 Message Date
Antonio Scandurra
00cede63a8 Show message headers again
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-06-13 15:55:52 +02:00
Antonio Scandurra
2842fc2b1d Merge messages whose header has been invalidated 2023-06-13 15:16:04 +02:00
Antonio Scandurra
2ae8b558b9 Get back to a compiling state with Buffer backing the assistant 2023-06-13 13:43:06 +02:00
Antonio Scandurra
7db690b713 WIP 2023-06-12 17:50:13 +02:00
Antonio Scandurra
d3e0d38bef Fix assistant panel tests 2023-06-07 15:24:08 +02:00
Antonio Scandurra
d26cc2c897 Maintain scroll bottom when streaming assistant responses 2023-06-07 15:01:50 +02:00
Antonio Scandurra
0dae8f2dd8 Merge remote-tracking branch 'origin/main' into assistant-2 2023-06-07 09:34:16 +02:00
Antonio Scandurra
a6feaf1300 Allow search assistant editors 2023-06-07 09:24:18 +02:00
Max Brunsfeld
dbbd0558c3 Eliminate assets crate 2023-06-06 11:46:46 -07:00
Antonio Scandurra
16090c35ae Insert reply after assistant message when hitting cmd-enter
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-06 19:15:06 +02:00
Antonio Scandurra
ef7ec265c8 Cycle message roles on click
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-06 18:45:08 +02:00
Antonio Scandurra
ac7178068f Include message headers in copied assistant text
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-06 18:18:04 +02:00
Antonio Scandurra
093ce8a9ac Simplify prompt
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-06 17:45:58 +02:00
Antonio Scandurra
2b1aeb07bc Show error message when requests to OpenAI fail
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-06-06 16:53:56 +02:00
Antonio Scandurra
9c59146026 Set assistant editor's title based on the first question/answer pair
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-06-06 15:59:10 +02:00
Antonio Scandurra
69b8267b6b Show the current model and allow clicking on it to change it 2023-06-06 13:13:44 +02:00
Antonio Scandurra
ada222078c Insert a user reply when hitting cmd-enter in an assistant message 2023-06-06 13:13:41 +02:00
Antonio Scandurra
337dda8e3a Only remove excerpts when an edit touches them 2023-06-06 12:27:05 +02:00
Nathan Sobo
23836eb251 Not working yet: Remove empty messages unless they contain the cursor
Problem is, I'm trying to trust the excerpt id of the selection head,
but it's a sentinel value and not the actual excerpt id of the message.
I think we probably need to resolve to offsets instead.
2023-06-05 22:58:08 -06:00
Antonio Scandurra
bef6932da7 Avoid accidentally taking the api_key when requesting an assist 2023-06-05 11:25:21 +02:00
Antonio Scandurra
f00f16fe37 Show remaining tokens 2023-06-02 17:27:21 +02:00
Antonio Scandurra
3750e64d9f Save OpenAI API key in the keychain 2023-06-02 12:15:25 +02:00
Antonio Scandurra
a81d164ea6 Allow saving the OpenAI API key in the assistant panel 2023-06-02 11:38:02 +02:00
Antonio Scandurra
d0aff65b1c Allow moving the assistant panel to other docks 2023-06-02 10:55:19 +02:00
Antonio Scandurra
55c8c6d3fb Allow adding new contexts 2023-06-02 10:29:22 +02:00
Antonio Scandurra
cf934ab696 Fix compile errors 2023-06-02 10:08:06 +02:00
Antonio Scandurra
69e8a166e4 Start on assistant::QuoteSelection 2023-05-30 15:25:53 +02:00
Antonio Scandurra
dc365472a6 Merge remote-tracking branch 'origin/main' into assistant-2 2023-05-30 15:11:06 +02:00
Antonio Scandurra
890c42a75a Show time in assistant messages 2023-05-29 16:23:16 +02:00
Antonio Scandurra
52e8bf2928 Show custom header for assistant messages 2023-05-29 15:57:55 +02:00
Antonio Scandurra
404bebab63 Set markdown as the assistant's buffer languages 2023-05-29 11:34:26 +02: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 Sobo
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
Kirill Bulatov
2fdc960704 Properly display labels for currently opened external files 2023-05-26 15:44:44 +03:00
Antonio Scandurra
7e1ea8f274 Remove stray dbg! 2023-05-25 12:04:41 +02:00
Nathan Sobo
26051de160 Clean up 2023-05-24 11:08:00 -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
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
912fd23006 Parse markdown into an OpenAI chat completion request 2023-05-20 09:43:12 -06:00