在准备环境前提交次全部更改。

This commit is contained in:
Neo
2026-02-19 08:35:13 +08:00
parent ded6dfb9d8
commit 4eac07da47
1387 changed files with 6107191 additions and 33002 deletions

View File

@@ -0,0 +1,44 @@
"""
一次性脚本:更新 Kiro settings.json将默认终端切换为 PowerShell 7 (pwsh.exe)
"""
import json
import os
import shutil
settings_path = os.path.join(
os.environ["APPDATA"], "Kiro", "User", "settings.json"
)
# 备份
backup_path = settings_path + ".bak"
shutil.copy2(settings_path, backup_path)
print(f"已备份: {backup_path}")
with open(settings_path, "r", encoding="utf-8") as f:
settings = json.load(f)
# 配置 PowerShell 7 为默认终端 profile
settings["terminal.integrated.profiles.windows"] = {
"PowerShell 7": {
"path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"icon": "terminal-powershell",
"args": ["-NoLogo"]
},
"PowerShell 5": {
"path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": "C:\\Windows\\System32\\cmd.exe",
"icon": "terminal-cmd"
}
}
settings["terminal.integrated.defaultProfile.windows"] = "PowerShell 7"
with open(settings_path, "w", encoding="utf-8") as f:
json.dump(settings, f, indent=4, ensure_ascii=False)
print("已更新 Kiro settings.json:")
print(" - 添加 PowerShell 7 profile")
print(" - 默认终端设为 PowerShell 7 (pwsh.exe)")
print("\n请重启 Kiro 使配置生效。")