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

@@ -826,7 +826,7 @@ import {
wrapChatMarkdownTables,
} from '@/utils/chatMarkdownRenderer';
import { getChunkByIdOnly, getKnowledgeDetails } from '@/api/knowledge-base';
import { WEKNORA_ENTITY_LINK_CLASS, type WeKnoraEntityKind } from '@/utils/weknoraEntityLinks';
import { ACADEMY_ENTITY_LINK_CLASS, type AcademyEntityKind } from '@/utils/academyEntityLinks';
import {
appendMermaidSvgCache,
createMermaidCodeRenderer,
@@ -910,8 +910,8 @@ const TOOL_NAME_KEYS: Record<string, string> = {
read_page: 'agentStream.tools.readPage',
select_tab: 'agentStream.tools.selectTab',
fill_page: 'agentStream.tools.fillPage',
search_weknora_docs: 'agentStream.tools.searchWeKnoraDocs',
read_weknora_doc: 'agentStream.tools.readWeKnoraDoc',
search_academy_docs: 'agentStream.tools.searchAcademyDocs',
read_academy_doc: 'agentStream.tools.readAcademyDoc',
};
const getLocalizedToolName = (toolName?: string | null): string => {
@@ -1081,7 +1081,7 @@ const openRouteInNewTab = (path: string) => {
window.open(href, '_blank', 'noopener,noreferrer');
};
const resolveEntityRoute = async (kind: WeKnoraEntityKind, id: string) => {
const resolveEntityRoute = async (kind: AcademyEntityKind, id: string) => {
if (kind === 'kb') return { path: `/platform/knowledge-bases/${encodeURIComponent(id)}` };
const res: any = kind === 'doc' ? await getKnowledgeDetails(id) : await getChunkByIdOnly(id);
const data = res?.data;
@@ -1097,8 +1097,8 @@ const resolveEntityRoute = async (kind: WeKnoraEntityKind, id: string) => {
// Documents and chunks need a lookup to find their knowledge base, so the tab
// is opened synchronously (keeping the click's popup permission) and pointed
// at the route once it resolves. Access is still checked by the target page.
const openWeKnoraEntity = async (el: HTMLElement) => {
const kind = el.getAttribute('data-entity-kind') as WeKnoraEntityKind | null;
const openAcademyEntity = async (el: HTMLElement) => {
const kind = el.getAttribute('data-entity-kind') as AcademyEntityKind | null;
const id = el.getAttribute('data-entity-id') || '';
if (!kind || !id || props.embedToken) return;
const win = kind === 'kb' ? null : window.open('about:blank', '_blank');
@@ -1114,7 +1114,7 @@ const openWeKnoraEntity = async (el: HTMLElement) => {
}
} catch (error) {
win?.close();
console.error('Failed to open WeKnora entity link:', error);
console.error('Failed to open Academy entity link:', error);
MessagePlugin.warning(t('agentStream.citation.loadFailed'));
}
};
@@ -2653,11 +2653,11 @@ const onRootClick = (e: Event) => {
return;
}
const entityEl = target.closest?.(`.${WEKNORA_ENTITY_LINK_CLASS}`) as HTMLElement | null;
const entityEl = target.closest?.(`.${ACADEMY_ENTITY_LINK_CLASS}`) as HTMLElement | null;
if (entityEl) {
e.preventDefault();
e.stopPropagation();
void openWeKnoraEntity(entityEl);
void openAcademyEntity(entityEl);
return;
}
@@ -2749,11 +2749,11 @@ const onRootKeydown = (e: KeyboardEvent) => {
return;
}
const entityEl = target.closest?.(`.${WEKNORA_ENTITY_LINK_CLASS}`) as HTMLElement | null;
const entityEl = target.closest?.(`.${ACADEMY_ENTITY_LINK_CLASS}`) as HTMLElement | null;
if (entityEl) {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
void openWeKnoraEntity(entityEl);
void openAcademyEntity(entityEl);
}
return;
}
@@ -12,7 +12,7 @@ import zh from '../../../i18n/locales/zh-CN'
const REAL_COMPONENTS = [
'ToolResultRenderer.vue',
'OperationsResult.vue',
'WeKnoraDocResult.vue',
'AcademyDocResult.vue',
'CatalogValue.vue',
'DocMarkdown.vue',
]
@@ -110,7 +110,7 @@ test('operation results show localized names and retain IDs as tooltips', async
test('product docs render pages, sections, and markdown instead of raw JSON', async () => {
const search = await render({
displayType: 'search_weknora_docs',
displayType: 'search_academy_docs',
success: true,
output: JSON.stringify({
results: [{
@@ -125,7 +125,7 @@ test('product docs render pages, sections, and markdown instead of raw JSON', as
assert.doesNotMatch(search, /javascript:|fallback-output|<script>/)
const read = await render({
displayType: 'read_weknora_doc',
displayType: 'read_academy_doc',
success: true,
output: JSON.stringify({
title: 'Wiki',
@@ -185,7 +185,7 @@ import { resolveFilePreviewExt } from '@/utils/filePreview'
import DocumentPreview from '@/components/document-preview.vue'
const LIST_WIDTH = 440
const PREVIEW_WIDTH_KEY = 'weknora-chat-artifact-preview-width'
const PREVIEW_WIDTH_KEY = 'academy-chat-artifact-preview-width'
const PREVIEW_DEFAULT_WIDTH = 760
const PREVIEW_MIN_WIDTH = 520
@@ -73,7 +73,7 @@ const onSystemThemeChange = (event: MediaQueryListEvent) => {
prefersDark?.addEventListener('change', onSystemThemeChange);
// ANSI palette: ls --color uses the usual dircolors mapping (dir=blue,
// exec=green, link=cyan). Only the green slots stay WeKnora brand so
// exec=green, link=cyan). Only the green slots stay Academy brand so
// user@host (01;32) matches the product color; path (01;34) stays blue
// like directories.
function xtermTheme(dark: boolean) {
@@ -14,7 +14,7 @@ const evaluate = (description, serviceName = 'docs-mcp', delegatedTask = '') =>
props: { description, serviceName, delegatedTask },
argsText: { value: '{"period":2,"limit":3}' },
computed: fn => ({ value: fn() }),
isOperation: { value: serviceName === 'WeKnora' },
isOperation: { value: serviceName === 'Academy' },
targetLabel: { value: serviceName + ' › tool' },
t: (key, params) => key.split('.').pop() + ' ' + JSON.stringify(params),
},
@@ -64,7 +64,7 @@ test('setting lines render as labeled fields and the title stays the headline',
assert.match(styles, /\.prompt-fields \{/)
})
test('a WeKnora operation asks with its summary and target, and counts move out of labels', () => {
test('a Academy operation asks with its summary and target, and counts move out of labels', () => {
const description = [
'创建MCP服务',
'汇率查询 MCP',
@@ -72,7 +72,7 @@ test('a WeKnora operation asks with its summary and target, and counts move out
'URL: https://example.com/mcp',
'Usage instructions (92 characters): 查询汇率',
].join('\n')
const { descriptionParts, question } = evaluate(description, 'WeKnora')
const { descriptionParts, question } = evaluate(description, 'Academy')
assert.deepEqual(JSON.parse(JSON.stringify(descriptionParts.value)), {
head: 'This replaces the stored credentials.',
fields: [
@@ -88,7 +88,7 @@ test('a WeKnora operation asks with its summary and target, and counts move out
})
test('a warning right after the summary is not mistaken for the target', () => {
const { descriptionParts, question } = evaluate('Update MCP service\nThis drops existing tools.', 'WeKnora')
const { descriptionParts, question } = evaluate('Update MCP service\nThis drops existing tools.', 'Academy')
assert.equal(descriptionParts.value.target, '')
assert.equal(descriptionParts.value.head, 'This drops existing tools.')
assert.equal(question.value, 'operationQuestionNoTarget {"action":"Update MCP service"}')
@@ -183,7 +183,7 @@ const awaitingInDock = computed(() => open.value && props.variant !== 'dock' &&
const hasArgs = computed(() => argsText.value.trim().length > 0)
// The service name the backend gives its own operations (run_operation).
const isOperation = computed(() => props.serviceName === 'WeKnora')
const isOperation = computed(() => props.serviceName === 'Academy')
// A batch operation ends its description with one "- " line per item it acts
// on; those render as a list so every item stays visible. "Label: value"
@@ -215,7 +215,7 @@ const descriptionParts = computed(() => {
? { label: counted[1], value: match[2], count: counted[2] }
: { label: match[1], value: match[2] })
}
// A WeKnora operation's description opens with its summary, then the label
// A Academy operation's description opens with its summary, then the label
// of what it acts on; they make the question instead of the raw operation id.
let action = ''
let target = ''
@@ -102,9 +102,9 @@
:output="output" :data="toolData" :success="success"
/>
<WeKnoraDocResult
v-else-if="displayType === 'search_weknora_docs' || displayType === 'read_weknora_doc'"
:mode="displayType === 'read_weknora_doc' ? 'read' : 'search'"
<AcademyDocResult
v-else-if="displayType === 'search_academy_docs' || displayType === 'read_academy_doc'"
:mode="displayType === 'read_academy_doc' ? 'read' : 'search'"
:output="output" :data="toolData" :success="success"
/>
@@ -175,7 +175,7 @@ import ReadSkillResult from './tool-results/ReadSkillResult.vue';
import McpToolResult from './tool-results/McpToolResult.vue';
import ImageViewResult from './tool-results/ImageViewResult.vue';
import OperationsResult from './tool-results/OperationsResult.vue';
import WeKnoraDocResult from './tool-results/WeKnoraDocResult.vue';
import AcademyDocResult from './tool-results/AcademyDocResult.vue';
interface Props {
success?: boolean;
@@ -8,10 +8,10 @@
<template v-else-if="mode === 'search'">
<div class="doc-summary">
{{ listingPages
? $t('agentStream.weknoraDocs.pages', { count: pages.length })
: $t('agentStream.weknoraDocs.hits', { count: hits.length }) }}
? $t('agentStream.academyDocs.pages', { count: pages.length })
: $t('agentStream.academyDocs.hits', { count: hits.length }) }}
</div>
<p v-if="!rows.length" class="doc-empty">{{ $t('agentStream.weknoraDocs.empty') }}</p>
<p v-if="!rows.length" class="doc-empty">{{ $t('agentStream.academyDocs.empty') }}</p>
<div v-else class="doc-list">
<article v-for="(row, index) in rows" :key="`${row.path}-${index}`" class="doc-item">
<div class="doc-item__head">
@@ -40,12 +40,12 @@
<div v-if="read.title || read.url" class="doc-read__head">
<span v-if="read.title" class="doc-read__title">{{ read.title }}</span>
<a v-if="readHref" class="doc-read__link" :href="readHref" target="_blank" rel="noopener noreferrer">
{{ $t('agentStream.weknoraDocs.openDoc') }}
{{ $t('agentStream.academyDocs.openDoc') }}
</a>
</div>
<p v-if="read.section" class="doc-read__section">{{ read.section }}</p>
<div v-if="read.outline.length" class="doc-outline">
<div class="doc-summary">{{ $t('agentStream.weknoraDocs.outline') }}</div>
<div class="doc-summary">{{ $t('agentStream.academyDocs.outline') }}</div>
<ul>
<li
v-for="(entry, index) in read.outline"
@@ -55,11 +55,11 @@
</ul>
</div>
<div v-if="read.content" class="doc-read__content">
<div class="doc-summary">{{ $t('agentStream.weknoraDocs.content') }}</div>
<div class="doc-summary">{{ $t('agentStream.academyDocs.content') }}</div>
<DocMarkdown :source="read.content" />
<p v-if="read.truncated" class="doc-note">{{ $t('agentStream.weknoraDocs.truncated') }}</p>
<p v-if="read.truncated" class="doc-note">{{ $t('agentStream.academyDocs.truncated') }}</p>
</div>
<p v-else-if="!read.outline.length && !read.error" class="doc-empty">{{ $t('agentStream.weknoraDocs.empty') }}</p>
<p v-else-if="!read.outline.length && !read.error" class="doc-empty">{{ $t('agentStream.academyDocs.empty') }}</p>
</template>
</div>
</template>
@@ -107,7 +107,7 @@ const structured = computed(() => (
))
const plainError = computed(() => {
if (props.success !== false || structured.value) return ''
return props.output.trim() || t('agentStream.weknoraDocs.failed')
return props.output.trim() || t('agentStream.academyDocs.failed')
})
</script>
+1 -1
View File
@@ -504,7 +504,7 @@ function canRewindMessage(messageId) {
return !isAutomationSession.value && Boolean(messageId) && rewindableIds.value.has(String(messageId))
}
const FORK_PREFILL_KEY = 'weknora:fork-prefill'
const FORK_PREFILL_KEY = 'academy:fork-prefill'
let forkInFlight = false
const rewindInFlight = ref(false)
const rewindLockSessionId = ref('')