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

Add entire file to context when no text is selected #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Fryingpannn
Copy link

@Fryingpannn Fryingpannn commented Oct 9, 2024

trypear/pearai-app#81

Original PR by @amovfx
Handles empty selection case
Calls addEntireFileToContext function
Improves user experience
Maintains existing functionality

*Edit by Pan:
Behaviour wanted

  • Clicking on a file should add the file tag to the chat. E.g., if I click on file pricing.tsx, then @pricing.tsx should appear in the chat prepended. Like below. And the context of that entire file would be prepended to the chat backend.
  • This, way it is non obstructive, and user also knows it is there directly.
  • When switching opened files, this current file tag would also change.
    image

Description ✏️

Added addEntireFileToContext to addHighlightedCodeToContext when nothing is selected.

Handles empty selection case
Calls addEntireFileToContext function
Improves user experience
Maintains existing functionality
@Fryingpannn
Copy link
Author

nang-dev pushed a commit that referenced this pull request Oct 22, 2024
* Draft #1 on updating welcome.md file

* Draft #2 of welcome.md: deleted a few shortcuts, put shortcuts in table format, and made tutorial line pop out more using bold and font size.

* fixed wrong shortcut display

* Update extensions/vscode/media/welcome.md

---------

Co-authored-by: Duke Pan <59063950+Fryingpannn@users.noreply.github.com>
nang-dev pushed a commit that referenced this pull request Oct 22, 2024
* Draft #1 on updating welcome.md file

* Draft #2 of welcome.md: deleted a few shortcuts, put shortcuts in table format, and made tutorial line pop out more using bold and font size.

* fixed wrong shortcut display

* Update extensions/vscode/media/welcome.md

* did issue continuedev#214

---------

Co-authored-by: Duke Pan <59063950+Fryingpannn@users.noreply.github.com>
@nang-dev nang-dev requested review from a team as code owners October 23, 2024 02:55
@Fryingpannn
Copy link
Author

Fryingpannn commented Oct 23, 2024

We need this on the UI! Instead of directly just inserted in the background. Indicate that current file is tagged already. And user can press X on it to remove it as well. Maybe on top of the chatbox prompt location, all the context can be indicated there.

*Edit: see new update in comment below

@Fryingpannn
Copy link
Author

Fryingpannn commented Oct 28, 2024

@amovfx Yo, what is your discord tag 👀

Would you like to keep working on this? We migrated repo to be direct fork so we had to migrate the PRs. The commit is still yours, but just PR I had to reopen 😃

I think for this, we want to make the behaviour as such:

  • Clicking on a file should add the file tag to the chat. E.g., if I click on file pricing.tsx, then @pricing.tsx should appear in the chat prepended. Like below. And the context of that entire file would be prepended to the chat backend.
  • This, way it is less obstructive, and user also knows it is there directly.
  • When switching opened files, this current file tag would also change.
Screenshot 2024-10-28 at 1 27 05 AM

@charlwillia6
Copy link

@Fryingpannn Just leaving a comment for documentation reasons stating that I am going to finish working on is.

@nang-dev
Copy link

s/o charl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants