Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start on adding support for editing via the assistant panel #14795

Merged
merged 32 commits into from
Jul 19, 2024
Merged

Start on adding support for editing via the assistant panel #14795

merged 32 commits into from
Jul 19, 2024

Conversation

as-cii
Copy link
Member

@as-cii as-cii commented Jul 19, 2024

Note that this shouldn't have any visible user-facing behavior yet. The feature is incomplete but we wanna merge early to avoid a long-running branch.

Release Notes:

  • N/A

as-cii and others added 29 commits July 16, 2024 10:57
This change simplifies the assist method by removing the need for
selected_messages. Instead, it always uses the last valid message as
the basis for the assistant's response. This approach streamlines the
interaction flow and makes the behavior more predictable.

The method now returns an Option<MessageAnchor> for the new user message,
allowing callers to easily handle cases where assistance isn't possible.
This change improves error handling and provides better feedback to the UI.

Co-Authored-By: Nathan <[email protected]>
Co-Authored-By: Nathan <[email protected]>
Co-Authored-By: Nathan <[email protected]>
TODO:

1. Deduplicate symbol locations when a symbol is repeated, or we have a parent that contains it
2. When appending or prepending to a symbol, show the leading / trailing lines
3. Open multibuffers as previews without switching focus
4. Close preview tabs when cursor moves out of a step
This commit updates the edit step locations functionality in the assistant panel:

- Renames `EditLocation` to `EditStepLocation` for clarity
- Updates `locations_multibuffer` and `locations` methods to handle multiple ranges per buffer
- Implements deduplication and sorting of ranges for each buffer
- Adds an `intersects` method to `AnchorRangeExt` for range comparison

These changes improve the handling of edit step locations, allowing for more
efficient and accurate representation of edit operations across multiple files.

Co-Authored-By: Nathan <[email protected]>
Co-Authored-By: Nathan <[email protected]>
We want to add optional @OPEN and @close captures to help with
appending/prepending symbols in the correct location beneath parent
outline items with braces or other open/close delimiters. This
causes items to be matched out of order as we wait to match the closing }.

Co-Authored-By: Nathan <[email protected]>
This will be useful to append/prepend children via the assistant.
Co-Authored-By: Nathan <[email protected]>
Co-Authored-By: Nathan <[email protected]>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jul 19, 2024
# Conflicts:
#	crates/project/src/project.rs
@as-cii as-cii merged commit 4d17791 into main Jul 19, 2024
9 checks passed
@as-cii as-cii deleted the steps branch July 19, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant