feat(y-log/knowledge): 日志前缀改 CM助手-全量 + 入库 nodeName 按标题去时间戳保持一致
1. Y-Log 上报 optDetail 前缀 B1-CM助手 → CM助手-全量(全量替换 44 个前端文件 + 文档) 2. 知识库入库 nodeName 改为只取 md5(标题).md(去掉时间戳),同一篇 md 每次入库一致,避免重复记录 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
3e68260afa
commit
5ecf28e60c
46 files changed
+307
-301
No files matched your search
@@ -67,7 +67,7 @@ export async function listBusinessMappings(): Promise<BusinessMapping[]> {
|
||||
const mappings = (data.mappings ?? []).map(toMapping);
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-业务映射-列表",
|
||||
optDetail: "CM助手-全量-业务映射-列表",
|
||||
url: "/api/business-mapping",
|
||||
returnParam: mappings,
|
||||
});
|
||||
@@ -94,7 +94,7 @@ export async function updateBusinessMapping(
|
||||
const mapping = toMapping(data);
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-业务映射-修改",
|
||||
optDetail: "CM助手-全量-业务映射-修改",
|
||||
url: `${BASE()}/${encodeURIComponent(businessCode)}`,
|
||||
reqParam: { businessCode, patch },
|
||||
returnParam: mapping,
|
||||
|
||||
@@ -160,7 +160,7 @@ export async function listLightApps(params: ListLightAppsParams = {}): Promise<L
|
||||
const apps = (data.apps ?? []).map(toApp);
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-轻应用-列表",
|
||||
optDetail: "CM助手-全量-轻应用-列表",
|
||||
url: `${BASE()}${query ? `?${query}` : ""}`,
|
||||
reqParam: params,
|
||||
returnParam: apps,
|
||||
@@ -173,7 +173,7 @@ export async function getLightApp(appId: string): Promise<LightApp> {
|
||||
const app = toApp(await readJson<ServerApp>(res, "get light app"));
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-轻应用-查看",
|
||||
optDetail: "CM助手-全量-轻应用-查看",
|
||||
url: `${BASE()}/${encodeURIComponent(appId)}`,
|
||||
reqParam: { appId },
|
||||
returnParam: app,
|
||||
@@ -190,7 +190,7 @@ export async function createLightApp(input: LightAppInput): Promise<LightApp> {
|
||||
const app = toApp(await readJson<ServerApp>(res, "create light app"));
|
||||
writeYLog({
|
||||
optType: OptType.create,
|
||||
optDetail: "B1-CM助手-轻应用-注册",
|
||||
optDetail: "CM助手-全量-轻应用-注册",
|
||||
url: BASE(),
|
||||
reqParam: input,
|
||||
returnParam: app,
|
||||
@@ -210,7 +210,7 @@ export async function updateLightApp(
|
||||
const app = toApp(await readJson<ServerApp>(res, "update light app"));
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-轻应用-修改",
|
||||
optDetail: "CM助手-全量-轻应用-修改",
|
||||
url: `${BASE()}/${encodeURIComponent(appId)}`,
|
||||
reqParam: { appId, patch },
|
||||
returnParam: app,
|
||||
@@ -223,7 +223,7 @@ export async function deleteLightApp(appId: string): Promise<void> {
|
||||
await readJson<{ success: boolean }>(res, "delete light app");
|
||||
writeYLog({
|
||||
optType: OptType.delete,
|
||||
optDetail: "B1-CM助手-轻应用-删除",
|
||||
optDetail: "CM助手-全量-轻应用-删除",
|
||||
url: `${BASE()}/${encodeURIComponent(appId)}`,
|
||||
reqParam: { appId },
|
||||
});
|
||||
|
||||
@@ -71,7 +71,7 @@ export async function replaceMenuOverrides(overrides: MenuOverride[]): Promise<M
|
||||
const saved = (data.overrides ?? []).map(toOverride);
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-菜单管理-保存",
|
||||
optDetail: "CM助手-全量-菜单管理-保存",
|
||||
url: "/api/menu-overrides",
|
||||
reqParam: { overrides },
|
||||
returnParam: saved,
|
||||
|
||||
@@ -75,7 +75,7 @@ export async function listSensitiveWords(): Promise<SensitiveWord[]> {
|
||||
const words = (data.words ?? []).map(toWord);
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-敏感词管理-列表",
|
||||
optDetail: "CM助手-全量-敏感词管理-列表",
|
||||
url: "/api/sensitive-words",
|
||||
returnParam: words,
|
||||
});
|
||||
@@ -92,7 +92,7 @@ export async function replaceSensitiveWords(words: SensitiveWord[]): Promise<Sen
|
||||
const saved = (data.words ?? []).map(toWord);
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-敏感词管理-保存",
|
||||
optDetail: "CM助手-全量-敏感词管理-保存",
|
||||
url: "/api/sensitive-words",
|
||||
reqParam: { words },
|
||||
returnParam: saved,
|
||||
|
||||
@@ -201,7 +201,7 @@ export async function scanAddresses(kinds?: AddressKind[], skill?: string): Prom
|
||||
const result = toScanResult(await readJson<any>(res, "扫描"));
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-技能地址管理-扫描",
|
||||
optDetail: "CM助手-全量-技能地址管理-扫描",
|
||||
url: `${BASE()}/scan${qs ? `?${qs}` : ""}`,
|
||||
reqParam: { kinds, skill },
|
||||
returnParam: result,
|
||||
@@ -227,7 +227,7 @@ export async function scanAddressesStream(
|
||||
if (!result) throw new Error("扫描未返回结果");
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-技能地址管理-扫描",
|
||||
optDetail: "CM助手-全量-技能地址管理-扫描",
|
||||
url: `${BASE()}/scan/stream${qs ? `?${qs}` : ""}`,
|
||||
reqParam: { kinds: opts.kinds, skill: opts.skill },
|
||||
returnParam: result,
|
||||
@@ -245,7 +245,7 @@ export async function previewReplacements(replacements: Replacement[]): Promise<
|
||||
const result = toPreviewResult(await readJson<any>(res, "预览"));
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-技能地址管理-预览",
|
||||
optDetail: "CM助手-全量-技能地址管理-预览",
|
||||
url: `${BASE()}/preview`,
|
||||
reqParam: { replacements },
|
||||
returnParam: result,
|
||||
@@ -277,7 +277,7 @@ export async function applyReplacementsStream(
|
||||
if (!result) throw new Error("应用未返回结果");
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-技能地址管理-应用替换",
|
||||
optDetail: "CM助手-全量-技能地址管理-应用替换",
|
||||
url: `${BASE()}/apply/stream`,
|
||||
reqParam: body,
|
||||
returnParam: result,
|
||||
@@ -297,7 +297,7 @@ export async function listBackups(): Promise<BackupEntry[]> {
|
||||
}));
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-技能地址管理-修改记录",
|
||||
optDetail: "CM助手-全量-技能地址管理-修改记录",
|
||||
url: `${BASE()}/backups`,
|
||||
returnParam: backups,
|
||||
});
|
||||
@@ -310,7 +310,7 @@ export async function rollbackBackup(backupId: string): Promise<{ restored: numb
|
||||
const result = { restored: (data.restored_files ?? []).length };
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-技能地址管理-回退",
|
||||
optDetail: "CM助手-全量-技能地址管理-回退",
|
||||
url: `${BASE()}/rollback/${encodeURIComponent(backupId)}`,
|
||||
reqParam: { backupId },
|
||||
returnParam: result,
|
||||
|
||||
@@ -95,7 +95,7 @@ export async function replaceTaskButtons(buttons: TaskButton[]): Promise<TaskBut
|
||||
const saved = (data.buttons ?? []).map(toButton);
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-按钮管理-保存",
|
||||
optDetail: "CM助手-全量-按钮管理-保存",
|
||||
url: "/api/task-buttons",
|
||||
reqParam: { buttons },
|
||||
returnParam: saved,
|
||||
|
||||
Reference in new issue
Block a user