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
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:
1 parent
9097ee699d
commit
9058149576
3136 files changed
+18018
-18004
No files matched your search
@@ -1,20 +1,20 @@
|
||||
# WeKnora Mini Program
|
||||
# Academy Mini Program
|
||||
|
||||
This directory contains a WeChat Mini Program plugin for WeKnora. It gives mobile users a lightweight entry point to:
|
||||
This directory contains a WeChat Mini Program plugin for Academy. It gives mobile users a lightweight entry point to:
|
||||
|
||||
- configure a WeKnora API endpoint and tenant API key;
|
||||
- configure a Academy API endpoint and tenant API key;
|
||||
- switch UI language between Chinese and English;
|
||||
- list available knowledge bases;
|
||||
- import a URL into a selected knowledge base;
|
||||
- ask a selected knowledge base through WeKnora knowledge chat.
|
||||
- ask a selected knowledge base through Academy knowledge chat.
|
||||
|
||||
## Getting started
|
||||
|
||||
1. Open `miniprogram/` in WeChat DevTools.
|
||||
2. Copy `project.private.config.json.example` to `project.private.config.json` and set your real Mini Program AppID. The shared `project.config.json` intentionally does not include an AppID to avoid forcing maintainers into a placeholder project.
|
||||
3. Open the **Settings** tab and fill in:
|
||||
- API Base URL, for example `https://weknora.example.com`;
|
||||
- API Key from the WeKnora tenant settings page;
|
||||
- API Base URL, for example `https://academy.example.com`;
|
||||
- API Key from the Academy tenant settings page;
|
||||
- Language (`中文` / `English`, default `中文`).
|
||||
4. Open the **Knowledge** tab, refresh knowledge bases, and select the target knowledge base.
|
||||
5. Import a URL or switch to **Chat** to ask questions.
|
||||
@@ -27,8 +27,8 @@ This directory contains a WeChat Mini Program plugin for WeKnora. It gives mobil
|
||||
|
||||
## Local development notes
|
||||
|
||||
- WeChat DevTools may block `localhost` requests when URL validation is enabled. For local testing, either disable domain validation in DevTools or expose WeKnora through a HTTPS development domain.
|
||||
- In production Mini Programs, add the WeKnora API domain to the Mini Program request domain allowlist.
|
||||
- WeChat DevTools may block `localhost` requests when URL validation is enabled. For local testing, either disable domain validation in DevTools or expose Academy through a HTTPS development domain.
|
||||
- In production Mini Programs, add the Academy API domain to the Mini Program request domain allowlist.
|
||||
- The chat endpoint returns Server-Sent Events. The Mini Program client parses completed SSE text responses and displays accumulated `answer` chunks.
|
||||
|
||||
## Test
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
App({
|
||||
onLaunch() {
|
||||
const settings = wx.getStorageSync("weknora_settings");
|
||||
const settings = wx.getStorageSync("academy_settings");
|
||||
if (!settings) {
|
||||
wx.setStorageSync("weknora_settings", {
|
||||
wx.setStorageSync("academy_settings", {
|
||||
baseUrl: "http://localhost:8080",
|
||||
apiKey: "",
|
||||
selectedKnowledgeBaseId: "",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"pages/settings/settings"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTitleText": "WeKnora",
|
||||
"navigationBarTitleText": "Academy",
|
||||
"navigationBarBackgroundColor": "#0d3b2a",
|
||||
"navigationBarTextStyle": "white",
|
||||
"backgroundColor": "#f3f3f3"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "weknora-miniprogram",
|
||||
"name": "academy-miniprogram",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"description": "WeChat Mini Program plugin for WeKnora",
|
||||
"description": "WeChat Mini Program plugin for Academy",
|
||||
"scripts": {
|
||||
"test": "node --test ../tests/miniprogram/*.test.js"
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ function buildViewModel() {
|
||||
chatSubtitle: messages.chatSubtitle,
|
||||
questionLabel: messages.question,
|
||||
questionPlaceholder: messages.questionPlaceholder,
|
||||
askText: messages.askWeKnora,
|
||||
askText: messages.askAcademy,
|
||||
answerLabel: messages.answer
|
||||
};
|
||||
}
|
||||
@@ -18,10 +18,10 @@ function buildViewModel() {
|
||||
Page({
|
||||
data: {
|
||||
chatTitle: "知识问答",
|
||||
chatSubtitle: "向当前选中的 WeKnora 知识库提问。",
|
||||
chatSubtitle: "向当前选中的 Academy 知识库提问。",
|
||||
questionLabel: "问题",
|
||||
questionPlaceholder: "输入你的问题…",
|
||||
askText: "向 WeKnora 提问",
|
||||
askText: "向 Academy 提问",
|
||||
answerLabel: "回答",
|
||||
answer: "",
|
||||
displayAnswer: "",
|
||||
|
||||
@@ -38,9 +38,9 @@ function buildViewModel() {
|
||||
Page({
|
||||
data: {
|
||||
texts: {},
|
||||
knowledgeTitle: "WeKnora 知识库",
|
||||
knowledgeTitle: "Academy 知识库",
|
||||
knowledgeSubtitle: "在微信中选择知识库,导入网页或提问。",
|
||||
needsSettingsText: "请先配置 WeKnora API 地址和 API Key,再加载知识库。",
|
||||
needsSettingsText: "请先配置 Academy API 地址和 API Key,再加载知识库。",
|
||||
openSettingsText: "打开设置",
|
||||
knowledgeBaseLabel: "知识库",
|
||||
tapToSelectText: "点击选择",
|
||||
|
||||
@@ -22,10 +22,10 @@ function buildViewModel(locale, languageIndex) {
|
||||
|
||||
Page({
|
||||
data: {
|
||||
settingsTitle: "连接 WeKnora",
|
||||
settingsSubtitle: "填写 WeKnora API 地址与租户 API Key。",
|
||||
settingsTitle: "连接 Academy",
|
||||
settingsSubtitle: "填写 Academy API 地址与租户 API Key。",
|
||||
apiBaseUrlLabel: "API 地址",
|
||||
apiBaseUrlPlaceholder: "https://your-weknora.example.com",
|
||||
apiBaseUrlPlaceholder: "https://your-academy.example.com",
|
||||
apiKeyLabel: "API Key",
|
||||
apiKeyPlaceholder: "sk-...",
|
||||
languageLabel: "界面语言",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"description": "WeKnora Mini Program plugin",
|
||||
"description": "Academy Mini Program plugin",
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"es6": true,
|
||||
@@ -27,7 +27,7 @@
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "latest",
|
||||
"projectname": "WeKnora Mini Program",
|
||||
"projectname": "Academy Mini Program",
|
||||
"condition": {},
|
||||
"appid": "wxbaf7dc10724effab",
|
||||
"simulatorPluginLibVersion": {},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const STORAGE_KEY = "weknora_settings";
|
||||
const STORAGE_KEY = "academy_settings";
|
||||
|
||||
function normalizeBaseUrl(baseUrl) {
|
||||
if (!baseUrl || typeof baseUrl !== "string") {
|
||||
|
||||
+18
-18
@@ -8,9 +8,9 @@ const MESSAGES = {
|
||||
navKnowledge: "知识库",
|
||||
navChat: "问答",
|
||||
navSettings: "设置",
|
||||
knowledgeTitle: "WeKnora 知识库",
|
||||
knowledgeTitle: "Academy 知识库",
|
||||
knowledgeSubtitle: "在微信中选择知识库,导入网页或提问。",
|
||||
needsSettings: "请先配置 WeKnora API 地址和 API Key,再加载知识库。",
|
||||
needsSettings: "请先配置 Academy API 地址和 API Key,再加载知识库。",
|
||||
openSettings: "打开设置",
|
||||
knowledgeBase: "知识库",
|
||||
tapToSelect: "点击选择",
|
||||
@@ -24,17 +24,17 @@ const MESSAGES = {
|
||||
imported: "导入成功",
|
||||
importFailed: "导入失败",
|
||||
chatTitle: "知识问答",
|
||||
chatSubtitle: "向当前选中的 WeKnora 知识库提问。",
|
||||
chatSubtitle: "向当前选中的 Academy 知识库提问。",
|
||||
question: "问题",
|
||||
questionPlaceholder: "输入你的问题…",
|
||||
askWeKnora: "向 WeKnora 提问",
|
||||
askAcademy: "向 Academy 提问",
|
||||
answer: "回答",
|
||||
chatFailed: "问答失败",
|
||||
sessionIdMissing: "会话接口未返回 session id。",
|
||||
settingsTitle: "连接 WeKnora",
|
||||
settingsSubtitle: "填写 WeKnora API 地址与租户 API Key。",
|
||||
settingsTitle: "连接 Academy",
|
||||
settingsSubtitle: "填写 Academy API 地址与租户 API Key。",
|
||||
apiBaseUrl: "API 地址",
|
||||
apiBaseUrlPlaceholder: "https://your-weknora.example.com",
|
||||
apiBaseUrlPlaceholder: "https://your-academy.example.com",
|
||||
apiKey: "API Key",
|
||||
apiKeyPlaceholder: "sk-...",
|
||||
language: "界面语言",
|
||||
@@ -42,8 +42,8 @@ const MESSAGES = {
|
||||
languageEn: "English",
|
||||
saveSettings: "保存设置",
|
||||
saved: "已保存",
|
||||
missingBaseUrl: "请先配置 WeKnora API 地址。",
|
||||
missingApiKey: "请先配置 WeKnora API Key。"
|
||||
missingBaseUrl: "请先配置 Academy API 地址。",
|
||||
missingApiKey: "请先配置 Academy API Key。"
|
||||
},
|
||||
en: {
|
||||
tabKnowledge: "Knowledge",
|
||||
@@ -52,9 +52,9 @@ const MESSAGES = {
|
||||
navKnowledge: "Knowledge",
|
||||
navChat: "Chat",
|
||||
navSettings: "Settings",
|
||||
knowledgeTitle: "WeKnora Knowledge",
|
||||
knowledgeTitle: "Academy Knowledge",
|
||||
knowledgeSubtitle: "Import a web page into a selected knowledge base from WeChat.",
|
||||
needsSettings: "Configure the WeKnora API base URL and API key before loading knowledge bases.",
|
||||
needsSettings: "Configure the Academy API base URL and API key before loading knowledge bases.",
|
||||
openSettings: "Open Settings",
|
||||
knowledgeBase: "Knowledge Base",
|
||||
tapToSelect: "Tap to select",
|
||||
@@ -68,17 +68,17 @@ const MESSAGES = {
|
||||
imported: "Imported",
|
||||
importFailed: "Import failed",
|
||||
chatTitle: "Knowledge Chat",
|
||||
chatSubtitle: "Ask the selected WeKnora knowledge base.",
|
||||
chatSubtitle: "Ask the selected Academy knowledge base.",
|
||||
question: "Question",
|
||||
questionPlaceholder: "Ask something...",
|
||||
askWeKnora: "Ask WeKnora",
|
||||
askAcademy: "Ask Academy",
|
||||
answer: "Answer",
|
||||
chatFailed: "Chat failed",
|
||||
sessionIdMissing: "The session API did not return a session id.",
|
||||
settingsTitle: "Connect WeKnora",
|
||||
settingsSubtitle: "Use your WeKnora API endpoint and tenant API key.",
|
||||
settingsTitle: "Connect Academy",
|
||||
settingsSubtitle: "Use your Academy API endpoint and tenant API key.",
|
||||
apiBaseUrl: "API Base URL",
|
||||
apiBaseUrlPlaceholder: "https://your-weknora.example.com",
|
||||
apiBaseUrlPlaceholder: "https://your-academy.example.com",
|
||||
apiKey: "API Key",
|
||||
apiKeyPlaceholder: "sk-...",
|
||||
language: "Language",
|
||||
@@ -86,8 +86,8 @@ const MESSAGES = {
|
||||
languageEn: "English",
|
||||
saveSettings: "Save settings",
|
||||
saved: "Saved",
|
||||
missingBaseUrl: "Please configure the WeKnora API base URL first.",
|
||||
missingApiKey: "Please configure the WeKnora API key first."
|
||||
missingBaseUrl: "Please configure the Academy API base URL first.",
|
||||
missingApiKey: "Please configure the Academy API key first."
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user