feat: 更新 Computer Use 用户指南,添加 macOS 和 Windows 支持文档链接

This commit is contained in:
claude-code-best
2026-04-04 12:24:11 +08:00
parent ad1f90a00e
commit 765569b3cf
3 changed files with 128 additions and 128 deletions

View File

@@ -48,6 +48,11 @@ export function getComputerUseHostAdapter(): ComputerUseHostAdapter {
if (process.platform !== 'darwin') return { granted: true }
const cu = requireComputerUseSwift() as any
// Native .node module exposes tcc; cross-platform JS backend does not.
// When tcc is absent (JS backend on macOS), we cannot programmatically
// check TCC status — returning granted:false would create a deadlock
// (recheck also fails, user can never pass). The JS backend uses
// osascript/screencapture which trigger OS-level permission prompts
// themselves, so the OS provides the safety net instead.
if (!cu.tcc) return { granted: true }
const accessibility = cu.tcc.checkAccessibility()
const screenRecording = cu.tcc.checkScreenRecording()