Files
proxycast/scripts/windows-collect-support-bundle.ps1
T
coso 90bd63908f feat: release v0.83.0 with full pending changes
✨ 新功能
- 新增 OpenClaw 服务集成和相关命令支持
- 新增 Windows 启动诊断命令和故障排查文档
- 新增样式库管理面板 (StyleLibraryPanel)
- 新增 A2UI 任务卡片组件和完整测试覆盖
- 新增输入栏多个子组件:提示路由弹窗、执行策略选择、模型扩展配置等
- 新增工作台创建入口主页和右侧面板扩展视图
- 新增运行时样式控制栏组件
- 新增样式运行时工具模块和测试
- 新增内容审查面板测试
- 新增多个工作台右侧面板能力:音频任务、视频任务、画外音任务、图片任务等
- 新增 Windows 支持包收集脚本
- 新增开发桥健康检查脚本

🐛 修复
- 修复 TypeScript 编译错误
- 修复崩溃诊断逻辑
- 修复 Tauri mock 核心模块
- 修复开发桥 HTTP 客户端
- 修复 webview API 调用
- 修复 Provider 模型列表组件
- 修复多个 Rust clippy 警告

🔧 优化与重构
- 重构输入栏组件架构,拆分为多个独立 hooks 和子组件
- 重构工作台右侧面板,拆分为多个独立模块和配置文件
- 优化 A2UI 组件渲染器和布局系统
- 优化内容创建器文档画布和工具栏
- 优化记忆层指标计算和测试
- 优化项目提示工具
- 优化主题工作台侧边栏
- 优化样式指南面板
- 优化工作台导航和面板渲染 hooks
- 优化确认策略创建工具
- 优化主题模块(novel、video)和共享面板渲染器
- 优化 Agent 事件转换器和会话存储
- 优化数据库 DAO 层
- 优化模型注册服务和技能服务
- 优化日志命令和应用运行器
- 优化开发桥调度器
- 更新 Windows 平台 Tauri 配置
- 更新 CI release workflow

📦 其他
- 新增 Windows 启动问题故障排查文档
- 更新 Playwright E2E 测试文档
- 更新构建和运维文档
- 更新常见问题文档
- 更新 README
2026-03-10 07:57:13 +08:00

195 lines
6.0 KiB
PowerShell

param(
[string]$OutputRoot = "",
[switch]$KeepExpanded
)
$ErrorActionPreference = "Stop"
function Write-Step {
param([string]$Message)
Write-Host "[ProxyCast Support] $Message"
}
function Ensure-Directory {
param([string]$Path)
if (-not (Test-Path -LiteralPath $Path)) {
New-Item -ItemType Directory -Path $Path -Force | Out-Null
}
}
function Get-WebView2Version {
$keys = @(
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}",
"HKLM:\SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}",
"HKCU:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}",
"HKCU:\SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}"
)
foreach ($key in $keys) {
try {
$value = (Get-ItemProperty -LiteralPath $key -Name "pv" -ErrorAction Stop).pv
if ($value -and $value -ne "0.0.0.0") {
return [string]$value
}
} catch {
}
}
return $null
}
function Get-PathMetadata {
param([string]$TargetPath)
if (-not (Test-Path -LiteralPath $TargetPath)) {
return [pscustomobject]@{
path = $TargetPath
exists = $false
type = $null
last_write_time = $null
size_bytes = $null
}
}
$item = Get-Item -LiteralPath $TargetPath -Force
$size = $null
if ($item.PSIsContainer) {
try {
$size = (Get-ChildItem -LiteralPath $TargetPath -Recurse -Force -File -ErrorAction Stop |
Measure-Object -Property Length -Sum).Sum
} catch {
$size = $null
}
} else {
$size = $item.Length
}
return [pscustomobject]@{
path = $TargetPath
exists = $true
type = if ($item.PSIsContainer) { "directory" } else { "file" }
last_write_time = $item.LastWriteTime.ToString("o")
size_bytes = $size
}
}
function Export-PathListing {
param(
[string]$SourcePath,
[string]$OutputFile
)
if (-not (Test-Path -LiteralPath $SourcePath)) {
"路径不存在: $SourcePath" | Set-Content -LiteralPath $OutputFile -Encoding UTF8
return
}
Get-ChildItem -LiteralPath $SourcePath -Recurse -Force -ErrorAction SilentlyContinue |
Select-Object FullName, PSIsContainer, Length, LastWriteTime |
ConvertTo-Json -Depth 4 |
Set-Content -LiteralPath $OutputFile -Encoding UTF8
}
function Copy-DirectoryIfExists {
param(
[string]$SourcePath,
[string]$DestinationPath
)
if (-not (Test-Path -LiteralPath $SourcePath)) {
return $false
}
Ensure-Directory -Path (Split-Path -Parent $DestinationPath)
Copy-Item -LiteralPath $SourcePath -Destination $DestinationPath -Recurse -Force
return $true
}
$timestamp = Get-Date -Format "yyyyMMdd-HHmmss"
$desktop = [Environment]::GetFolderPath("Desktop")
if ([string]::IsNullOrWhiteSpace($OutputRoot)) {
$OutputRoot = if ([string]::IsNullOrWhiteSpace($desktop)) { $env:TEMP } else { $desktop }
}
$bundleName = "ProxyCast-Support-$timestamp"
$bundleDir = Join-Path $OutputRoot $bundleName
$zipPath = "$bundleDir.zip"
$appDataDir = Join-Path $env:APPDATA "proxycast"
$legacyDir = Join-Path $env:USERPROFILE ".proxycast"
$configPath = Join-Path $appDataDir "config.yaml"
$dbPath = Join-Path $legacyDir "proxycast.db"
$logsDir = Join-Path $legacyDir "logs"
$requestLogsDir = Join-Path $legacyDir "request_logs"
Write-Step "输出目录: $bundleDir"
Ensure-Directory -Path $bundleDir
Ensure-Directory -Path (Join-Path $bundleDir "logs")
Ensure-Directory -Path (Join-Path $bundleDir "meta")
$systemInfo = [ordered]@{
collected_at = (Get-Date).ToString("o")
computer_name = $env:COMPUTERNAME
username = $env:USERNAME
windows_version = [System.Environment]::OSVersion.VersionString
powershell_version = $PSVersionTable.PSVersion.ToString()
webview2_version = Get-WebView2Version
appdata_dir = $appDataDir
legacy_proxycast_dir = $legacyDir
config_path = $configPath
database_path = $dbPath
shell_paths = @{
powershell = (Get-Command powershell.exe -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source -ErrorAction SilentlyContinue)
pwsh = (Get-Command pwsh.exe -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source -ErrorAction SilentlyContinue)
cmd = $env:ComSpec
}
path_checks = @(
Get-PathMetadata -TargetPath $appDataDir
Get-PathMetadata -TargetPath $legacyDir
Get-PathMetadata -TargetPath $configPath
Get-PathMetadata -TargetPath $dbPath
Get-PathMetadata -TargetPath $logsDir
Get-PathMetadata -TargetPath $requestLogsDir
)
}
$systemInfo | ConvertTo-Json -Depth 6 | Set-Content -LiteralPath (Join-Path $bundleDir "meta/system-info.json") -Encoding UTF8
Export-PathListing -SourcePath $appDataDir -OutputFile (Join-Path $bundleDir "meta/appdata-listing.json")
Export-PathListing -SourcePath $legacyDir -OutputFile (Join-Path $bundleDir "meta/legacy-listing.json")
$copiedLogs = Copy-DirectoryIfExists -SourcePath $logsDir -DestinationPath (Join-Path $bundleDir "logs/logs")
$copiedRequestLogs = Copy-DirectoryIfExists -SourcePath $requestLogsDir -DestinationPath (Join-Path $bundleDir "logs/request_logs")
@(
"ProxyCast 支持包已生成。",
"",
"已收集内容:",
"- system-info.json(系统与路径元数据)",
"- appdata-listing.json / legacy-listing.json(目录结构摘要)",
"- logs/(如果存在)",
"- request_logs/(如果存在)",
"",
"默认未收集内容:",
"- config.yaml 正文(避免泄露 API Key / 凭证)",
"- proxycast.db 正文(避免泄露会话与敏感数据)",
"- credentials/ 目录内容",
"",
"是否复制 logs: $copiedLogs",
"是否复制 request_logs: $copiedRequestLogs",
"",
"请将生成的 zip 文件发给支持人员。"
) | Set-Content -LiteralPath (Join-Path $bundleDir "README.txt") -Encoding UTF8
if (Test-Path -LiteralPath $zipPath) {
Remove-Item -LiteralPath $zipPath -Force
}
Compress-Archive -LiteralPath $bundleDir -DestinationPath $zipPath -Force
if (-not $KeepExpanded) {
Remove-Item -LiteralPath $bundleDir -Recurse -Force
}
Write-Step "支持包已生成: $zipPath"