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

Allow to open devtools as action for an instant debugging caability #7308

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CodyToolWindowFactory : ToolWindowFactory, DumbAware {
customCodySettings.addSeparator()

if (isFeatureFlagEnabled("cody.feature.internals-menu")) {
customCodySettings.add(OpenWebviewDevToolsAction(this))
customCodySettings.add(OpenWebviewDevToolsAction())
}

toolWindow.setAdditionalGearActions(customCodySettings)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package com.sourcegraph.cody
import com.intellij.openapi.actionSystem.AnActionEvent
import com.sourcegraph.common.ui.DumbAwareEDTAction

class OpenWebviewDevToolsAction(val toolWindowContent: CodyToolWindowContent) :
DumbAwareEDTAction("Open WebView DevTools") {
class OpenWebviewDevToolsAction : DumbAwareEDTAction("Open WebView DevTools") {
override fun actionPerformed(e: AnActionEvent) {
toolWindowContent.openDevTools()
CodyToolWindowContent.executeOnInstanceIfNotDisposed(e.project ?: return) { openDevTools() }
}
}
6 changes: 6 additions & 0 deletions jetbrains/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@
description="Enable offScreen rendering in webview">
<override-text place="GoToAction" text="Cody: Enable OffScreen Rendering"/>
</action>
<action id="cody.openWebviewDevToolsAction"
class="com.sourcegraph.cody.OpenWebviewDevToolsAction"
text="Open DevTools"
description="Open DevTools to debug Cody webview">
<override-text place="GoToAction" text="Cody: Open DevTools"/>
</action>
</group>
</group>

Expand Down
Loading