Skip to content

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

Open
@bdavj

Description

@bdavj

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

Metadata

Metadata

Assignees

Labels

area:context-providersRelates to context providersgood-first-issueSuggested issue for new contributorside:jetbrainsRelates specifically to JetBrains extensionkind:bugIndicates an unexpected problem or unintended behavior

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions