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
@@ -57,7 +57,7 @@ export async function listScheduledTasks(params: ListScheduledTasksParams = {})
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-定时任务-列表",
|
||||
optDetail: "CM助手-全量-定时任务-列表",
|
||||
url: `${baseUrl()}${query ? `?${query}` : ""}`,
|
||||
reqParam: params,
|
||||
returnParam: result,
|
||||
@@ -84,7 +84,7 @@ export async function createScheduledTask(data: {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.create,
|
||||
optDetail: "B1-CM助手-定时任务-新建",
|
||||
optDetail: "CM助手-全量-定时任务-新建",
|
||||
url: baseUrl(),
|
||||
reqParam: data,
|
||||
returnParam: result,
|
||||
@@ -98,7 +98,7 @@ export async function listScheduledTaskRuns(taskId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-定时任务-运行记录列表",
|
||||
optDetail: "CM助手-全量-定时任务-运行记录列表",
|
||||
url: `${baseUrl()}/${encodeURIComponent(taskId)}/runs`,
|
||||
reqParam: { taskId },
|
||||
returnParam: result,
|
||||
@@ -112,7 +112,7 @@ export async function getScheduledTaskRun(runId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-定时任务-运行详情",
|
||||
optDetail: "CM助手-全量-定时任务-运行详情",
|
||||
url: `${baseUrl()}/runs/${encodeURIComponent(runId)}`,
|
||||
reqParam: { runId },
|
||||
returnParam: result,
|
||||
@@ -128,7 +128,7 @@ export async function deleteScheduledTaskRun(runId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.delete,
|
||||
optDetail: "B1-CM助手-定时任务-删除运行记录",
|
||||
optDetail: "CM助手-全量-定时任务-删除运行记录",
|
||||
url: `${baseUrl()}/runs/${encodeURIComponent(runId)}`,
|
||||
reqParam: { runId },
|
||||
returnParam: result,
|
||||
@@ -143,7 +143,7 @@ export async function getScheduledTaskRunMessages(runId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-定时任务-运行消息",
|
||||
optDetail: "CM助手-全量-定时任务-运行消息",
|
||||
url: `${baseUrl()}/runs/${encodeURIComponent(runId)}/messages`,
|
||||
reqParam: { runId },
|
||||
returnParam: result,
|
||||
@@ -165,7 +165,7 @@ export async function getScheduledTaskRunFileContent(runId: string, fileIndex: n
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-定时任务-运行文件查看",
|
||||
optDetail: "CM助手-全量-定时任务-运行文件查看",
|
||||
url: `${baseUrl()}/runs/${encodeURIComponent(runId)}/files/${fileIndex}`,
|
||||
reqParam: { runId, fileIndex },
|
||||
returnParam: result,
|
||||
@@ -187,7 +187,7 @@ export async function updateScheduledTaskRunFile(
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-定时任务-运行文件编辑",
|
||||
optDetail: "CM助手-全量-定时任务-运行文件编辑",
|
||||
url: `${baseUrl()}/runs/${encodeURIComponent(runId)}/files/${fileIndex}`,
|
||||
reqParam: { runId, fileIndex },
|
||||
returnParam: result,
|
||||
@@ -254,7 +254,7 @@ export async function downloadScheduledTaskRun(runId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.export,
|
||||
optDetail: "B1-CM助手-定时任务-下载运行结果",
|
||||
optDetail: "CM助手-全量-定时任务-下载运行结果",
|
||||
url: scheduledTaskRunDownloadUrl(runId),
|
||||
reqParam: { runId },
|
||||
});
|
||||
@@ -267,7 +267,7 @@ export async function downloadScheduledTaskRunFile(runId: string, fileIndex: num
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.export,
|
||||
optDetail: "B1-CM助手-定时任务-下载运行文件",
|
||||
optDetail: "CM助手-全量-定时任务-下载运行文件",
|
||||
url: scheduledTaskRunFileDownloadUrl(runId, fileIndex),
|
||||
reqParam: { runId, fileIndex },
|
||||
});
|
||||
@@ -279,7 +279,7 @@ export async function getScheduledTaskDeliveryProfile() {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-定时任务-投递配置查看",
|
||||
optDetail: "CM助手-全量-定时任务-投递配置查看",
|
||||
url: `${baseUrl()}/delivery-profile`,
|
||||
returnParam: result,
|
||||
});
|
||||
@@ -298,7 +298,7 @@ export async function updateScheduledTaskDeliveryProfile(data: {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-定时任务-投递配置修改",
|
||||
optDetail: "CM助手-全量-定时任务-投递配置修改",
|
||||
url: `${baseUrl()}/delivery-profile`,
|
||||
reqParam: data,
|
||||
returnParam: result,
|
||||
@@ -329,7 +329,7 @@ export async function updateScheduledTask(
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-定时任务-修改",
|
||||
optDetail: "CM助手-全量-定时任务-修改",
|
||||
url: `${baseUrl()}/${encodeURIComponent(taskId)}`,
|
||||
reqParam: { taskId, data },
|
||||
returnParam: result,
|
||||
@@ -345,7 +345,7 @@ export async function deleteScheduledTask(taskId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.delete,
|
||||
optDetail: "B1-CM助手-定时任务-删除",
|
||||
optDetail: "CM助手-全量-定时任务-删除",
|
||||
url: `${baseUrl()}/${encodeURIComponent(taskId)}`,
|
||||
reqParam: { taskId },
|
||||
returnParam: result,
|
||||
@@ -361,7 +361,7 @@ export async function pauseScheduledTask(taskId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.disabled,
|
||||
optDetail: "B1-CM助手-定时任务-暂停",
|
||||
optDetail: "CM助手-全量-定时任务-暂停",
|
||||
url: `${baseUrl()}/${encodeURIComponent(taskId)}/pause`,
|
||||
reqParam: { taskId },
|
||||
returnParam: result,
|
||||
@@ -377,7 +377,7 @@ export async function resumeScheduledTask(taskId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.enabled,
|
||||
optDetail: "B1-CM助手-定时任务-恢复",
|
||||
optDetail: "CM助手-全量-定时任务-恢复",
|
||||
url: `${baseUrl()}/${encodeURIComponent(taskId)}/resume`,
|
||||
reqParam: { taskId },
|
||||
returnParam: result,
|
||||
@@ -393,7 +393,7 @@ export async function triggerScheduledTask(taskId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.other,
|
||||
optDetail: "B1-CM助手-定时任务-手动运行",
|
||||
optDetail: "CM助手-全量-定时任务-手动运行",
|
||||
url: `${baseUrl()}/${encodeURIComponent(taskId)}/trigger`,
|
||||
reqParam: { taskId },
|
||||
returnParam: result,
|
||||
@@ -411,7 +411,7 @@ export async function listPublishedScheduledTasks(params: { limit?: number; offs
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-定时任务-已发布列表",
|
||||
optDetail: "CM助手-全量-定时任务-已发布列表",
|
||||
url: `${baseUrl()}/published${suffix ? `?${suffix}` : ""}`,
|
||||
reqParam: params,
|
||||
returnParam: result,
|
||||
@@ -427,7 +427,7 @@ export async function publishScheduledTask(taskId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.export,
|
||||
optDetail: "B1-CM助手-定时任务-发布",
|
||||
optDetail: "CM助手-全量-定时任务-发布",
|
||||
url: `${baseUrl()}/${encodeURIComponent(taskId)}/publish`,
|
||||
reqParam: { taskId },
|
||||
returnParam: result,
|
||||
@@ -443,7 +443,7 @@ export async function unpublishScheduledTask(taskId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.other,
|
||||
optDetail: "B1-CM助手-定时任务-取消发布",
|
||||
optDetail: "CM助手-全量-定时任务-取消发布",
|
||||
url: `${baseUrl()}/${encodeURIComponent(taskId)}/unpublish`,
|
||||
reqParam: { taskId },
|
||||
returnParam: result,
|
||||
@@ -461,7 +461,7 @@ export async function subscribeScheduledTask(taskId: string, notifyElement: bool
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.create,
|
||||
optDetail: "B1-CM助手-定时任务-订阅",
|
||||
optDetail: "CM助手-全量-定时任务-订阅",
|
||||
url: `${baseUrl()}/${encodeURIComponent(taskId)}/subscribe`,
|
||||
reqParam: { taskId, notify_element: notifyElement },
|
||||
returnParam: result,
|
||||
@@ -479,7 +479,7 @@ export async function updateScheduledTaskSubscription(taskId: string, notifyElem
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-定时任务-订阅修改",
|
||||
optDetail: "CM助手-全量-定时任务-订阅修改",
|
||||
url: `${baseUrl()}/${encodeURIComponent(taskId)}/subscribe`,
|
||||
reqParam: { taskId, notify_element: notifyElement },
|
||||
returnParam: result,
|
||||
@@ -495,7 +495,7 @@ export async function unsubscribeScheduledTask(taskId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.delete,
|
||||
optDetail: "B1-CM助手-定时任务-取消订阅",
|
||||
optDetail: "CM助手-全量-定时任务-取消订阅",
|
||||
url: `${baseUrl()}/${encodeURIComponent(taskId)}/subscribe`,
|
||||
reqParam: { taskId },
|
||||
returnParam: result,
|
||||
@@ -515,7 +515,7 @@ export async function listAllScheduledTasks(search?: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-定时任务-全部任务列表",
|
||||
optDetail: "CM助手-全量-定时任务-全部任务列表",
|
||||
url: `${baseUrl()}/admin/all${query ? `?${query}` : ""}`,
|
||||
reqParam: { search },
|
||||
returnParam: result,
|
||||
@@ -530,7 +530,7 @@ export async function adminListScheduledTaskRuns(taskId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-定时任务-运行记录列表",
|
||||
optDetail: "CM助手-全量-定时任务-运行记录列表",
|
||||
url: `${baseUrl()}/admin/${encodeURIComponent(taskId)}/runs`,
|
||||
reqParam: { taskId },
|
||||
returnParam: result,
|
||||
@@ -561,7 +561,7 @@ export async function adminUpdateScheduledTask(
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-定时任务-修改",
|
||||
optDetail: "CM助手-全量-定时任务-修改",
|
||||
url: `${baseUrl()}/admin/${encodeURIComponent(taskId)}`,
|
||||
reqParam: { taskId, data },
|
||||
returnParam: result,
|
||||
@@ -578,7 +578,7 @@ export async function adminDeleteScheduledTask(taskId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.delete,
|
||||
optDetail: "B1-CM助手-定时任务-删除",
|
||||
optDetail: "CM助手-全量-定时任务-删除",
|
||||
url: `${baseUrl()}/admin/${encodeURIComponent(taskId)}`,
|
||||
reqParam: { taskId },
|
||||
returnParam: result,
|
||||
@@ -595,7 +595,7 @@ export async function adminTriggerScheduledTask(taskId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.other,
|
||||
optDetail: "B1-CM助手-定时任务-手动运行",
|
||||
optDetail: "CM助手-全量-定时任务-手动运行",
|
||||
url: `${baseUrl()}/admin/${encodeURIComponent(taskId)}/trigger`,
|
||||
reqParam: { taskId },
|
||||
returnParam: result,
|
||||
@@ -612,7 +612,7 @@ export async function getScheduledTaskRunHtml(runId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-定时任务-运行HTML查看",
|
||||
optDetail: "CM助手-全量-定时任务-运行HTML查看",
|
||||
url: `${baseUrl()}/runs/${encodeURIComponent(runId)}/html`,
|
||||
reqParam: { runId },
|
||||
returnParam: result,
|
||||
@@ -626,7 +626,7 @@ export async function listHtmlPageFavorites() {
|
||||
const result = await parseResponse<HtmlPageFavorite[]>(await apiFetch(favoritesUrl()));
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-HTML收藏-列表",
|
||||
optDetail: "CM助手-全量-HTML收藏-列表",
|
||||
url: `/api/html-page-favorites`,
|
||||
returnParam: result,
|
||||
});
|
||||
@@ -639,7 +639,7 @@ export async function getHtmlPageFavorite(favoriteId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-HTML收藏-查看",
|
||||
optDetail: "CM助手-全量-HTML收藏-查看",
|
||||
url: `/api/html-page-favorites/${encodeURIComponent(favoriteId)}`,
|
||||
reqParam: { favoriteId },
|
||||
returnParam: result,
|
||||
@@ -662,7 +662,7 @@ export async function createHtmlPageFavorite(data: {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.create,
|
||||
optDetail: "B1-CM助手-HTML收藏-新建",
|
||||
optDetail: "CM助手-全量-HTML收藏-新建",
|
||||
url: `/api/html-page-favorites`,
|
||||
reqParam: data,
|
||||
returnParam: result,
|
||||
@@ -678,7 +678,7 @@ export async function deleteHtmlPageFavorite(favoriteId: string) {
|
||||
);
|
||||
writeYLog({
|
||||
optType: OptType.delete,
|
||||
optDetail: "B1-CM助手-HTML收藏-删除",
|
||||
optDetail: "CM助手-全量-HTML收藏-删除",
|
||||
url: `/api/html-page-favorites/${encodeURIComponent(favoriteId)}`,
|
||||
reqParam: { favoriteId },
|
||||
returnParam: result,
|
||||
|
||||
@@ -488,7 +488,7 @@ export async function downloadMarkdownAsDocx(
|
||||
const blob = await markdownToDocxBlob(markdown, title);
|
||||
writeYLog({
|
||||
optType: OptType.export,
|
||||
optDetail: "B1-CM助手-定时任务-导出",
|
||||
optDetail: "CM助手-全量-定时任务-导出",
|
||||
url: "/scheduled-tasks/export/docx",
|
||||
reqParam: { fileName, title },
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user