Commit Graph

183 Commits

Author SHA1 Message Date
sobird
d3a607e4e5 fix: 修复代码不能在终端高亮的问题
highlight.js v11 result = hljs().highlight(); 已经不存在result.emitter,使用result._emitter替代
2026-04-05 01:37:21 +08:00
claude-code-best
f49c7d7e8c Revert "docs: 更新 README,新增 Run.ps1/TODO.md,删除 V6.md"
This reverts commit 32804623e0.
2026-04-04 23:31:21 +08:00
claude-code-best
5b1a52b8e0 更新大量 tsx 原始文件; 已经迁移 login panel; 部分 (#121)
* style(B1-1): 格式化 ink/buddy/cli/context/screens/tasks/services/keybindings/state (43 files)

纯格式化:移除分号、React Compiler import、import 多行展开。
修复了 Box.tsx 和 ScrollBox.tsx 中无效的 global.d.ts import。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-2): 格式化 commands (79 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-3): 格式化 components/messages,permissions,mcp,sandbox,shell (104 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-4): 格式化 components/PromptInput,FeedbackSurvey,tasks,agents,skills,design-system,wizard (73 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-5): 格式化 components其余 + hooks + tools (232 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-6): 格式化 main/entrypoints/utils/moreright (21 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: 更新 README,新增 Run.ps1/TODO.md,删除 V6.md

- README.md: 大幅重写,更详细版本历史和配置示例
- Run.ps1: 新增 Windows 启动脚本
- TODO.md: 新增包完成清单
- V6.md: 删除(架构重构规划已不适用)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: 修复以前的问题

* fix: 修复 login 面板的问题

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 23:24:27 +08:00
claude-code-best
02694918b5 docs: 更新文档及构建脚本 2026-04-04 21:09:21 +08:00
claude-code-best
c99021d5a3 fix: 尝试修复 windows 下面没有 unzip 的问题 2026-04-04 17:02:39 +08:00
claude-code-best
d720580e75 docs: 添加对 rg 下载的提示 2026-04-04 16:44:45 +08:00
claude-code-best
bd6707ad14 Merge remote-tracking branch 'AgentArc/main' 2026-04-04 16:43:01 +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
f83198e506 feat: 删除 npm deprecation-warning 的黄色指引 2026-04-04 16:40:10 +08:00
claude-code-best
462fe69d80 fix: 修复 openai 的 cost 计算问题 2026-04-04 16:37:50 +08:00
claude-code-best
ab7556e355 feat: auto dream 开启 2026-04-04 16:28:09 +08:00
claude-code-best
ea06f50749 docs: 添加 computer use 的说明 2026-04-04 15:53:48 +08:00
arc
840d4574da fix issues/79: F5 直接调试 2026-04-04 14:57:31 +08:00
arc
6a3fd223fc fix issues/114: bun install报错download-ripgrep MODULE_NOT_FOUND 2026-04-04 14:49:04 +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
419d1e8bcc docs: 更新 CLAUDE.md 2026-04-04 10:39:14 +08:00
claude-code-best
fc9faa2af2 docs: 更新文档 2026-04-04 09:57:41 +08:00
claude-code-best
a67b4a40b0 docs: 更新最新说明 2026-04-04 00:16:13 +08:00
Dosion
913702d97e feat: built-in status line with usage quota display (#89)
* feat: built-in status line with usage quota display

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 00:15:23 +08:00
claude-code-best
86d2c8f9e8 Merge remote-tracking branch 'amDosion/feat/computer-use-windows' 2026-04-04 00:12:52 +08:00
claude-code-best
131465097f Merge branch 'pr/amDosion/92' 2026-04-04 00:12:15 +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
claude-code-best
52d8b83b24 docs: 更新 Readme 2026-04-04 00:03:58 +08:00
claude-code-best
8cb1a15ca5 Merge branch 'pr/amDosion/93' 2026-04-04 00:00:40 +08:00
claude-code-best
8cef1b6a93 Merge remote-tracking branch 'amDosion/feat/enable-chrome-mcp' 2026-04-04 00:00:34 +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
claude-code-best
4c0b2aaedb feat: 绕过 Claude Code 内的 claude 的账号需要; 但是浏览器扩展还是要权限 2026-04-03 23:57:27 +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: 修复测试用例
v1.0.3
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
unraid
6738a76152 feat: enable Claude in Chrome MCP with full browser control
Replace the 6-line stub in @ant/claude-for-chrome-mcp with the complete
implementation (8 files, 3038 lines) from the reference project.

Provides 17 browser tools: navigate, screenshot, click, type, read DOM,
execute JS, record GIF, monitor console/network, manage tabs, etc.

No feature flag needed. No changes to src/ (already matches official).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 21:46:07 +08:00
unraid
7ae94327fb feat: enable /voice mode with native audio binaries
Restore voice input by:
- Copying official cpal-based audio-capture.node binaries (6 platforms)
- Replacing SoX subprocess stub with native .node loader
- Adding VOICE_MODE to default build features

All voice source files in src/ already match the official CLI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 21:14:44 +08:00
claude-code-best
29db9d99de docs: 添加文本好使一些 2026-04-03 20:57:33 +08:00
claude-code-best
9e6fe9b410 feat: 添加 discord 群 2026-04-03 20:55:58 +08:00
claude-code-best
4a9e9185b1 docs: 更新文档 2026-04-03 20:23:51 +08:00
claude-code-best
2cc626c1c3 fix: 修复测试文件 2026-04-03 20:11:09 +08:00
Dosion
eb86e34094 Merge pull request #88 from amDosion/feat/enable-schedule-remote-agents
feat: enable /schedule by adding AGENT_TRIGGERS_REMOTE to default features
2026-04-03 20:07:21 +08:00
claude-code-best
4c5a12228c docs: 调整文档 2026-04-03 19:56:35 +08:00
claude-code-best
a6bef45113 fix: 修复 rg 文件的传入 2026-04-03 19:45:43 +08:00
claude-code-best
7e888ce38d feat: 添加 测试 agent 及一些文档 2026-04-03 19:27:23 +08:00
claude-code-best
5a7d06fe99 refactor(buddy): align companion system with official CLI (#82)
* refactor(buddy): align companion system with official CLI

## Summary

Reverse-engineered the official Claude Code CLI (v2.1.91) buddy/companion
system and aligned our implementation to match.

## Changes (7 files)

### Added
- `src/buddy/CompanionCard.tsx` (+109)
  JSX bordered card matching official vc8: rarity header, colored sprite,
  name, personality, 10-bar stats, last reaction in nested border.

- `src/buddy/companionReact.ts` (+156)
  Reaction system matching official ZUK+Dc8: 45s rate limiting, @-mention
  detection, transcript builder (12 msgs, 5000 chars), POST buddy_react API.

### Modified
- `src/commands/buddy/index.ts`
  type: local -> local-jsx, description/argumentHint/immediate/isHidden.

- `src/commands/buddy/buddy.ts`
  LocalCommandCall -> LocalJSXCommandCall signature (onDone, context, args).
  Removed mute/unmute/rehatch (official uses off/on only).
  /buddy show returns CompanionCard JSX instead of plain text.
  Pet auto-unmutes. companionMuted writes globalConfig (matches UI read source).

- `src/screens/REPL.tsx` (line 2808)
  globalThis.fireCompanionObserver -> import triggerCompanionReaction.

- `src/state/AppStateStore.ts` — comment fix.
- `src/types/global.d.ts` — removed fireCompanionObserver declaration.

## Data flow (verified consistent)
- companionMuted: saveGlobalConfig() <-> getGlobalConfig() (6 read sites)
- companionReaction: setAppState() <-> useAppState() (4 sites)
- companionPetAt: setAppState() <-> useAppState() (2 sites)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(buddy): address CodeRabbit review findings

- buddy.ts: return type Promise<null> → Promise<React.ReactNode>
  to match LocalJSXCommandCall interface (CompanionCard path returns
  ReactElement, not null).
- CompanionCard.tsx: clamp stat value to 0..100 before .repeat()
  to prevent negative count runtime error on out-of-range values.

Import path alias suggestions (src/ vs ../) dismissed — project
convention uses relative paths (verified against color.ts, help.ts).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(buddy): address second round CodeRabbit findings

- buddy.ts:105: remove unsafe (context as any).messages cast.
  ToolUseContext already declares messages: Message[] at Tool.ts:250,
  so context.messages is properly typed. Other commands (feedback,
  copy, export) access it the same way without cast.

- companionReact.ts:154: wrap resp.json() in try/catch for defensive
  JSON parsing. Malformed 200 responses now return null instead of
  propagating to the outer catch.

Rate-limit timing (set before API call) kept as-is — matches official
ZUK pattern: prevents retry-storm on transient failures.

src/ path alias suggestions dismissed — project uses relative paths.
Auto-unmute on /buddy view kept — matches official behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: unraid <local@unraid.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 17:22:54 +08:00
claude-code-best
cf44cc32e4 Merge branch 'pr/amDosion/60' 2026-04-03 17:21:09 +08:00
unraid
e74d1f0836 fix(buddy): address second round CodeRabbit findings
- buddy.ts:105: remove unsafe (context as any).messages cast.
  ToolUseContext already declares messages: Message[] at Tool.ts:250,
  so context.messages is properly typed. Other commands (feedback,
  copy, export) access it the same way without cast.

- companionReact.ts:154: wrap resp.json() in try/catch for defensive
  JSON parsing. Malformed 200 responses now return null instead of
  propagating to the outer catch.

Rate-limit timing (set before API call) kept as-is — matches official
ZUK pattern: prevents retry-storm on transient failures.

src/ path alias suggestions dismissed — project uses relative paths.
Auto-unmute on /buddy view kept — matches official behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 17:16:16 +08:00
claude-code-best
9dd180dcd3 Merge branch 'pr/amDosion/82' 2026-04-03 17:14:14 +08:00
unraid
7d4adce1b6 fix(buddy): address CodeRabbit review findings
- buddy.ts: return type Promise<null> → Promise<React.ReactNode>
  to match LocalJSXCommandCall interface (CompanionCard path returns
  ReactElement, not null).
- CompanionCard.tsx: clamp stat value to 0..100 before .repeat()
  to prevent negative count runtime error on out-of-range values.

Import path alias suggestions (src/ vs ../) dismissed — project
convention uses relative paths (verified against color.ts, help.ts).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 17:00:01 +08:00
claude-code-best
c9c14c816f feat: 简化 debug 方式 2026-04-03 16:47:24 +08:00
unraid
991119491c refactor(buddy): align companion system with official CLI
## Summary

Reverse-engineered the official Claude Code CLI (v2.1.91) buddy/companion
system and aligned our implementation to match.

## Changes (7 files)

### Added
- `src/buddy/CompanionCard.tsx` (+109)
  JSX bordered card matching official vc8: rarity header, colored sprite,
  name, personality, 10-bar stats, last reaction in nested border.

- `src/buddy/companionReact.ts` (+156)
  Reaction system matching official ZUK+Dc8: 45s rate limiting, @-mention
  detection, transcript builder (12 msgs, 5000 chars), POST buddy_react API.

### Modified
- `src/commands/buddy/index.ts`
  type: local -> local-jsx, description/argumentHint/immediate/isHidden.

- `src/commands/buddy/buddy.ts`
  LocalCommandCall -> LocalJSXCommandCall signature (onDone, context, args).
  Removed mute/unmute/rehatch (official uses off/on only).
  /buddy show returns CompanionCard JSX instead of plain text.
  Pet auto-unmutes. companionMuted writes globalConfig (matches UI read source).

- `src/screens/REPL.tsx` (line 2808)
  globalThis.fireCompanionObserver -> import triggerCompanionReaction.

- `src/state/AppStateStore.ts` — comment fix.
- `src/types/global.d.ts` — removed fireCompanionObserver declaration.

## Data flow (verified consistent)
- companionMuted: saveGlobalConfig() <-> getGlobalConfig() (6 read sites)
- companionReaction: setAppState() <-> useAppState() (4 sites)
- companionPetAt: setAppState() <-> useAppState() (2 sites)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:36:22 +08:00