-
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
Fix Sourcegraph actions (search selection, open selection, etc) #325
Conversation
@@ -156,7 +156,7 @@ class CodyToolWindowContent(private val project: Project) : UpdatableChat { | |||
SUBSCRIPTION_TAB_INDEX) | |||
} | |||
subscriptionPanel.update(data.isCurrentUserPro) | |||
} else { | |||
} else if (SUBSCRIPTION_TAB_INDEX < tabbedPane.tabCount) { |
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.
unrel to the sourcegraph actions issue - minor fix (IndexOutOfBoundsException
appeared once from this place)
if (ConfigUtil.isCodyEnabled()) { | ||
codebaseName = | ||
CodyAgentService.getAgent(project) | ||
.thenCompose( | ||
agent -> | ||
agent.getServer().convertGitCloneURLToCodebaseName(new CloneURL(cloneURL))) | ||
.completeOnTimeout(/* value= */ null, /* timeout= */ 4, TimeUnit.SECONDS) | ||
.get(); | ||
} |
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.
Let's try to use agent only with Cody enabled. Also let's complete on timeout.
"Failed to convert git clone URL to codebase name for cloneURL: " + cloneURL); | ||
logger.warn( | ||
"Failed to convert git clone URL to codebase name for cloneURL via agent: " + cloneURL); | ||
codebaseName = convertGitCloneURLToCodebaseNameOrError(cloneURL); |
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.
This is a fallback...
|
||
import java.net.URL | ||
|
||
fun convertGitCloneURLToCodebaseNameOrError(cloneURL: String): String { |
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.
copied from the agent and translated (TS -> Kotlin)
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
Fixes #252.
Fixes #162.
Fixes #324.
Test plan