ZIm/crates/assistant2/src
Agus Zubiaga e298301b40
assistant: Make scripting a first-class concept instead of a tool (#26338)
This PR makes refactors the scripting functionality to be a first-class
concept of the assistant instead of a generic tool, which will allow us
to build a more customized experience.

- The tool prompt has been slightly tweaked and is now included as a
system message in all conversations. I'm getting decent results, but now
that it isn't in the tools framework, it will probably require more
refining.

- The model will now include an `<eval ...>` tag at the end of the
message with the script. We parse this tag incrementally as it streams
in so that we can indicate that we are generating a script before we see
the closing `</eval>` tag. Later, this will help us interpret the script
as it arrives also.

- Threads now hold a `ScriptSession` entity which manages the state of
all scripts (from parsing to exited) in a centralized way, and will
later collect all script operations so they can be displayed in the UI.

- `script_tool` has been renamed to `assistant_scripting` 

- Script source now opens in a regular read-only buffer  

Note: We still need to handle persistence properly

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-03-09 09:01:49 +00:00
..
context_picker assistant2: Highlight crease on selection (#24358) 2025-02-20 13:25:08 -03:00
ui gpui: Rename rounded_md to rounded_sm (#26228) 2025-03-06 17:57:31 +00:00
active_thread.rs assistant: Make scripting a first-class concept instead of a tool (#26338) 2025-03-09 09:01:49 +00:00
assistant.rs chore: Extract PromptStore out of prompt_library (#25837) 2025-03-01 00:34:28 +01:00
assistant_configuration.rs gpui: Rename rounded_md to rounded_sm (#26228) 2025-03-06 17:57:31 +00:00
assistant_model_selector.rs Fix language model selector (#26138) 2025-03-05 12:48:10 -05:00
assistant_panel.rs assistant: Make scripting a first-class concept instead of a tool (#26338) 2025-03-09 09:01:49 +00:00
buffer_codegen.rs chore: Extract PromptStore out of prompt_library (#25837) 2025-03-01 00:34:28 +01:00
context.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
context_picker.rs Remove more references to 'model' in GPUI APIs (#23693) 2025-01-27 04:00:27 +00:00
context_store.rs assistant2: Allow adding directories as context that contain non-UTF8 files (#26135) 2025-03-05 16:47:43 +00:00
context_strip.rs Revert "file_finder: Remove common segments of long paths in search results (#25049)" (#25163) 2025-02-19 15:32:29 +00:00
history_store.rs assistant2: Combine history views into one (#25293) 2025-02-20 22:53:58 +00:00
inline_assistant.rs Refactor Completions to allow non-LSP ones better (#26300) 2025-03-07 20:19:28 +00:00
inline_prompt_editor.rs Fix language model selector (#26138) 2025-03-05 12:48:10 -05:00
message_editor.rs assistant2: Fix font fallbacks (#26258) 2025-03-06 18:14:53 -08:00
terminal_codegen.rs windows: Fix terminal inline assistant (#25715) 2025-02-27 10:03:46 +08:00
terminal_inline_assistant.rs chore: Extract PromptStore out of prompt_library (#25837) 2025-03-01 00:34:28 +01:00
thread.rs assistant: Make scripting a first-class concept instead of a tool (#26338) 2025-03-09 09:01:49 +00:00
thread_history.rs git_ui: Prevent button overflow due to long names (#25940) 2025-03-03 18:38:15 +00:00
thread_store.rs assistant2: Add helper methods to Thread for dealing with tool use (#26310) 2025-03-07 23:16:45 +00:00
tool_use.rs assistant2: Restore tool uses when loading saved threads (#25942) 2025-03-03 18:32:26 +00:00
ui.rs assistant2: Sketch in sending file context to model (#21829) 2024-12-10 16:35:53 -05:00