Skip to content
Open
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
28 changes: 26 additions & 2 deletions augment_tools_core/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
class IDEType(Enum):
"""Supported IDE types"""
VSCODE = "vscode"
VSCODE_INSIDERS = "vscode_insiders"
CURSOR = "cursor"
WINDSURF = "windsurf"
JETBRAINS = "jetbrains"
Expand Down Expand Up @@ -88,6 +89,24 @@ def get_ide_paths(ide_type: IDEType) -> Optional[Dict[str, Path]]:
paths["state_db"] = base_dir / "globalStorage" / "state.vscdb"
paths["storage_json"] = base_dir / "globalStorage" / "storage.json"

elif ide_type == IDEType.VSCODE_INSIDERS:
if system == "Windows":
appdata = os.environ.get("APPDATA")
if not appdata:
print_error("APPDATA environment variable not found. Cannot locate VS Code Insiders data.")
return None
base_dir = Path(appdata) / "Code - Insiders" / "User"
elif system == "Darwin": # macOS
base_dir = Path.home() / "Library" / "Application Support" / "Code - Insiders" / "User"
elif system == "Linux":
base_dir = Path.home() / ".config" / "Code - Insiders" / "User"
else:
print_error(f"Unsupported operating system: {system}")
return None

paths["state_db"] = base_dir / "globalStorage" / "state.vscdb"
paths["storage_json"] = base_dir / "globalStorage" / "storage.json"

elif ide_type == IDEType.CURSOR:
if system == "Windows":
appdata = os.environ.get("APPDATA")
Expand Down Expand Up @@ -261,6 +280,7 @@ def get_ide_display_name(ide_type: IDEType) -> str:
"""Get display name for IDE type"""
display_names = {
IDEType.VSCODE: "VS Code",
IDEType.VSCODE_INSIDERS: "VS Code Insiders",
IDEType.CURSOR: "Cursor",
IDEType.WINDSURF: "Windsurf",
IDEType.JETBRAINS: "JetBrains"
Expand All @@ -270,7 +290,8 @@ def get_ide_display_name(ide_type: IDEType) -> str:
def get_ide_process_names(ide_type: IDEType) -> list:
"""Get process names for the specified IDE"""
process_names = {
IDEType.VSCODE: ["Code.exe", "Code - Insiders.exe", "Code - OSS.exe"],
IDEType.VSCODE: ["Code.exe", "Code - OSS.exe"],
IDEType.VSCODE_INSIDERS: ["Code - Insiders.exe"],
IDEType.CURSOR: ["Cursor.exe", "cursor.exe"],
IDEType.WINDSURF: ["Windsurf.exe", "windsurf.exe"],
IDEType.JETBRAINS: [
Expand Down Expand Up @@ -505,7 +526,8 @@ def get_ide_process_names(ide_type: IDEType) -> list[str]:
list[str]: 进程名称列表
"""
process_names = {
IDEType.VSCODE: ['Code.exe', 'Code - Insiders.exe', 'Code - OSS.exe'],
IDEType.VSCODE: ['Code.exe', 'Code - OSS.exe'],
IDEType.VSCODE_INSIDERS: ['Code - Insiders.exe'],
IDEType.CURSOR: ['Cursor.exe', 'cursor.exe'],
IDEType.WINDSURF: ['Windsurf.exe', 'windsurf.exe'],
IDEType.JETBRAINS: [
Expand All @@ -521,6 +543,7 @@ def get_ide_extension_name(ide_type: IDEType) -> str:
"""Get the extension name pattern for the specified IDE"""
extension_names = {
IDEType.VSCODE: "augment.vscode-augment",
IDEType.VSCODE_INSIDERS: "augment.vscode-augment",
IDEType.CURSOR: "augment.cursor-augment",
IDEType.WINDSURF: "augment.windsurf-augment",
IDEType.JETBRAINS: "augment.jetbrains-augment"
Expand All @@ -532,6 +555,7 @@ def get_patch_target_description(ide_type: IDEType) -> str:
"""Get description of what will be patched for the IDE"""
descriptions = {
IDEType.VSCODE: "VS Code AugmentCode 扩展文件",
IDEType.VSCODE_INSIDERS: "VS Code Insiders AugmentCode 扩展文件",
IDEType.CURSOR: "Cursor AugmentCode 扩展文件",
IDEType.WINDSURF: "Windsurf AugmentCode 扩展文件",
IDEType.JETBRAINS: "JetBrains AugmentCode 插件文件"
Expand Down
4 changes: 2 additions & 2 deletions config/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"language": "en_US",
"language": "zh_CN",
"first_run": false,
"window_geometry": "680x780",
"last_selected_ide": "Windsurf",
"last_selected_ide": "VS Code Insiders",
"show_welcome": false,
"show_about_on_startup": true,
"theme": "default"
Expand Down
11 changes: 7 additions & 4 deletions gui_qt6/main_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ def _create_ide_section(self, parent_layout):
# IDE下拉框 - 适当调整宽度
self.ide_combo = QComboBox()
self.ide_combo.setFont(get_default_font(10))
self.ide_combo.addItems(["VS Code", "Cursor", "Windsurf", "JetBrains"])
self.ide_combo.setMaximumWidth(160) # 稍微增加宽度
self.ide_combo.setMinimumWidth(140)
self.ide_combo.addItems(["VS Code", "VS Code Insiders", "Cursor", "Windsurf", "JetBrains"])
self.ide_combo.setMaximumWidth(180) # 增加宽度以适应更长的选项
self.ide_combo.setMinimumWidth(160)

# 设置上次选择的IDE
last_ide = self.config_manager.get_last_selected_ide()
if last_ide in ["VS Code", "Cursor", "Windsurf", "JetBrains"]:
if last_ide in ["VS Code", "VS Code Insiders", "Cursor", "Windsurf", "JetBrains"]:
self.ide_combo.setCurrentText(last_ide)

ide_layout.addWidget(self.ide_combo)
Expand Down Expand Up @@ -453,6 +453,8 @@ def get_selected_ide_type(self) -> IDEType:
ide_name = self.ide_combo.currentText()
if ide_name == "VS Code":
return IDEType.VSCODE
elif ide_name == "VS Code Insiders":
return IDEType.VSCODE_INSIDERS
elif ide_name == "Cursor":
return IDEType.CURSOR
elif ide_name == "Windsurf":
Expand Down Expand Up @@ -629,6 +631,7 @@ def _get_selected_ide_type(self) -> IDEType:
ide_text = self.ide_combo.currentText()
ide_mapping = {
"VS Code": IDEType.VSCODE,
"VS Code Insiders": IDEType.VSCODE_INSIDERS,
"Cursor": IDEType.CURSOR,
"Windsurf": IDEType.WINDSURF,
"JetBrains": IDEType.JETBRAINS
Expand Down