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

Create clickable links from the listed context files #297

Merged
merged 4 commits into from
Jan 16, 2024

Conversation

mkondratek
Copy link
Contributor

@mkondratek mkondratek commented Jan 12, 2024

Fixes #255

Test plan

  • :runIde
  • ask Cody about the code / run explain command
  • see the context file
  • text the links

image

Note that we have issue with unrelated files shown in the context read files list: #298

@mkondratek mkondratek self-assigned this Jan 12, 2024
Copy link
Contributor

@exigow exigow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍 I've requested some small changes (see: comments).

Copy link
Contributor

@exigow exigow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes.

@mkondratek
Copy link
Contributor Author

So the remaining unknown seems to be the remote files. Take a look at the agent's response:

image

It contains a doubled entry of the local file:

{
  "fileName": "/Users/mkondratek/IdeaProjects/runIde/jetbrains/src/main/kotlin/com/sourcegraph/cody/CodyToolWindowContent.kt"
},

and two other entries with repo & revision:

{
  "fileName": "src/main/kotlin/com/sourcegraph/cody/chat/CodyOnboardingGuidancePanel.kt",
  "repoName": "github.com/sourcegraph/jetbrains",
  "revision": "14891e64eb192789df371dd43ae819a77aa22cd6"
},
{
  "fileName": "src/main/java/com/sourcegraph/cody/CodyToolWindowContent.java",
  "repoName": "github.com/sourcegraph/jetbrains",
  "revision": "14891e64eb192789df371dd43ae819a77aa22cd6"
},

I assume that the file referencing the local file should link it directly.

What about the "remote files"? We can link the local files to them BUT there can be inconsistencies b/w local and remote (eg. the agent uses a file that exists in the remote but it does not exist locally). How should we handle it?

gradle.properties Outdated Show resolved Hide resolved
Copy link
Contributor

@pkukielka pkukielka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not bump IJ platform version!

@exigow
Copy link
Contributor

exigow commented Jan 15, 2024

@danielmarquespt, we haven't consulted this change with you so please take a look on attached demo in first comment & eventually confirm. The design has slightly changed (paths now have "link" color + no border/outline).

Before:
image

@mkondratek
Copy link
Contributor Author

it should be all good now

@mkondratek
Copy link
Contributor Author

@danielmarquespt, we haven't consulted this change with you so please take a look on attached demo in first comment & eventually confirm. The design has slightly changed (paths now have "link" color + no border/outline).

Before: image

image

Copy link
Contributor

@pkukielka pkukielka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mkondratek mkondratek merged commit 95bd690 into main Jan 16, 2024
2 checks passed
@mkondratek mkondratek deleted the mkondratek/feature/file-links branch January 16, 2024 10:19
mkondratek added a commit that referenced this pull request Jan 18, 2024
I should have tested it in the scope of:
#297. Anyway, it fixes the
links in Windows.

## Test plan 
- [x] Test on Windows + MacOS
- [x] run command/ prompt chat & see the files
- [x] files should be clickable and navigate correctly
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.

Make contextFiles a clickable link
3 participants