Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
d2781bd
feat(authservice): authservice功能实现
Mar 10, 2026
1a79c16
feat(auth-service): authservice用户组管理
Mar 12, 2026
c49b9df
feat(core): 对话模块
Mar 13, 2026
1a493ac
feat(core):对话功能
Mar 17, 2026
077a012
fix: 创建prompt接口参数错误
Mar 17, 2026
20ba9f5
fix: 创建prompt接口参数错误
sunjh2222 Mar 17, 2026
5fe6548
feat(juicefs): add juicefs s3 gateway integration
Mar 17, 2026
ed50cb6
Merge branch 'dev' into wangdabenshi-clean
WangDaBenShi Mar 17, 2026
ba31a7f
Merge pull request #2 from sunjh2222/wangdabenshi-clean
WangDaBenShi Mar 17, 2026
a46c34f
refactor(docs): update references from LazyRAG-back to LazyRAG
Mar 17, 2026
1922481
Merge pull request #3 from sunjh2222/wangdabenshi-clean
WangDaBenShi Mar 17, 2026
f9a744d
style(utils): standardize string quotes in generate_bucket_name function
Mar 17, 2026
5404632
Merge pull request #4 from sunjh2222/wangdabenshi-clean
WangDaBenShi Mar 17, 2026
9b03b20
feat: Dataset模块
Mar 17, 2026
e57cdf5
style(utils): standardize string quotes in generate_bucket_name function
Mar 18, 2026
faad9fc
Merge pull request #5 from sunjh2222/wangdabenshi-clean
WangDaBenShi Mar 18, 2026
f3a604f
Merge branch 'dev' into dev_dataset_sjh
Mar 18, 2026
3c7e57e
feat(authservice): authservice功能实现
Mar 10, 2026
82297f7
feat(auth-service): authservice用户组管理
Mar 12, 2026
2d1d5b9
feat(core): 对话模块
Mar 13, 2026
a513e67
fix: 创建prompt接口参数错误
Mar 17, 2026
5865ba9
feat(core):对话功能
Mar 17, 2026
c53a8de
fix: 创建prompt接口参数错误
Mar 18, 2026
43ed342
style(core): format code for consistency across multiple files
Mar 18, 2026
1a0fbf3
refactor(auth-service): improve code readability and consistency acro…
Mar 18, 2026
6fb71d1
chore: remove deprecated OpenAPI specifications for auth-service and …
Mar 18, 2026
1d7715f
Update OpenAPI specifications and clean up unused endpoints
Mar 19, 2026
6e2a20a
Update OpenAPI specifications and clean up unused endpoints
Mar 19, 2026
66c032a
fix(auth-service): update Dockerfile paths for consistency and accuracy
Mar 19, 2026
c54b691
feat: 文档管理
Mar 24, 2026
bc50f80
fix bug
Mar 25, 2026
92d812d
fix bug
Mar 27, 2026
67e6815
fix bug
Mar 27, 2026
9462d0a
解决冲突
Mar 27, 2026
06bfc73
大文件上传
Mar 27, 2026
3f754c5
Merge pull request #8 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 27, 2026
0fa751d
汇总迁移文件
Mar 27, 2026
a83e9ce
Merge pull request #9 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 27, 2026
0138409
fix: resolve flake8 lint errors in auth-service and office-convert-se…
Mar 27, 2026
7ac122f
Merge pull request #10 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 27, 2026
295d7db
中文转换为英文
Mar 27, 2026
4409478
compose yaml提交
Mar 27, 2026
5f4a385
Merge pull request #11 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 27, 2026
05cc075
flake8校验
Mar 27, 2026
d0ca85c
Merge pull request #12 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 27, 2026
77fdd50
gofmt校验
Mar 27, 2026
cc43ccc
Merge pull request #13 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 27, 2026
30dc71e
docker compose修改
Mar 30, 2026
1340bef
Merge pull request #14 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 30, 2026
6ca6abf
delete s
Mar 30, 2026
2f220b7
Merge pull request #15 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 30, 2026
650eaca
数据库初始化
Mar 30, 2026
8f15077
Merge pull request #16 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 30, 2026
f3194fd
恢复切片误删代码
Mar 30, 2026
a571bd2
Merge pull request #17 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 30, 2026
5aeabe1
新增用户修改信息接口
Mar 30, 2026
c1ac492
Merge pull request #18 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 30, 2026
eda61e0
fix: 同名文件夹或者zip上传到同一个目录中
Mar 31, 2026
bdaec14
Merge pull request #19 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 31, 2026
c4d40d9
fix: 修改注释
Mar 31, 2026
3d3d212
Merge pull request #20 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 31, 2026
ff0bfac
fix: 修复lint报错
Mar 31, 2026
96fda23
Merge pull request #21 from sunjh2222/dev_dataset_sjh
sunjh2222 Mar 31, 2026
6af39bd
merge LazyRAG
Mar 31, 2026
eeb89ed
Merge pull request #22 from sunjh2222/dev_merge
sunjh2222 Mar 31, 2026
8fa54cc
删除api和s3临时md文档
Mar 31, 2026
833aaee
Merge pull request #23 from sunjh2222/dev_merge
sunjh2222 Mar 31, 2026
a59b5d7
用户禁用
Apr 2, 2026
fe4ba8b
Merge pull request #24 from sunjh2222/dev_merge
sunjh2222 Apr 2, 2026
9fcae8f
merge LazyRAG
Apr 2, 2026
05ae2ea
fix: 启动dockerfile && 知识库支持标签搜索
Apr 2, 2026
7a9d4fd
Merge pull request #25 from sunjh2222/dev_merge
sunjh2222 Apr 2, 2026
e966a50
Fix OpenAPI generation and frontend compose configuration
Apr 2, 2026
51a1863
Merge branch 'LazyAGI:main' into main
WangDaBenShi Apr 2, 2026
438b63a
fix: 连接doc-server
Apr 2, 2026
fc72ac9
Merge pull request #26 from sunjh2222/dev_merge
sunjh2222 Apr 2, 2026
07f344c
Update frontend port mapping in docker-compose.yml from 8070 to 8090 …
Apr 2, 2026
8717a30
Update frontend service in docker-compose.yml to build from context i…
Apr 2, 2026
b9b9f73
Fix review follow-up bugs in user disable and uploads
WangDaBenShi Apr 3, 2026
aade5f2
Merge pull request #1 from WangDaBenShi/review-followups
WangDaBenShi Apr 3, 2026
0c11092
fix: 连接doc-server
Apr 3, 2026
364144f
Merge pull request #27 from sunjh2222/dev_merge
sunjh2222 Apr 3, 2026
4a743e5
Fix modal and pagination i18n across Ant Design UI
WangDaBenShi Apr 3, 2026
1e63549
fix: 添加导出接口&添加对话接口日志
Apr 3, 2026
0446a09
Merge pull request #28 from sunjh2222/dev_merge
sunjh2222 Apr 3, 2026
3cd3462
merge lazyrag
Apr 3, 2026
30ca4f7
Fix knowledge routing and modal input behavior
WangDaBenShi Apr 3, 2026
a668756
Fix admin user actions and template list pagination
WangDaBenShi Apr 3, 2026
0e95503
Disable inactive member selection and make history toolbar responsive
WangDaBenShi Apr 7, 2026
16c2330
Merge branch 'dev' into main
sunjh2222 Apr 7, 2026
fd94217
Add phone regex validation and localized error messages
WangDaBenShi Apr 7, 2026
eeeb8e2
Regenerate core client for export and batch tag update APIs
WangDaBenShi Apr 8, 2026
df3c1a0
Refactor group management component by removing unused apply join gro…
WangDaBenShi Apr 8, 2026
e1366c4
Regenerate core client for conversation export endpoints
WangDaBenShi Apr 8, 2026
bbc16a3
Use core export API to download conversation history
WangDaBenShi Apr 8, 2026
e274ea2
Localize frontend errors and lock protected permission changes
WangDaBenShi Apr 8, 2026
5e6ab55
Fix ZIP size validation and reduce group remark limit to 200
WangDaBenShi Apr 9, 2026
e244354
Merge branch 'LazyAGI:main' into main
WangDaBenShi Apr 9, 2026
0087c6c
Enable editing dataset roles for groups and fix member updates
WangDaBenShi Apr 9, 2026
9e3a453
Fix upload and group permission validation and messages
WangDaBenShi Apr 9, 2026
ddb2d3d
Enhance AddUserModal to handle inactive users by filtering out disabl…
WangDaBenShi Apr 9, 2026
6119095
Implement dataset group member management: add delete and update endp…
WangDaBenShi Apr 9, 2026
9a69bac
Refactor styles and layout for LanguageSwitcher and admin components;…
WangDaBenShi Apr 10, 2026
29f23fc
Prevent autofill from exposing passwords in profile modal
WangDaBenShi Apr 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"build": "vite build",
"preview": "vite preview",
"gen:openapi": "node scripts/openapi/generate-api.mjs",
"gen:openapi:check": "node scripts/openapi/check-stale.mjs",
"gen:auth": "bash scripts/openapi/generate-auth.sh",
"lint": "eslint \"src/**/*.{ts,tsx}\""
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/scripts/openapi/.openapi-cache.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"auth": "27df6cab73622bababdbb3d8c166683b8ca3c232db32f0527c96442d1a4ff3ad",
"core": "9aa8fdf2c9ed71836a76ff4d9ce9d68ea6d1920609e6b008f297c2e364f91ee6"
"auth": "2680796ccf979bf8380ecf6c0e23ccb62524d789bdd2dd1938df302a802051d9",
"core": "e01780c02a6ab9bfa83339df603979277ab13aa0d03484a0245a5fcbd3f24df2"
}
14 changes: 13 additions & 1 deletion frontend/scripts/openapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@



本地维护的 OpenAPI 规范文件位于
当前前端生成链路的权威输入位于
```
scripts/openapi/specs/auth-openapi.yaml
scripts/openapi/specs/core.yaml
Expand Down Expand Up @@ -39,6 +39,8 @@ npm run gen:openapi auth
npm run gen:openapi core

npm run gen:openapi

npm run gen:openapi:check
```


Expand Down Expand Up @@ -66,6 +68,8 @@ npm run gen:openapi your-service
```


- `scripts/openapi/openapi-manifest.mjs`: OpenAPI 输入/输出清单
- `scripts/openapi/check-stale.mjs`: 检查 spec 与已生成 client 是否一致
- `scripts/openapi/generate-api.mjs`: 主生成脚本
- `scripts/openapi/generate-auth.sh`: 批量生成 auth 与 core 接口(依赖系统 `PATH` 中的 `java`)
- `scripts/openapi/openapi-generator-config.json`: OpenAPI Generator 配置
Expand Down Expand Up @@ -98,6 +102,14 @@ java -version
1. OpenAPI YAML 文件格式是否正确
2. Java 环境是否配置正确
3. 网络连接是否正常(首次运行需要下载 OpenAPI Generator)
4. 先执行 `npm run gen:openapi:check`,确认是否存在 stale 的 spec/client


当前行为说明:

- 如果本地没有 Java 且 spec 没变,`npm run dev` 会跳过生成并继续启动。
- 如果本地没有 Java 且 spec 已变,脚本会直接报错并阻止启动,避免继续使用过期 client。
- 如确需临时跳过 stale 检查,可使用 `OPENAPI_ALLOW_STALE=1 npm run dev`,但这只是临时兜底,不建议长期使用。


- **OpenAPI Generator CLI**: v2.20.2+
Expand Down
55 changes: 55 additions & 0 deletions frontend/scripts/openapi/check-stale.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import fs from "fs";
import {
getOpenApiApis,
getOpenApiCacheFilePath,
hashFile,
} from "./openapi-manifest.mjs";

const cwdPath = process.cwd();
const apis = getOpenApiApis(cwdPath);
const cacheFilePath = getOpenApiCacheFilePath(cwdPath);
const args = new Set(process.argv.slice(2));
const jsonOutput = args.has("--json");
const quiet = args.has("--quiet");

let cache = {};
if (fs.existsSync(cacheFilePath)) {
try {
const raw = fs.readFileSync(cacheFilePath, "utf-8").trim();
cache = raw ? JSON.parse(raw) : {};
} catch {
cache = {};
}
}

const statuses = apis.map((api) => {
const exists = fs.existsSync(api.input);
const currentHash = exists ? hashFile(api.input) : "";
const cachedHash = cache[api.name] || "";

return {
name: api.name,
input: api.input,
exists,
currentHash,
cachedHash,
stale: exists && currentHash !== cachedHash,
};
});

if (jsonOutput) {
process.stdout.write(`${JSON.stringify(statuses, null, 2)}\n`);
} else if (!quiet) {
statuses.forEach((status) => {
const state = !status.exists
? "missing"
: status.stale
? "stale"
: "fresh";
process.stdout.write(`${status.name}: ${state}\n`);
});
}

if (statuses.some((status) => status.stale || !status.exists)) {
process.exit(1);
}
73 changes: 48 additions & 25 deletions frontend/scripts/openapi/generate-api.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,18 @@
import { execSync } from "child_process";
import path from "path";
import fs from "fs";
import { createHash } from "crypto";
import { fileURLToPath } from "url";
import {
getOpenApiApis,
getOpenApiCacheFilePath,
hashFile,
} from "./openapi-manifest.mjs";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const cwdPath = process.cwd();
const outputDirname = path.resolve(cwdPath, "src/api/generated");
const localSpecsDir = path.resolve(cwdPath, "scripts/openapi/specs");

const apis = [
{
name: "auth",
input: path.resolve(localSpecsDir, "auth-openapi.yaml"),
output: path.resolve(outputDirname, "auth-client"),
},
{
name: "core",
input: path.resolve(localSpecsDir, "core.yaml"),
output: path.resolve(outputDirname, "core-client"),
},
];
const apis = getOpenApiApis(cwdPath);

const args = process.argv.slice(2);
const flags = new Set(args.filter((arg) => arg.startsWith("--")));
Expand All @@ -44,19 +34,51 @@ if (target && selectedApis.length === 0) {
process.exit(1);
}

const cacheFilePath = path.resolve(
cwdPath,
"scripts/openapi/.openapi-cache.json",
);
const cacheFilePath = getOpenApiCacheFilePath(cwdPath);
let cache = {};
if (!skipCache && fs.existsSync(cacheFilePath)) {
cache = JSON.parse(fs.readFileSync(cacheFilePath, "utf-8"));
}

function hashFile(filePath) {
if (!fs.existsSync(filePath)) return "";
const content = fs.readFileSync(filePath);
return createHash("sha256").update(content).digest("hex");
function resolveOpenApiGeneratorCommand() {
const binaryName =
process.platform === "win32"
? "openapi-generator-cli.cmd"
: "openapi-generator-cli";
const localBinary = path.resolve(cwdPath, "node_modules", ".bin", binaryName);

if (fs.existsSync(localBinary)) {
return `"${localBinary}"`;
}

if (commandExists("pnpm")) {
return "pnpm exec openapi-generator-cli";
}

if (commandExists("npm")) {
return "npm exec -- openapi-generator-cli";
}

if (commandExists("npx")) {
return "npx --no-install openapi-generator-cli";
}

console.error(
"❌ openapi-generator-cli not found. Run `npm install` in frontend first, or install pnpm/npm/npx on PATH.",
);
process.exit(1);
}

function commandExists(command) {
try {
execSync(`${process.platform === "win32" ? "where" : "command -v"} ${command}`, {
stdio: "ignore",
cwd: cwdPath,
});
return true;
} catch {
return false;
}
}

/**
Expand All @@ -80,6 +102,7 @@ function patchBasePath(outputDir) {
}

let updated = false;
const openApiGeneratorCommand = resolveOpenApiGeneratorCommand();
for (const api of selectedApis) {
if (!fs.existsSync(api.input)) {
console.warn(
Expand All @@ -100,7 +123,7 @@ for (const api of selectedApis) {

try {
execSync(
`pnpm exec openapi-generator-cli generate --skip-validate-spec -c scripts/openapi/openapi-generator-config.json -i "${api.input}" -o "${api.output}"`,
`${openApiGeneratorCommand} generate --skip-validate-spec -c scripts/openapi/openapi-generator-config.json -i "${api.input}" -o "${api.output}"`,
{ stdio: "inherit", cwd: cwdPath },
);
patchBasePath(api.output);
Expand Down
22 changes: 19 additions & 3 deletions frontend/scripts/openapi/generate-auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,25 @@

set -e

if ! command -v java >/dev/null 2>&1; then
echo 'Error: java not found. Install JDK 17+ and ensure it is on PATH (e.g. JAVA_HOME/bin).' >&2
exit 1
if ! command -v java >/dev/null 2>&1 || ! java -version >/dev/null 2>&1; then
if [ -n "${CI:-}" ] || [ "${OPENAPI_GENERATE_STRICT:-}" = "1" ]; then
echo 'Error: java not found. Install JDK 17+ and ensure it is on PATH (e.g. JAVA_HOME/bin).' >&2
exit 1
fi

STALE_APIS=$(node scripts/openapi/check-stale.mjs --json | node -e "const fs=require('fs');const items=JSON.parse(fs.readFileSync(0,'utf8'));process.stdout.write(items.filter(item=>item.stale || !item.exists).map(item=>item.name).join(','));" || true)

echo '⚠️ Java runtime not found. Skipping OpenAPI generation and using checked-in API clients.' >&2
if [ -n "${STALE_APIS}" ]; then
if [ "${OPENAPI_ALLOW_STALE:-}" != "1" ]; then
echo " Error: generated client is stale for: ${STALE_APIS}." >&2
echo ' Install JDK 17+ and rerun `npm run gen:auth`, or set OPENAPI_ALLOW_STALE=1 to bypass temporarily.' >&2
exit 1
fi
echo " Warning: spec changed but generated client was not refreshed for: ${STALE_APIS}." >&2
fi
echo ' To regenerate locally, install JDK 17+ and rerun `node scripts/openapi/generate-api.mjs auth`.' >&2
exit 0
fi

node scripts/openapi/generate-api.mjs auth
Expand Down
32 changes: 32 additions & 0 deletions frontend/scripts/openapi/openapi-manifest.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import fs from "fs";
import path from "path";
import { createHash } from "crypto";

export function getOpenApiApis(cwdPath = process.cwd()) {
const outputDirname = path.resolve(cwdPath, "src/api/generated");
const localSpecsDir = path.resolve(cwdPath, "scripts/openapi/specs");

return [
{
name: "auth",
input: path.resolve(localSpecsDir, "auth-openapi.yaml"),
output: path.resolve(outputDirname, "auth-client"),
},
{
name: "core",
input: path.resolve(localSpecsDir, "core.yaml"),
output: path.resolve(outputDirname, "core-client"),
},
];
}

export function getOpenApiCacheFilePath(cwdPath = process.cwd()) {
return path.resolve(cwdPath, "scripts/openapi/.openapi-cache.json");
}

export function hashFile(filePath) {
if (!fs.existsSync(filePath)) return "";
const content = fs.readFileSync(filePath);
return createHash("sha256").update(content).digest("hex");
}

Loading
Loading