Skip to content

CurrentFile (and add selected code to context) don't support source JARs in IJ #5795

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

Open
3 tasks done
bdavj opened this issue May 22, 2025 · 0 comments
Open
3 tasks done
Assignees
Labels
area:context-providers Relates to context providers ide:jetbrains Relates specifically to JetBrains extension kind:bug Indicates an unexpected problem or unintended behavior

Comments

@bdavj
Copy link
Contributor

bdavj commented May 22, 2025

Before submitting your bug report

Relevant environment info

- OS: mac OS Sonoma (but version independent)
- Continue version: 1.0.18
- IDE version: IntelliJ IDEA 2024.3.4.1 (Ultimate Edition)
- Model: N/A
- config: N/A

Description

@currentfile and "Add selected code to context" work fine with project local files.
When using files from external libraries (i.e. from Source JARs), "Add selected code to context" , nor does @currentfile.

This is presumably down to intelliJ's handling of source JARs, and not returning the expected file handler for getCurrentFile(), as it would do with a non-JAR project local file

To reproduce

  1. Open class file from JAR library
  2. Right Click -> "Add selected code to context" -OR- @currentfile annotation
  3. Code not added to chat pane, either in text field as a code snippet or as "provided context"
  4. Response notes that no context was provided

Image

Log output

No log entries
@sestinj sestinj self-assigned this May 22, 2025
@dosubot dosubot bot added area:context-providers Relates to context providers ide:jetbrains Relates specifically to JetBrains extension kind:bug Indicates an unexpected problem or unintended behavior labels May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:context-providers Relates to context providers ide:jetbrains Relates specifically to JetBrains extension kind:bug Indicates an unexpected problem or unintended behavior
Projects
Status: Todo
Development

No branches or pull requests

2 participants