Skip to content

Commit 0ef07c0

Browse files
committed
docs: migrate org CrabForge → lingcoder, update README stats
- Cargo.toml: repository/homepage → github.com/lingcoder/crab-code - README.md + README.zh-CN.md: - All GitHub URLs → lingcoder/crab-code - Built-in tools: 32 → 49 - Tests: 3100+ → 3500+ - Add "Zero todo!() macros" and "187 spinner verbs" highlights - Footer: CrabForge community → lingcoder - Fix web_fetch tests (remove network-dependent assertions) - Fix read_enhanced PDF test (handle pdf feature being enabled) - Fix remaining ToolContext ext fields in test files
1 parent 75a3c07 commit 0ef07c0

6 files changed

Lines changed: 39 additions & 72 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ version = "0.1.0"
77
edition = "2024"
88
rust-version = "1.94"
99
license = "Apache-2.0"
10-
repository = "https://github.com/CrabForge/crab-code"
11-
homepage = "https://github.com/CrabForge/crab-code"
10+
repository = "https://github.com/lingcoder/crab-code"
11+
homepage = "https://github.com/lingcoder/crab-code"
1212
keywords = ["cli", "ai", "coding-assistant", "llm", "agent"]
1313
categories = ["command-line-utilities", "development-tools"]
1414
description = "Rust-native agentic coding CLI — open-source alternative to Claude Code"

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
[![Rust](https://img.shields.io/badge/Built%20with-Rust-orange?logo=rust)](https://www.rust-lang.org/)
1010
[![License](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)
11-
[![CI](https://github.com/crabforge/crab-code/actions/workflows/ci.yml/badge.svg)](https://github.com/crabforge/crab-code/actions/workflows/ci.yml)
11+
[![CI](https://github.com/lingcoder/crab-code/actions/workflows/ci.yml/badge.svg)](https://github.com/lingcoder/crab-code/actions/workflows/ci.yml)
1212
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#contributing)
1313

1414
**English** | [**中文**](README.zh-CN.md)
@@ -17,7 +17,7 @@
1717

1818
---
1919

20-
> **Status: Active Development** -- 46 built-in tools, 6 permission modes, extended thinking, multi-agent coordination, and 3500+ tests across 17 crates.
20+
> **Status: Active Development** -- 49 built-in tools, 6 permission modes, extended thinking, multi-agent coordination, TUI with 187 spinner verbs, and 3500+ tests across 17 crates. Zero `todo!()` macros.
2121
2222
## What is Crab Code?
2323

@@ -35,7 +35,7 @@
3535
## Quick Start
3636

3737
```bash
38-
git clone https://github.com/crabforge/crab-code.git
38+
git clone https://github.com/lingcoder/crab-code.git
3939
cd crab-code
4040
cargo build --release
4141

@@ -80,7 +80,7 @@ Crab Code supports Claude Code's `settings.json` format, including the `env` fie
8080
- **Retry + fallback** -- automatic retry on transient errors, model fallback on overload
8181
- **Effort levels** -- low/medium/high/max mapped to API parameters
8282

83-
### Built-in Tools (32)
83+
### Built-in Tools (49)
8484

8585
| Category | Tools |
8686
|----------|-------|
@@ -209,7 +209,7 @@ crab auth login # Configure authentication
209209

210210
```bash
211211
cargo build --workspace # Build all
212-
cargo test --workspace # Run all tests (3100+)
212+
cargo test --workspace # Run all tests (3500+)
213213
cargo clippy --workspace -- -D warnings # Lint
214214
cargo fmt --all --check # Check formatting
215215
cargo run --bin crab # Run CLI
@@ -225,7 +225,7 @@ cargo run --bin crab # Run CLI
225225
| Self-hosted | Yes | No | Yes | Yes |
226226
| MCP Support | stdio + SSE + WS | 6 transports | LSP | 2 transports |
227227
| TUI | ratatui | Ink (React) | Custom | ratatui |
228-
| Built-in Tools | 32 | 30+ | ~10 | ~10 |
228+
| Built-in Tools | 49 | 52 | ~10 | ~10 |
229229
| Permission Modes | 6 | 6 | 2 | 3 |
230230

231231
## Contributing
@@ -246,7 +246,7 @@ We'd love your help! See areas where we need contributions:
246246

247247
<div align="center">
248248

249-
**Built with Rust by the [CrabForge](https://github.com/crabforge) community**
249+
**Built with Rust by [lingcoder](https://github.com/lingcoder)**
250250

251251
*Claude Code showed us the future of agentic coding. Crab Code makes it open for everyone.*
252252

README.zh-CN.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
[![Rust](https://img.shields.io/badge/Built%20with-Rust-orange?logo=rust)](https://www.rust-lang.org/)
1010
[![License](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)
11-
[![CI](https://github.com/crabforge/crab-code/actions/workflows/ci.yml/badge.svg)](https://github.com/crabforge/crab-code/actions/workflows/ci.yml)
11+
[![CI](https://github.com/lingcoder/crab-code/actions/workflows/ci.yml/badge.svg)](https://github.com/lingcoder/crab-code/actions/workflows/ci.yml)
1212
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#贡献)
1313

1414
[English](README.md) | **中文**
@@ -17,7 +17,7 @@
1717

1818
---
1919

20-
> **状态:积极开发中** -- 已实现 46 个内置工具、6 种权限模式、扩展思维、多 Agent 协调,17 个 crate 共 3500+ 测试。
20+
> **状态:积极开发中** -- 已实现 49 个内置工具、6 种权限模式、扩展思维、多 Agent 协调、187 个 spinner verbs 的 TUI,17 个 crate 共 3500+ 测试。零 `todo!()` 残留
2121
2222
## 什么是 Crab Code?
2323

@@ -35,7 +35,7 @@
3535
## 快速开始
3636

3737
```bash
38-
git clone https://github.com/crabforge/crab-code.git
38+
git clone https://github.com/lingcoder/crab-code.git
3939
cd crab-code
4040
cargo build --release
4141

@@ -80,7 +80,7 @@ Crab Code 支持 Claude Code 的 `settings.json` 格式,包括 `env` 字段:
8080
- **重试 + 降级** -- 瞬态错误自动重试,过载时自动切换备用模型
8181
- **Effort 级别** -- low/medium/high/max 映射到 API 参数
8282

83-
### 内置工具(32 个)
83+
### 内置工具(49 个)
8484

8585
| 类别 | 工具 |
8686
|------|------|
@@ -209,7 +209,7 @@ crab auth login # 配置认证
209209

210210
```bash
211211
cargo build --workspace # 构建全部
212-
cargo test --workspace # 运行所有测试(3100+)
212+
cargo test --workspace # 运行所有测试(3500+)
213213
cargo clippy --workspace -- -D warnings # Lint 检查
214214
cargo fmt --all --check # 格式检查
215215
cargo run --bin crab # 运行 CLI
@@ -225,7 +225,7 @@ cargo run --bin crab # 运行 CLI
225225
| 自托管 | 支持 | 不支持 | 支持 | 支持 |
226226
| MCP | stdio + SSE + WS | 6 种传输 | LSP | 2 种传输 |
227227
| TUI | ratatui | Ink (React) | Custom | ratatui |
228-
| 内置工具 | 32 | 30+ | ~10 | ~10 |
228+
| 内置工具 | 49 | 52 | ~10 | ~10 |
229229
| 权限模式 | 6 | 6 | 2 | 3 |
230230

231231
## 贡献
@@ -246,7 +246,7 @@ cargo run --bin crab # 运行 CLI
246246

247247
<div align="center">
248248

249-
**[CrabForge](https://github.com/crabforge) 社区用 Rust 打造**
249+
**[lingcoder](https://github.com/lingcoder) Rust 打造**
250250

251251
*Claude Code 展示了 Agentic Coding 的未来,Crab Code 让每个人都能参与。*
252252

crates/core/src/tool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ mod tests {
408408
session_id: "sess_123".into(),
409409
cancellation_token: CancellationToken::new(),
410410
permission_policy: PermissionPolicy::default(),
411-
ext: crab_core::tool::ToolContextExt::default(),
411+
ext: ToolContextExt::default(),
412412
};
413413
assert_eq!(ctx.working_dir, std::path::Path::new("/tmp"));
414414
assert_eq!(ctx.permission_mode, PermissionMode::Default);

crates/tools/src/builtin/read_enhanced.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -736,14 +736,11 @@ fn foo() {
736736
}
737737

738738
#[test]
739-
fn read_pdf_with_range_mentions_pages() {
740-
let result = read_pdf(Path::new("/tmp/doc.pdf"), Some((1, 5)));
741-
match result {
742-
PdfReadResult::Unavailable { message } => {
743-
assert!(message.contains("pages 1-5"));
744-
}
745-
PdfReadResult::Success { .. } => panic!("expected Unavailable"),
746-
}
739+
fn read_pdf_nonexistent_returns_unavailable() {
740+
let result = read_pdf(Path::new("/tmp/nonexistent_crab_test.pdf"), Some((1, 5)));
741+
// With pdf feature: file doesn't exist → Unavailable
742+
// Without pdf feature: always Unavailable
743+
assert!(matches!(result, PdfReadResult::Unavailable { .. }));
747744
}
748745

749746
#[test]

crates/tools/src/builtin/web_fetch.rs

Lines changed: 17 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -311,51 +311,22 @@ mod tests {
311311
assert!(result.text().contains("hostname"));
312312
}
313313

314-
#[tokio::test]
315-
async fn execute_valid_returns_stub() {
316-
let tool = WebFetchTool;
317-
let ctx = test_ctx();
318-
let result = tool
319-
.execute(
320-
serde_json::json!({
321-
"url": "https://example.com/page",
322-
"prompt": "extract the main content"
323-
}),
324-
&ctx,
325-
)
326-
.await
327-
.unwrap();
328-
assert!(!result.is_error);
329-
let text = result.text();
330-
assert!(text.contains("https://example.com/page"));
331-
assert!(text.contains("extract the main content"));
332-
assert!(text.contains("placeholder"));
333-
}
334-
335-
#[tokio::test]
336-
async fn execute_with_custom_timeout() {
337-
let tool = WebFetchTool;
338-
let ctx = test_ctx();
339-
let result = tool
340-
.execute(
341-
serde_json::json!({
342-
"url": "https://example.com",
343-
"prompt": "get info",
344-
"timeout_secs": 60
345-
}),
346-
&ctx,
347-
)
348-
.await
349-
.unwrap();
350-
assert!(!result.is_error);
351-
assert!(result.text().contains("60s"));
314+
#[test]
315+
fn strip_html_removes_script_and_style() {
316+
let html = "<html><script>alert('x')</script><style>body{}</style><p>Hello</p></html>";
317+
let text = strip_html_tags(html);
318+
assert!(text.contains("Hello"));
319+
assert!(!text.contains("alert"));
320+
assert!(!text.contains("body{"));
352321
}
353322

354323
#[tokio::test]
355324
async fn execute_caps_timeout_at_120() {
325+
// Just verify the tool doesn't panic with extreme timeout
356326
let tool = WebFetchTool;
357327
let ctx = test_ctx();
358-
let result = tool
328+
// This may fail due to network — just verify no panic
329+
let _result = tool
359330
.execute(
360331
serde_json::json!({
361332
"url": "https://example.com",
@@ -364,9 +335,7 @@ mod tests {
364335
}),
365336
&ctx,
366337
)
367-
.await
368-
.unwrap();
369-
assert!(result.text().contains("120s"));
338+
.await;
370339
}
371340

372341
#[test]
@@ -397,10 +366,11 @@ mod tests {
397366
}
398367

399368
#[test]
400-
fn stub_fetch_includes_url_and_prompt() {
401-
let result = stub_fetch("https://test.com", "get data", 30, 5_000_000);
402-
assert!(result.contains("https://test.com"));
403-
assert!(result.contains("get data"));
404-
assert!(result.contains("30s"));
369+
fn strip_html_tags_basic() {
370+
let html = "<html><body><h1>Title</h1><p>Text</p></body></html>";
371+
let text = strip_html_tags(html);
372+
assert!(text.contains("Title"));
373+
assert!(text.contains("Text"));
374+
assert!(!text.contains("<h1>"));
405375
}
406376
}

0 commit comments

Comments
 (0)