diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..b1dff0dd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,45 @@
+.gradle
+build/
+!gradle/wrapper/gradle-wrapper.jar
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+out/
+!**/src/main/**/out/
+!**/src/test/**/out/
+
+### Kotlin ###
+.kotlin
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+bin/
+!**/src/main/**/bin/
+!**/src/test/**/bin/
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 00000000..10b731c5
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,5 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 00000000..1bec35e5
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,10 @@
+
+
+2025年11月20日 攻关JAVA 与 @anthropic-ai/claude-agent-sdk 交互问题
+
+
+
+### 构建插件
+
+```sh
+ ./gradlew build
+
+# 生成的插件包会在 build/distributions/ 目录下
+```
+
+### 开发环境
+
+```
+IntelliJ IDEA 2025.2.4 (Ultimate Edition)
+Build #IU-252.27397.103, built on October 23, 2025
+Source revision: 9b31ba2c05b47
+Runtime version: 21.0.8+9-b1038.73 aarch64 (JCEF 122.1.9)
+VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
+Toolkit: sun.lwawt.macosx.LWCToolkit
+macOS 15.3.1
+GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
+Memory: 2048M
+Cores: 12
+Metal Rendering is ON
+Registry:
+ ide.experimental.ui=true
+ llm.selector.config.refresh.interval=10
+ llm.rules.refresh.interval=10
+Non-Bundled Plugins:
+ com.luomacode.ChatMoss (7.1.2)
+ com.anthropic.code.plugin (0.1.12-beta)
+ com.intellij.ml.llm (252.27397.144)
+ com.example.claudeagent (1.0-SNAPSHOT)
+Kotlin: 252.27397.103-IJ
+```
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 00000000..65d2e169
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,58 @@
+plugins {
+ id 'java'
+ id 'org.jetbrains.intellij' version '1.17.0'
+}
+
+group 'com.github.idea-claude-code-gui'
+version '0.0.1'
+
+sourceCompatibility = 17
+targetCompatibility = 17
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ implementation 'org.jetbrains:annotations:24.0.0'
+ implementation 'com.google.code.gson:gson:2.10.1'
+}
+
+// 配置 IntelliJ Platform 插件
+intellij {
+ version = '2023.3.2' // 目标 IDEA 版本
+ type = 'IC' // IC = IntelliJ IDEA Community Edition
+
+ // 下载源码和 JavaDoc
+ downloadSources = true
+
+ // 插件依赖(如果需要)
+ plugins = []
+}
+
+tasks.withType(JavaCompile) {
+ options.encoding = 'UTF-8'
+}
+
+patchPluginXml {
+ sinceBuild = '233'
+ untilBuild = '252.*' // 更新为支持2024.2版本
+
+ changeNotes = """
+
当前项目下没有找到 Claude 会话记录
\n"); + html.append("{{ error || (data && data.error) || '未知错误' }}
\n"); + html.append("