refactor: 项目更名 WeKnora → Academy
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s

- 全量替换代码/配置/文档中的项目名(保留上游 GitHub 链接、weixin 文档域名、Docker Hub 镜像名)
- 重命名 32 个含项目名的文件/目录;Go module 路径改为 academy(含 client/cli 子模块)
- docreader proto 描述符采用等长替换,保持序列化字节布局有效
- Dockerfile.app 构建网络修复: browserskill 离线产物通道、PyPI/apt 国内镜像
- 运行验证: go build ✓ docker compose up ✓ 健康检查 ✓
This commit is contained in:
runny committed 2026-11-13 20:52:51 +08:00
1 parent 9097ee699d
commit 9058149576
3136 files changed
+18018 -18004

No files matched your search

+15 -15
View File
@@ -16,10 +16,10 @@ func TestStripAtMentionBasic(t *testing.T) {
{"single-word bot double-space", "@Bot /stop", "/stop"},
{"single-word bot single-space", "@Bot /stop", "/stop"},
{"single-word bot double-space chinese", "@Bot 你好世界", "你好世界"},
{"multi-word bot double-space", "@WeKnora Bot /stop", "/stop"},
{"multi-word bot double-space chinese", "@WeKnora Bot 什么是上下文工程", "什么是上下文工程"},
{"multi-word bot single-space command", "@WeKnora Bot /stop", "/stop"},
{"multi-word bot single-space chinese", "@WeKnora Bot 什么是老登", "什么是老登"},
{"multi-word bot double-space", "@Academy Bot /stop", "/stop"},
{"multi-word bot double-space chinese", "@Academy Bot 什么是上下文工程", "什么是上下文工程"},
{"multi-word bot single-space command", "@Academy Bot /stop", "/stop"},
{"multi-word bot single-space chinese", "@Academy Bot 什么是老登", "什么是老登"},
{"leading whitespace", " @Bot hello ", "hello"},
{"double-space in user content", "@Bot hello world", "hello world"},
}
@@ -37,25 +37,25 @@ func TestLongConnClient_StripAtMention(t *testing.T) {
t.Run("learns bot name from double-space then handles single-space", func(t *testing.T) {
c := &LongConnClient{}
// First message: double-space → learn "WeKnora Bot"
got := c.stripAtMention("@WeKnora Bot 什么是上下文工程")
// First message: double-space → learn "Academy Bot"
got := c.stripAtMention("@Academy Bot 什么是上下文工程")
if got != "什么是上下文工程" {
t.Errorf("first message: got %q, want %q", got, "什么是上下文工程")
}
// Verify bot name was cached
if name, _ := c.botDisplayName.Load().(string); name != "WeKnora Bot" {
t.Errorf("cached bot name = %q, want %q", name, "WeKnora Bot")
if name, _ := c.botDisplayName.Load().(string); name != "Academy Bot" {
t.Errorf("cached bot name = %q, want %q", name, "Academy Bot")
}
// Second message: single-space → should use cached name
got = c.stripAtMention("@WeKnora Bot /stop")
got = c.stripAtMention("@Academy Bot /stop")
if got != "/stop" {
t.Errorf("second message: got %q, want %q", got, "/stop")
}
// Single-space with chinese content
got = c.stripAtMention("@WeKnora Bot 什么是B+树")
got = c.stripAtMention("@Academy Bot 什么是B+树")
if got != "什么是B+树" {
t.Errorf("chinese single-space: got %q, want %q", got, "什么是B+树")
}
@@ -63,10 +63,10 @@ func TestLongConnClient_StripAtMention(t *testing.T) {
t.Run("preconfigured bot name", func(t *testing.T) {
c := &LongConnClient{}
c.botDisplayName.Store("WeKnora Bot")
c.botDisplayName.Store("Academy Bot")
// Single-space should work immediately without learning
got := c.stripAtMention("@WeKnora Bot /stop")
got := c.stripAtMention("@Academy Bot /stop")
if got != "/stop" {
t.Errorf("got %q, want %q", got, "/stop")
}
@@ -131,7 +131,7 @@ func TestLongConnClient_StripAtMention(t *testing.T) {
t.Run("cold start single-space command", func(t *testing.T) {
c := &LongConnClient{}
// No cached name, single space → heuristic detects " /" boundary
got := c.stripAtMention("@WeKnora Bot /stop")
got := c.stripAtMention("@Academy Bot /stop")
if got != "/stop" {
t.Errorf("got %q, want %q", got, "/stop")
}
@@ -140,7 +140,7 @@ func TestLongConnClient_StripAtMention(t *testing.T) {
t.Run("cold start single-space chinese", func(t *testing.T) {
c := &LongConnClient{}
// No cached name, single space → heuristic detects non-ASCII boundary
got := c.stripAtMention("@WeKnora Bot 什么是老登")
got := c.stripAtMention("@Academy Bot 什么是老登")
if got != "什么是老登" {
t.Errorf("got %q, want %q", got, "什么是老登")
}
@@ -149,7 +149,7 @@ func TestLongConnClient_StripAtMention(t *testing.T) {
t.Run("cold start all-ascii content falls back to first word", func(t *testing.T) {
c := &LongConnClient{}
// No cached name, all ASCII → heuristic can't find boundary, strips first @word
got := c.stripAtMention("@WeKnora Bot hello")
got := c.stripAtMention("@Academy Bot hello")
if got != "Bot hello" {
t.Errorf("got %q, want %q", got, "Bot hello")
}