-
Notifications
You must be signed in to change notification settings - Fork 23
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 a text field for entering multiple remote repositories at once #1308
Conversation
@pkukielka if you could PTAL, I would love your guidance here. I'm unsure about Kotlin coroutines here, maybe I should revert the coWithAgent and go back to threads. Feels wasteful to burn a thread if we are already on a background thread for completion candidates. And coroutines are easy to use. On the other hand, some of these are marked as experimental (in 2022.x?) and the integration with the cancellation exceptions is awkward.
Pointer to releasing and rolling agent would be appreciated although I'm happy to dig for it.
|
3ef81d9
to
ee6cbb7
Compare
restartIfNeeded: Boolean, | ||
callback: suspend (CodyAgent) -> T | ||
): T { | ||
if (!CodyApplicationSettings.instance.isCodyEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That change will require testing all the features with disabled cody:
- chat, @-files
- commands
- autocompletion
- enhanced context
- edit tasks
- account management panel
I do not trust we properly handle exeptions everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't because the withAgent
wrappers check this boolean. We might get one exception if you disable agent between the time of that check and the time this coroutine runs.
src/main/kotlin/com/sourcegraph/cody/context/RemoteRepoInsight.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/sourcegraph/cody/context/RemoteRepoInsight.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/sourcegraph/cody/context/RemoteRepoInsight.kt
Outdated
Show resolved
Hide resolved
@pkukielka if you could PTAL, I would love your guidance here.
I think at the very least we need to test it on the lowest version which we officially support which is:
For the general guidance please look at this: As for the annotations, they are not fully working yet and the documentation is sparse, but we are using them for documentation purposes and with the hope of getting some benefits in future: From
And then from
Unfortunately I'm not aware of any static analysis tool which would help us ensure correctness there,
If you want to upgrade agent version in |
@dominiccooney Search works very quickly and is really snappy! But I run into couple of other issues. For the reference I tested it on IJ
|
9b4be39
to
fac6d69
Compare
👍 I've been primarily testing on that.
I have seen exactly this behavior but I can't reproduce it consistently. @danielmarquespt , can we keep an eye on this in user testing? If it happens a lot we should consider going back to the horizontal toolbar.
@danielmarquespt this is good product feedback. FWIW @abeatrix over here did not grok to hit the pencil to edit (I've now changed the minimum sizes so the pencil is, at least, always visible.) Here @pkukielka isn't used to command-enter to commit. FWIW I confirmed that the git log search widget behaves as you have spec'ed... you need to cmd-enter to commit. Let's consider not sticking to JetBrains idioms here. The idioms don't seem that strong.
100% felt this myself, good call. I have put the cursor at the end of the first line. Feels good because you can see the top of the list, and it is a convenient place to start editing if you want to add. |
Oh, cmd+enter. That is totally non-idiomatic for IntelliJ. Is the any reason we would like to do it that way? I think good example of similar native component you can see in Run/Debug configurations: I see there is a tooltip (I apparently need to learn to read) but TBH it's not very visible because of low contrast so it is still possible to miss it especially on smaller screens: Actually @danielmarquespt I think maybe we should work a bit on our colour palette.
I can reproduce it 100% of times. I will try to check if I can track what is causing it. |
Also minor thing and definitely not a blocker: |
We picked this up from the same widget in the git log viewer, author filter.
100% agree the contrast is way too low. On the other hand, this is the theme! We're not picking these colors.
🙏 I just saw it again for a while, and then it disappeared again. @danielmarquespt noticed we pack the component tighter than the git log viewer does. Confirmed that they are both ActionViewToolbarImpls. @danielmarquespt wants to add the action to the global actions panel, so when we do that we can switch to using ActionManager.createActionToolbar the same as the git log viewer does. @pkukielka is this good to land? It would be great to get it committed and iterate on the details in follow ups. |
BTW now edit button started to work for me as well and I cannot force it to be problematic agen 🙃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you for the review 🙇 I have filed #1322 for the follow-up feedback. |
This facilitates bulk editing of multiple remote repositories, with an autocompleter and fuzzy search to make it easy to find repositories.
This needs to land after sourcegraph/cody#3775 and roll past that Agent version.
Fixes #982
Test plan
Manually tested with sourcegraph/cody#3775: