Skip to content

Commit 8b9fba8

Browse files
author
hongyu9
committed
2 parents 6c705bb + 9a467c1 commit 8b9fba8

File tree

5 files changed

+123
-22
lines changed

5 files changed

+123
-22
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ RunVSAgent is an innovative cross-platform development tool that enables develop
1919
- **VSCode Agent Compatibility**: Seamlessly run VSCode-based coding agents in JetBrains IDEs
2020
- **Cross-IDE Development**: Unified agent experience across different IDE platforms
2121

22+
## 🤖 Supported Agents
23+
24+
- **[Roo Code](https://roocode.com)**: Advanced AI-powered coding assistant with intelligent code generation and refactoring capabilities
25+
- **[Cline](https://cline.bot)**: Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more with your permission every step of the way.
26+
2227
## 🔧 Supported IDEs
2328

2429
### Jetbrains IDEs
@@ -37,13 +42,6 @@ RunVSAgent currently supports the following JetBrains IDE series:
3742

3843
> **Note**: Requires JetBrains IDE version 2023.1 or later for optimal compatibility.
3944
40-
### XCode IDE
41-
Working on it...
42-
43-
## 🤖 Supported Agents
44-
45-
- **[Roo Code](https://roocode.com)**: Advanced AI-powered coding assistant with intelligent code generation and refactoring capabilities
46-
- **[Cline](https://cline.bot)**: Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more with your permission every step of the way.
4745

4846
## 🏗️ Architecture
4947

README_zh.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ RunVSAgent 是一个创新的跨平台开发工具,使开发者能够在 JetBr
1919
- **VSCode 代理兼容性**:在 JetBrains IDEs 中无缝运行基于 VSCode 的编码代理
2020
- **跨 IDE 开发**:在不同 IDE 平台上提供统一的代理体验
2121

22+
## 🤖 支持的代理
23+
24+
- **[Roo Code](https://roocode.com)**:具有智能代码生成和重构功能的高级 AI 驱动编码助手
25+
- **[Cline](https://cline.bot)**: 一个就在你 IDE 里的自主编码代理,在你的许可下,能够创建/编辑文件、执行命令、使用浏览器等更多功能,并在每一步都征求你的确认。
26+
2227
## 🔧 支持的 IDE
2328

2429
### JetBrains IDEs
@@ -37,13 +42,6 @@ RunVSAgent 目前支持以下 JetBrains IDE 系列:
3742

3843
> **注意**:为了获得最佳兼容性,需要 JetBrains IDE 版本 2023.1 或更高版本。
3944
40-
### XCode IDE
41-
正在开发中...
42-
43-
## 🤖 支持的代理
44-
45-
- **[Roo Code](https://roocode.com)**:具有智能代码生成和重构功能的高级 AI 驱动编码助手
46-
- **[Cline](https://cline.bot)**: 一个就在你 IDE 里的自主编码代理,在你的许可下,能够创建/编辑文件、执行命令、使用浏览器等更多功能,并在每一步都征求你的确认。
4745

4846
## 🏗️ 架构
4947

jetbrains_plugin/src/main/kotlin/com/sina/weibo/agent/extensions/ui/actions/ExtensionStatusChecker.kt

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ import com.sina.weibo.agent.core.PluginContext
1919
import com.sina.weibo.agent.core.ServiceProxyRegistry
2020
import com.sina.weibo.agent.util.ProxyConfigUtil
2121
import com.sina.weibo.agent.webview.WebViewManager
22+
import com.intellij.ide.plugins.PluginManagerCore
23+
import com.intellij.openapi.extensions.PluginId
24+
import com.intellij.ui.jcef.JBCefApp
25+
import com.intellij.openapi.application.ApplicationInfo
26+
import com.sina.weibo.agent.util.PluginConstants
2227

2328
/**
2429
* Action to check extension status and diagnose issues
@@ -39,6 +44,9 @@ class ExtensionStatusChecker : AnAction("Check Extension Status") {
3944
sb.appendLine("🔍 Extension Status Check")
4045
sb.appendLine("=".repeat(50))
4146

47+
// Add System Information
48+
addSystemInformation(sb)
49+
4250
// Check Extension Manager
4351
try {
4452
val extensionManager = ExtensionManager.getInstance(project)
@@ -142,6 +150,43 @@ class ExtensionStatusChecker : AnAction("Check Extension Status") {
142150
return sb.toString()
143151
}
144152

153+
/**
154+
* Add system information to the status report
155+
*/
156+
private fun addSystemInformation(sb: StringBuilder) {
157+
try {
158+
val appInfo = ApplicationInfo.getInstance()
159+
val plugin = PluginManagerCore.getPlugin(PluginId.getId(PluginConstants.PLUGIN_ID))
160+
val pluginVersion = plugin?.version ?: "unknown"
161+
val osName = System.getProperty("os.name")
162+
val osVersion = System.getProperty("os.version")
163+
val osArch = System.getProperty("os.arch")
164+
val jcefSupported = JBCefApp.isSupported()
165+
166+
// Check for Linux ARM system
167+
val isLinuxArm = osName.lowercase().contains("linux") && (osArch.lowercase().contains("aarch64") || osArch.lowercase().contains("arm"))
168+
169+
sb.appendLine("\n📊 System Information:")
170+
sb.appendLine(" 💻 CPU Architecture: $osArch")
171+
sb.appendLine(" 🖥️ Operating System: $osName $osVersion")
172+
sb.appendLine(" 🔧 IDE Version: ${appInfo.fullApplicationName} (build ${appInfo.build})")
173+
sb.appendLine(" 📦 Plugin Version: $pluginVersion")
174+
sb.appendLine(" 🌐 JCEF Support: ${if (jcefSupported) "✅ Yes" else "❌ No"}")
175+
176+
// Add warnings for unsupported configurations
177+
if (isLinuxArm) {
178+
sb.appendLine(" ⚠️ Warning: Linux ARM systems are currently not supported")
179+
}
180+
181+
if (!jcefSupported) {
182+
sb.appendLine(" ❌ Warning: JCEF not supported - WebView functionality may not work")
183+
}
184+
185+
} catch (e: Exception) {
186+
sb.appendLine("\n❌ System Information Error: ${e.message}")
187+
}
188+
}
189+
145190
private fun showStatusDialog(status: String) {
146191
val dialog = ExtensionStatusDialog(status)
147192
dialog.show()

jetbrains_plugin/src/main/kotlin/com/sina/weibo/agent/util/PluginResourceUtil.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ object PluginResourceUtil {
3939
val plugin = PluginManagerCore.getPlugin(PluginId.getId(pluginId))
4040
?: throw IllegalStateException("Cannot find plugin: $pluginId")
4141

42-
LOG.info("Get plugin version: ${plugin.version}")
4342
// Determine whether it is development mode or production mode
4443
val isDevMode = checkDevMode(plugin)
4544

scripts/setup.sh

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ USAGE:
2929
$SCRIPT_NAME [OPTIONS]
3030
3131
DESCRIPTION:
32-
This script initializes the development environment by:
33-
- Validating system requirements
34-
- Initializing git submodules
35-
- Installing project dependencies
36-
- Applying necessary patches
37-
- Setting up build environment
38-
32+
DESCRIPTION:
33+
This script initializes the development environment by:
34+
- Validating system requirements (including Git LFS)
35+
- Setting up Git LFS for large file handling
36+
- Initializing git submodules
37+
- Installing project dependencies
38+
- Applying necessary patches
39+
- Setting up build environment
3940
OPTIONS:
4041
-f, --force Force reinstall of dependencies
4142
-s, --skip-submodules Skip git submodule initialization
@@ -55,6 +56,10 @@ ENVIRONMENT:
5556
NODE_VERSION_MIN Minimum Node.js version (default: 16.0.0)
5657
SKIP_VALIDATION Skip environment validation if set to 'true'
5758
59+
REQUIREMENTS:
60+
- Git LFS must be installed for handling large files
61+
- Run 'git lfs install' manually if setup fails
62+
5863
EXIT CODES:
5964
0 Success
6065
1 General error
@@ -128,6 +133,12 @@ validate_system_requirements() {
128133
log_debug "Found development tool: $tool"
129134
done
130135

136+
# Check for Git LFS
137+
if ! command_exists "git-lfs"; then
138+
die "Git LFS not found. Please install Git LFS: https://git-lfs.github.io/" 2
139+
fi
140+
log_debug "Found Git LFS"
141+
131142
# Check Git configuration
132143
if ! git config user.name >/dev/null 2>&1; then
133144
log_warn "Git user.name not configured. Run: git config --global user.name 'Your Name'"
@@ -152,6 +163,55 @@ validate_system_requirements() {
152163
log_success "System requirements validated"
153164
}
154165

166+
# Initialize Git LFS
167+
setup_git_lfs() {
168+
log_step "Setting up Git LFS..."
169+
170+
cd "$PROJECT_ROOT"
171+
172+
# Check if Git LFS is already initialized
173+
if git lfs env >/dev/null 2>&1; then
174+
log_debug "Git LFS environment already configured"
175+
else
176+
log_info "Initializing Git LFS..."
177+
execute_cmd "git lfs install" "Git LFS installation"
178+
fi
179+
180+
# Check if .gitattributes exists and has LFS entries
181+
if [[ -f ".gitattributes" ]]; then
182+
local lfs_files
183+
lfs_files=$(grep -c "filter=lfs" .gitattributes 2>/dev/null || echo "0")
184+
if [[ "$lfs_files" -gt 0 ]]; then
185+
log_info "Found $lfs_files LFS file pattern(s) in .gitattributes"
186+
187+
# Pull LFS files
188+
log_info "Pulling LFS files..."
189+
execute_cmd "git lfs pull" "Git LFS pull"
190+
191+
# Verify LFS files
192+
log_info "Verifying LFS files..."
193+
if git lfs ls-files >/dev/null 2>&1; then
194+
local lfs_file_count
195+
lfs_file_count=$(git lfs ls-files | wc -l | tr -d ' ')
196+
if [[ "$lfs_file_count" -gt 0 ]]; then
197+
log_success "Successfully pulled $lfs_file_count LFS file(s)"
198+
git lfs ls-files | while read -r line; do
199+
log_debug "LFS file: $line"
200+
done
201+
else
202+
log_warn "No LFS files found in repository"
203+
fi
204+
fi
205+
else
206+
log_info "No LFS file patterns found in .gitattributes"
207+
fi
208+
else
209+
log_warn "No .gitattributes file found, skipping LFS file pull"
210+
fi
211+
212+
log_success "Git LFS setup completed"
213+
}
214+
155215
# Initialize git submodules
156216
setup_submodules() {
157217
if [[ "$SKIP_SUBMODULES" == "true" ]]; then
@@ -442,6 +502,7 @@ main() {
442502

443503
# Run setup steps
444504
validate_system_requirements
505+
setup_git_lfs
445506
setup_submodules
446507
install_dependencies
447508
apply_patches

0 commit comments

Comments
 (0)