Merge official template: adopt plugin ID com.prepeep.harmness-browser, Gradle wrapper, IDE 2024.2–251.*, run configs

This commit is contained in:
harmness
2026-09-10 14:57:07 +08:00
parent cbe41e4f4f
commit 4890569b95
18 changed files with 483 additions and 69 deletions
@@ -1,6 +1,5 @@
package com.harmness.toolwindow
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.options.Configurable
import com.intellij.openapi.options.Configurable.WithEpName
import javax.swing.JComponent
@@ -35,8 +34,4 @@ class HarmnessSettingsConfigurable : Configurable, WithEpName {
override fun disposeUIResources() {
panel = null
}
companion object {
private val LOG = Logger.getInstance(HarmnessSettingsConfigurable::class.java)
}
}
@@ -1,6 +1,8 @@
package com.harmness.toolwindow
import com.intellij.openapi.components.PersistentStateComponent
import com.intellij.openapi.components.Service
import com.intellij.openapi.components.ServiceManager
import com.intellij.openapi.components.State
import com.intellij.openapi.components.Storage
import com.intellij.openapi.diagnostic.Logger
@@ -13,6 +15,7 @@ import com.intellij.openapi.diagnostic.Logger
* 或者由 Harness 提供专门的无 frame 限制入口。
*/
@State(name = "HarmnessToolwindowSettings", storages = [Storage("harmness-toolwindow.xml")])
@Service(Service.Level.APP)
class SettingsState : PersistentStateComponent<SettingsState.State> {
data class State(
@@ -39,6 +42,6 @@ class SettingsState : PersistentStateComponent<SettingsState.State> {
const val DEFAULT_URL = "http://127.0.0.1:8888"
fun getInstance(): SettingsState =
com.intellij.openapi.components.ServiceManager.getService(SettingsState::class.java)
ServiceManager.getService(SettingsState::class.java)
}
}
+5 -15
View File
@@ -1,26 +1,18 @@
<idea-plugin>
<id>com.harmness.toolwindow</id>
<id>com.prepeep.harmness-browser</id>
<name>Harmness Browser</name>
<vendor>harmness</vendor>
<vendor>prepeep</vendor>
<description>
<description><![CDATA[
Embed a configurable browser panel (e.g. a local Harmness instance) directly inside
JetBrains IDE sidebars. Enables seamless AI-assisted coding inside PyCharm / IntelliJ
IDEA without switching to a separate browser window.
</description>
]]></description>
<!--
IDE version compatibility:
sinceBuild / untilBuild 控制插件兼容的 IDE 版本范围。
这里要求 2024.2 及以上、2024.3.* 及以下。
如需支持更老版本,请参考 https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
-->
<idea-version since-build="242" until-build="243.*"/>
<idea-version since-build="242" until-build="251.*"/>
<!-- 依赖 platform -->
<depends>com.intellij.modules.platform</depends>
<!-- 工具窗口扩展点 -->
<extensions defaultExtensionNs="com.intellij">
<toolWindow
id="Harmness Browser"
@@ -30,14 +22,12 @@
condition="class#==com.intellij.ui.jcef.JBCefApp"
/>
<!-- 插件设置页:Settings | Tools | Harmness Browser -->
<applicationConfigurable
parent="tools"
instance="com.harmness.toolwindow.HarmnessSettingsConfigurable"
id="com.harmness.toolwindow.HarmnessSettingsConfigurable"
displayName="Harmness Browser"/>
<!-- 持久化组件 -->
<applicationService
serviceImplementation="com.harmness.toolwindow.SettingsState"/>
@@ -0,0 +1,12 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M32.0845 7.94025V4H24.0203V7.9896H16.029V4H7.91553V7.94025H4V36H16.0044V32.0045C16.0058 30.9457 16.4274 29.9308 17.1766 29.1826C17.9258 28.4345 18.9412 28.0143 20 28.0143C21.0588 28.0143 22.0743 28.4345 22.8234 29.1826C23.5726 29.9308 23.9942 30.9457 23.9956 32.0045V36H36V7.94025H32.0845Z"
fill="url(#paint0_linear)"/>
<defs>
<linearGradient id="paint0_linear" x1="2.94192" y1="4.89955" x2="37.7772" y2="39.7345"
gradientUnits="userSpaceOnUse">
<stop offset="0.15937" stop-color="#3BEA62"/>
<stop offset="0.5404" stop-color="#3C99CC"/>
<stop offset="0.93739" stop-color="#6B57FF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 818 B