claude-code-best/src/utils/computerUse
claude-code-best 34bbc1d403 fix(types): replace all as any with proper type assertions
Eliminate unsafe `as any` casts across 21 non-test source files,
replacing them with specific type annotations:

- Bridge transport: use StdoutMessage type for write/writeBatch calls
- print.ts: type msg.request as Record<string, unknown> for unknown
  SDK control subtypes; use StdoutMessage for output.enqueue()
- API providers (openai/grok/gemini): import ChatCompletion types,
  type streams as AsyncIterable<ChatCompletionChunk>, type request
  bodies as ChatCompletionCreateParamsStreaming
- Computer use executor: use Partial<ResolvePrepareCaptureResult>
  for cross-platform screenshot result
- Components: replace Ink color string casts with proper typing
- Win32 bridge: type stdin as Writable after null check

All 2453 tests pass with 0 failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 23:51:33 +08:00
..
platforms fix(types): clean type fixes across 92 files 2026-04-09 23:45:56 +08:00
win32 fix(types): replace all as any with proper type assertions 2026-04-09 23:51:33 +08:00
appNames.ts feat: build 2026-03-31 19:22:47 +08:00
cleanup.ts feat: build 2026-03-31 19:22:47 +08:00
common.ts feat: Computer Use — Windows 跨平台支持 + GUI 无障碍增强 + Python Bridge 2026-04-05 15:47:20 +08:00
computerUseLock.ts feat: build 2026-03-31 19:22:47 +08:00
drainRunLoop.ts refactor: 大规模迁移原有组件到 ink 包内 2026-04-07 22:26:45 +08:00
escHotkey.ts fix(computer-use): 修复权限检查和应用列表获取的问题 (#157) 2026-04-07 19:53:59 +08:00
executor.ts fix(types): replace all as any with proper type assertions 2026-04-09 23:51:33 +08:00
executorCrossPlatform.ts feat: Computer Use — Windows 跨平台支持 + GUI 无障碍增强 + Python Bridge 2026-04-05 15:47:20 +08:00
gates.ts feat: enable Computer Use with macOS + Windows + Linux support 2026-04-03 23:17:14 +08:00
hostAdapter.ts fix(computer-use): 修复权限检查和应用列表获取的问题 (#157) 2026-04-07 19:53:59 +08:00
inputLoader.ts feat: build 2026-03-31 19:22:47 +08:00
mcpServer.ts Revert "Revert "feat: 第一个可以用的 ink 组件抽象 (#158)" (#175)" 2026-04-07 16:17:48 +08:00
setup.ts feat: build 2026-03-31 19:22:47 +08:00
swiftLoader.ts feat: enable Computer Use on Windows and Linux (#145) 2026-04-06 09:57:55 +08:00
toolRendering.tsx Revert "Revert "feat: 第一个可以用的 ink 组件抽象 (#158)" (#175)" 2026-04-07 16:17:48 +08:00
wrapper.tsx 更新大量 tsx 原始文件; 已经迁移 login panel; 部分 (#121) 2026-04-04 23:24:27 +08:00