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

Edit (Prototype): Use LSP context to include symbol references for doc #1904

Closed
wants to merge 10 commits into from

Conversation

umpox
Copy link
Contributor

@umpox umpox commented Nov 27, 2023

Just a prototype, didn't find it useful but may use it elsewhere

Test plan

@umpox umpox self-assigned this Nov 27, 2023
Base automatically changed from tr/faster-doc-command to main November 28, 2023 11:26
umpox added a commit that referenced this pull request Nov 28, 2023
closes #1464

## Description

This PR:
- Streamlines the `doc` intent flow for fixup tasks. Previously we would
treat these as "edit", which means we would try to fetch lots of context
from the selected code. That is very rarely helpful, for documenting we
really just want to take the surrounding code and the current selection.

I also investigating going the other way, and fetching relevant
reference code for a documentable symbol. This confirmed to me that it's
not necessarily helpful. It can lead to the LLM documenting code based
on how it is used elsewhere rather than how it should be used. That
might help for "explaining" code but not for documenting. (Related PR:
#1904)


## Test plan

1. Run doc command via right click menu
2. Run doc command via sidebar
3. Run doc command via code action

<!-- Required. See
https://docs.sourcegraph.com/dev/background-information/testing_principles.
-->
Copy link

github-actions bot commented Feb 3, 2024

This PR is marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed automatically in 5 days.

@github-actions github-actions bot added the Stale label Feb 3, 2024
@github-actions github-actions bot closed this Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant