refactor(web): 前端目录重构 — consoles/pages → layouts/features + shared
- consoles/admin/ → layouts/admin-layout/ - consoles/workbench/ → layouts/workbench-layout/ + features/chat/ - pages/ → features/ (dashboard, models, projects, not-found) - components/ → shared/components/ - hooks/ → shared/hooks/ - utils/ → shared/utils/ - 更新所有 import 路径 (src/web/ + tests/web/) - 更新开发文档 (README.md, frontend.md, architecture.md)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, mock, test } from "bun:test";
|
||||
|
||||
import { handleResponse, handleVoidResponse } from "../../../src/web/utils/api";
|
||||
import { handleResponse, handleVoidResponse } from "../../../src/web/shared/utils/api";
|
||||
|
||||
function expectRejects(action: () => Promise<unknown>, message: string) {
|
||||
return action().then(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, mock, test } from "bun:test";
|
||||
|
||||
import type { Sink } from "../../../src/web/utils/logger";
|
||||
import type { Sink } from "../../../src/web/shared/utils/logger";
|
||||
|
||||
import {
|
||||
AntdMessageSink,
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
createDefaultLogger,
|
||||
createMemoryLogger,
|
||||
createNoopLogger,
|
||||
} from "../../../src/web/utils/logger";
|
||||
} from "../../../src/web/shared/utils/logger";
|
||||
|
||||
describe("ConsoleSink", () => {
|
||||
test("调试环境输出 debug 级别", () => {
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
formatRelativeTime,
|
||||
isOlderThan,
|
||||
subtractHours,
|
||||
} from "../../../src/web/utils/time";
|
||||
} from "../../../src/web/shared/utils/time";
|
||||
|
||||
describe("subtractHours", () => {
|
||||
test("正常扣减小时", () => {
|
||||
|
||||
Reference in New Issue
Block a user