claude-code-best
0e541af24b
style(B1-6): 格式化 main/entrypoints/utils/moreright (21 files)
...
纯格式化:移除分号、React Compiler import、import 多行展开。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-04 22:50:29 +08:00
claude-code-best
e8f417e59f
Merge remote-tracking branch 'origin/feature/computer-use/mac-support'
2026-04-04 16:42:51 +08:00
claude-code-best
765569b3cf
feat: 更新 Computer Use 用户指南,添加 macOS 和 Windows 支持文档链接
2026-04-04 12:24:11 +08:00
claude-code-best
ad1f90a00e
feat: 恢复 mac 版本的 Computer Use
2026-04-04 11:36:43 +08:00
HitMargin
6fefff2ef2
claude-code with OpenAI mode fix ( #102 )
...
Co-authored-by: HitMargin <hitmargin@qq.com >
2026-04-04 10:54:13 +08:00
claude-code-best
86d2c8f9e8
Merge remote-tracking branch 'amDosion/feat/computer-use-windows'
2026-04-04 00:12:52 +08:00
unraid
ca086b045a
fix: resolve Windows Computer Use request_access and screenshot errors
...
Two root causes fixed:
1. swiftLoader.ts: require('@ant/computer-use-swift') returns a module
with { ComputerUseAPI } class, not an instance. macOS native .node
exports a plain object. Fixed by detecting class export and calling
new ComputerUseAPI().
2. executor.ts resolvePrepareCapture: toolCalls.ts expects result to have
{ hidden: string[], displayId: number } fields. Our ComputerUseAPI
returns { base64, width, height } only. Fixed by backfilling missing
fields with defaults.
Verified: request_access → screenshot → left_click all work on Windows.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-04 00:09:51 +08:00
unraid
3707c3c0ba
feat: Windows Computer Use enhancement — PrintWindow, UI Automation, OCR
...
New Windows-native capabilities:
- windowCapture.ts: PrintWindow API for per-window screenshot (works on
occluded/background windows)
- windowEnum.ts: EnumWindows for precise window enumeration with HWND
- uiAutomation.ts: IUIAutomation for UI tree reading, element clicking,
text input, and coordinate-based element identification
- ocr.ts: Windows.Media.Ocr for screen text recognition (en-US + zh-CN)
Updated win32.ts backend to use EnumWindows for listRunning() and added
captureWindowTarget() for window-specific screenshots.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-04 00:00:02 +08:00
JiayuWang(王嘉宇)
fdb2442ad4
test: add coverage for toRelativePath and getDirectoryForPath ( #95 )
...
These two exported functions in src/utils/path.ts lacked unit tests.
toRelativePath wraps Node's path.relative() and keeps the absolute
path when the result would start with '..' (i.e. the target is outside
the CWD). Four tests cover: child-of-cwd, outside-cwd, cwd-itself,
and the type-safety invariant.
getDirectoryForPath uses statSync to distinguish directories from files,
falling back to dirname() for non-existent paths and bypassing the
filesystem for UNC paths (NTLM credential-leak prevention). Three tests
cover: existing directory, known file, and non-existent path.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-03 23:36:19 +08:00
claude-code-best
00b044e8b2
支持 OpenAI Chat 兼容协议 ( #99 )
...
* feat: 完成 openai 接口兼容
* feat: 完成 openai 协议兼容
* fix: 修复测试用例
2026-04-03 23:33:17 +08:00
unraid
e3264a1691
feat: enable Computer Use with macOS + Windows + Linux support
...
Phase 1: Replace @ant/computer-use-mcp stub (12 files, 6517 lines).
Phase 2: Remove 8 macOS-only guards in src/:
- main.tsx: remove getPlatform()==='macos' check
- swiftLoader.ts: remove darwin-only throw
- executor.ts: extend platform guard, clipboard dispatch, paste key
- drainRunLoop.ts: skip CFRunLoop pump on non-darwin
- escHotkey.ts: non-darwin returns false (Ctrl+C fallback)
- hostAdapter.ts: non-darwin permissions granted
- common.ts: dynamic platform + screenshotFiltering
- gates.ts: enabled:true, subscription check removed
Phase 3: Add Linux backends (xdotool/scrot/xrandr/wmctrl):
- computer-use-input/backends/linux.ts (173 lines)
- computer-use-swift/backends/linux.ts (278 lines)
Verified on Windows x64: mouse, screenshot, displays, foreground app.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-03 23:17:14 +08:00
JiayuWang(王嘉宇)
465e9f01c6
test: add coverage for formatRelativeTimeAgo and formatLogMetadata ( #94 )
...
These two exported functions in src/utils/format.ts had no test
coverage. formatRelativeTimeAgo wraps formatRelativeTime and forces
numeric:'always' for past dates; formatLogMetadata assembles parts
(time, branch, size/count, tag, agentSetting, prNumber) into a
' · '-separated string.
Added 8 tests for formatRelativeTimeAgo covering past dates, future
dates, equal-to-now, and the no-'ago'-for-future invariant. Added
9 tests for formatLogMetadata covering all optional fields and the
separator format.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-03 22:17:58 +08:00
claude-code-best
e944633dd8
fix: 修复 ERROR getAntModels is not defined
...
Fixes #69
2026-04-03 11:56:49 +08:00
claude-code-best
e32c159f35
feat: 关闭自动更新
2026-04-03 09:39:32 +08:00
claude-code-best
119518599e
feat: 更新 sentry 错误上报
2026-04-03 09:39:25 +08:00
claude-code-best
d04e00fc2c
feat: 调整预先检查的代码
2026-04-02 23:00:48 +08:00
claude-code-best
c252294dd7
feat: 移除反蒸馏代码
2026-04-02 22:56:23 +08:00
claude-code-best
4337b82e6c
Merge branch 'pr/programming-pupil/33'
2026-04-02 21:41:55 +08:00
claude-code-best
be82b71c3e
feat: 补全 auto mode 分类器 prompt 模板,支持 FEATURE_* 环境变量注入
...
- 重建 yolo-classifier-prompts/ 三个缺失的 prompt 文件
- dev.ts/build.ts 扫描 FEATURE_* 环境变量注入 Bun --feature
- AUTO_MODE_ENABLED_DEFAULT 由 feature flag 决定,开 feature 即开 auto mode
- 补充 docs/safety/auto-mode.mdx prompt 模板章节
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-02 21:18:39 +08:00
claude-code-best
68ccf28be8
feat: 尝试修复 auto mode
2026-04-02 20:57:52 +08:00
claude-code-best
4ab4506de2
fix: 修复 USER_TYPE=ant 时 TUI 无法启动的问题
...
反编译版本中 global.d.ts 声明的全局函数运行时未定义,
通过显式 import、stub 组件和全局 polyfill 修复。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-02 20:31:04 +08:00
claude-code-best
ce29527a67
test: 添加一大堆测试文件
2026-04-02 20:28:08 +08:00
claude-code-best
ac1f02958c
fix: 批量修正 external 字面量
2026-04-02 17:01:39 +08:00
claude-code-best
799dacc407
test: 新增一波测试文件
2026-04-02 16:21:24 +08:00
claude-code-best
8697c91668
feat: 完成测试 16-17
2026-04-02 16:03:20 +08:00
claude-code-best
006ad97fbb
test: 新增测试代码文件
2026-04-02 14:44:56 +08:00
编程界的小学生
2e4d6e2122
Update hooks.ts
2026-04-02 11:12:36 +08:00
claude-code-best
4f323efb61
test: Phase 5 — 添加 12 个测试文件 (+209 tests, 1177 total)
...
新增覆盖: effort, tokenBudget, displayTags, taggedId,
controlMessageCompat, MCP normalization/envExpansion,
gitConfigParser, formatBriefTimestamp, hyperlink, windowsPaths, notebook
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-02 10:11:43 +08:00
claude-code-best
21ac9e441f
test: Phase 2-4 — 添加 12 个测试文件 (+321 tests, 968 total)
...
Phase 2 (轻 Mock): envUtils, sleep/sequential, memoize, groupToolUses, dangerousPatterns, outputLimits
Phase 3 (补全): zodToJsonSchema, PermissionMode, envValidation
Phase 4 (工具模块): mcpStringUtils, destructiveCommandWarning, commandSemantics
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-02 09:29:01 +08:00
claude-code-best
acfaac5f14
test: Phase 1 — 添加 8 个纯函数测试文件 (+134 tests)
...
- errors.test.ts: 28 tests (isAbortError, toError, errorMessage, getErrnoCode, isFsInaccessible, classifyAxiosError 等)
- shellRuleMatching.test.ts: 22 tests (permissionRuleExtractPrefix, hasWildcards, matchWildcardPattern, parsePermissionRule 等)
- argumentSubstitution.test.ts: 18 tests (parseArguments, parseArgumentNames, generateProgressiveArgumentHint, substituteArguments)
- CircularBuffer.test.ts: 12 tests (add, addAll, getRecent, toArray, clear, length)
- sanitization.test.ts: 14 tests (partiallySanitizeUnicode, recursivelySanitizeUnicode)
- slashCommandParsing.test.ts: 8 tests (parseSlashCommand)
- contentArray.test.ts: 6 tests (insertBlockAfterToolResults)
- objectGroupBy.test.ts: 5 tests (objectGroupBy)
总计:781 tests / 40 files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-02 08:50:29 +08:00
claude-code-best
a28a44f9f7
test: 添加 FileEditTool/permissions/filterToolsByDenyRules 测试
...
- FileEditTool/utils.test.ts: 24 tests (normalizeQuotes, stripTrailingWhitespace, findActualString, preserveQuoteStyle, applyEditToFile)
- permissions/permissions.test.ts: 13 tests (getDenyRuleForTool, getAskRuleForTool, getDenyRuleForAgent, filterDeniedAgents)
- tools.test.ts: 扩展 5 tests (filterToolsByDenyRules 过滤逻辑)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-02 07:36:50 +08:00
claude-code-best
43af260322
test: 添加 json/truncate/path/tokens 模块测试
...
- json.test.ts: 27 tests (safeParseJSON, safeParseJSONC, parseJSONL, addItemToJSONCArray)
- truncate.test.ts: 24 tests (truncateToWidth, truncateStartToWidth, truncatePathMiddle, truncate, wrapText)
- path.test.ts: 15 tests (containsPathTraversal, normalizePathForConfigKey)
- tokens.test.ts: 22 tests (getTokenCountFromUsage, getTokenUsage, tokenCountFromLastAPIResponse, etc.)
使用 mock.module() 切断 log.ts/tokenEstimation.ts/slowOperations.ts 重依赖链
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 23:56:37 +08:00
claude-code-best
c57950e15e
test: 添加消息处理单元测试 (测试计划 06)
...
为消息创建、查询、文本提取、规范化等函数添加 56 个测试用例,
覆盖 createAssistantMessage、createUserMessage、isSyntheticMessage、
extractTag、isNotEmptyMessage、normalizeMessages 等核心功能。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 22:43:31 +08:00
claude-code-best
183421361e
test: 添加配置与设置系统单元测试 (测试计划 09)
...
为 SettingsSchema、PermissionsSchema、AllowedMcpServerEntrySchema
验证,MCP 类型守卫,设置常量函数,以及 validation 工具函数添加
62 个测试用例。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 22:39:21 +08:00
claude-code-best
3df4b95ff9
test: 添加 Git 工具函数单元测试 (测试计划 08)
...
为 normalizeGitRemoteUrl 添加 18 个测试用例,覆盖 SSH、HTTPS、
ssh://、CCR 代理 URL 格式、大小写规范化及边界条件。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 22:30:45 +08:00
claude-code-best
f81a767f83
test: 添加 Cron 调度单元测试 (测试计划 07)
...
覆盖 parseCronExpression、computeNextCronRun、cronToHuman,
包含有效/无效表达式、字段范围验证、下次运行计算、人类可读描述,
共 38 个测试用例。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 22:23:26 +08:00
claude-code-best
25839ab454
test: 添加模型路由单元测试 (测试计划 05)
...
覆盖 isModelAlias、isModelFamilyAlias、getAPIProvider、
isFirstPartyAnthropicBaseUrl、firstPartyNameToCanonical,共 40 个测试用例。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 22:20:25 +08:00
claude-code-best
583d04331b
test: 添加权限规则解析器单元测试 (测试计划 04)
...
覆盖 escapeRuleContent、unescapeRuleContent、permissionRuleValueFromString、
permissionRuleValueToString、normalizeLegacyToolName,共 25 个测试用例。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 22:18:00 +08:00
claude-code-best
c4344c4df0
test: 添加 Context 构建单元测试 (测试计划 03)
...
覆盖 stripHtmlComments、isMemoryFilePath、getLargeMemoryFiles、
buildEffectiveSystemPrompt 等函数,共 25 个测试用例全部通过。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 22:14:23 +08:00
claude-code-best
cad6409bfe
test: 添加 Utils 纯函数单元测试 (测试计划 02)
...
覆盖 xml, hash, stringUtils, semver, uuid, format, frontmatterParser,
file, glob, diff 共 10 个模块的纯函数测试。
json.ts 因模块加载链路过重暂跳过。
共 190 个测试用例(含已有 array/set)全部通过。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 22:03:02 +08:00
claude-code-best
221fb6eb05
fix: 修复 @ typeahead 文件搜索无结果的问题
...
execa 新版将 signal 选项重命名为 cancelSignal,导致 execFileNoThrowWithCwd
调用 git ls-files 时抛出 TypeError,文件索引始终为空。同时改进了
FileIndex 的模糊匹配算法,从多个词边界起始位置评分取最优,提升搜索排名质量。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 17:11:09 +08:00
claude-code-best
e443a8fa51
feat: 搭建单元测试基础设施 — Bun test runner + 示例测试
...
添加 bunfig.toml 配置、test script,以及三组示例测试:
- src/utils/array.ts (intersperse, count, uniq)
- src/utils/set.ts (difference, intersects, every, union)
- packages/color-diff-napi (ansi256FromRgb, colorToEscape, detectLanguage 等)
41 tests, 0 failures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 02:08:38 +08:00
claude-code-best
7e15974be9
feat: 实现 4 个 NAPI 包 — modifiers/image-processor/audio-capture/url-handler
...
- modifiers-napi: 使用 Bun FFI 调用 macOS CGEventSourceFlagsState 检测修饰键
- image-processor-napi: 集成 sharp 库,macOS 剪贴板图像读取 (osascript)
- audio-capture-napi: 基于 SoX/arecord 的跨平台音频录制
- url-handler-napi: 完善函数签名(保持 null fallback)
- 修复 image-processor 类型兼容性问题
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 01:07:42 +08:00
claude-code-best
fac9341e73
feat: 全面清理类型错误 — tsc 零错误,any 标注全部消除
...
- 修复所有 33 个原始 tsc 编译错误(ink JSX 声明、类型不匹配、null check 等)
- 清理 176 处 `: any` 类型标注,全部替换为具体推断类型
- 修复清理过程中引入的 41 个回归错误
- 最终结果:0 tsc 错误,0 个非注释 any 标注
- Build 验证通过(25.75MB bundle)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 01:00:10 +08:00
claude-code-best
91f77ea571
feat: 完成一大波类型修复, 虽然 any 很多
2026-03-31 23:43:39 +08:00
claude-code-best
dd9cd782a7
feat: 问就是封包
2026-03-31 23:32:58 +08:00
claude-code-best
d7a729ca68
feat: 完成第二版类型清理
2026-03-31 23:03:47 +08:00
claude-code-best
4c0a655a1c
feat: 大规模清理 claude 的类型问题及依赖
2026-03-31 22:21:35 +08:00
claude-code-best
2c759fe6fa
feat: 类型修复
2026-03-31 21:46:46 +08:00
claude-code-best
c4d92178b7
feat: 完成大部分操作
2026-03-31 21:40:37 +08:00