Merge branch 'ji' into master
并入: loop 跨事件循环 DB 访问修复(asyncmy attached to a different loop)、y-log 前缀、全角参考文献角标识别 # Conflicts: # CLAUDE.md
This commit is contained in:
commit
1a87077642
54 files changed
+583
-400
No files matched your search
@@ -158,7 +158,7 @@ export async function listChains(scope: ChainScope = "mine"): Promise<BusinessCh
|
||||
const chains = (data.chains ?? []).map(toChain);
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-业务链条-查询",
|
||||
optDetail: "CM助手-全量-业务链条-查询",
|
||||
url,
|
||||
reqParam: { scope },
|
||||
returnParam: { count: chains.length },
|
||||
@@ -179,7 +179,7 @@ export async function getChain(id: string): Promise<BusinessChain | null> {
|
||||
const chain = toChain(data);
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-业务链条-查看",
|
||||
optDetail: "CM助手-全量-业务链条-查看",
|
||||
url: `${BASE()}/${id}`,
|
||||
reqParam: { id },
|
||||
returnParam: { id: chain.id, title: chain.title },
|
||||
@@ -197,7 +197,7 @@ export async function createChain(payload: ChainCreatePayload): Promise<Business
|
||||
const chain = toChain(data);
|
||||
writeYLog({
|
||||
optType: OptType.create,
|
||||
optDetail: "B1-CM助手-业务链条-新建",
|
||||
optDetail: "CM助手-全量-业务链条-新建",
|
||||
url: BASE(),
|
||||
reqParam: { title: payload.title, seats: payload.seats?.length ?? 0 },
|
||||
returnParam: { id: chain.id, title: chain.title },
|
||||
@@ -218,10 +218,10 @@ export async function updateChain(id: string, patch: ChainUpdatePayload): Promis
|
||||
optType: patch.isPublic === true ? OptType.enabled : patch.isPublic === false ? OptType.disabled : OptType.edit,
|
||||
optDetail:
|
||||
patch.isPublic === true
|
||||
? "B1-CM助手-业务链条-发布"
|
||||
? "CM助手-全量-业务链条-发布"
|
||||
: patch.isPublic === false
|
||||
? "B1-CM助手-业务链条-取消发布"
|
||||
: "B1-CM助手-业务链条-编辑",
|
||||
? "CM助手-全量-业务链条-取消发布"
|
||||
: "CM助手-全量-业务链条-编辑",
|
||||
url: `${BASE()}/${id}`,
|
||||
reqParam: { id, ...patch },
|
||||
returnParam: { id: chain.id, title: chain.title },
|
||||
@@ -237,7 +237,7 @@ export async function deleteChain(id: string): Promise<void> {
|
||||
}
|
||||
writeYLog({
|
||||
optType: OptType.delete,
|
||||
optDetail: "B1-CM助手-业务链条-删除",
|
||||
optDetail: "CM助手-全量-业务链条-删除",
|
||||
url: `${BASE()}/${id}`,
|
||||
reqParam: { id },
|
||||
});
|
||||
|
||||
@@ -48,7 +48,7 @@ export async function getDashboardSessionByTask(taskId: string): Promise<Dashboa
|
||||
const session = toClient((await res.json()) as ServerDashboardSession);
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-大屏会话-查看",
|
||||
optDetail: "CM助手-全量-大屏会话-查看",
|
||||
url: `${BASE()}/by-task/${taskId}`,
|
||||
reqParam: { taskId },
|
||||
returnParam: { taskId: session.taskId, updatedAt: session.updatedAt },
|
||||
@@ -76,7 +76,7 @@ export async function putDashboardSessionByTask(
|
||||
const session = toClient((await res.json()) as ServerDashboardSession);
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-大屏会话-保存",
|
||||
optDetail: "CM助手-全量-大屏会话-保存",
|
||||
url: `${BASE()}/by-task/${taskId}`,
|
||||
reqParam: { taskId, hasTranscript: patch.transcript !== undefined, hasReportJson: patch.reportJson !== undefined },
|
||||
returnParam: { taskId: session.taskId, updatedAt: session.updatedAt },
|
||||
|
||||
@@ -325,7 +325,7 @@ export async function listDrafts(): Promise<DraftMeta[]> {
|
||||
const metas = (data.drafts ?? []).map(toMeta);
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-会商-查询草稿",
|
||||
optDetail: "CM助手-全量-会商-查询草稿",
|
||||
url: BASE(),
|
||||
returnParam: { count: metas.length },
|
||||
});
|
||||
@@ -340,7 +340,7 @@ export async function getDraft(id: string): Promise<DraftRecord | null> {
|
||||
const record = toRecord(data);
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-会商-查看草稿",
|
||||
optDetail: "CM助手-全量-会商-查看草稿",
|
||||
url: `${BASE()}/${id}`,
|
||||
reqParam: { id },
|
||||
returnParam: { id: record.id, title: record.title },
|
||||
@@ -358,7 +358,7 @@ export async function createDraft(payload: DraftCreatePayload): Promise<DraftRec
|
||||
const record = toRecord(data);
|
||||
writeYLog({
|
||||
optType: OptType.create,
|
||||
optDetail: "B1-CM助手-会商-新建草稿",
|
||||
optDetail: "CM助手-全量-会商-新建草稿",
|
||||
url: BASE(),
|
||||
reqParam: { title: payload.title, furthestStep: payload.furthestStep, taskId: payload.taskId ?? null },
|
||||
returnParam: { id: record.id, title: record.title },
|
||||
@@ -377,7 +377,7 @@ export async function updateDraft(id: string, patch: DraftUpdatePayload): Promis
|
||||
const record = toRecord(data);
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-会商-更新草稿",
|
||||
optDetail: "CM助手-全量-会商-更新草稿",
|
||||
url: `${BASE()}/${id}`,
|
||||
reqParam: { id, ...patch },
|
||||
returnParam: { id: record.id, title: record.title },
|
||||
@@ -393,7 +393,7 @@ export async function deleteDraft(id: string): Promise<void> {
|
||||
}
|
||||
writeYLog({
|
||||
optType: OptType.delete,
|
||||
optDetail: "B1-CM助手-会商-删除草稿",
|
||||
optDetail: "CM助手-全量-会商-删除草稿",
|
||||
url: `${BASE()}/${id}`,
|
||||
reqParam: { id },
|
||||
});
|
||||
|
||||
@@ -934,7 +934,7 @@ export async function listSessionArtifacts(
|
||||
};
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-会商产物-查询",
|
||||
optDetail: "CM助手-全量-会商产物-查询",
|
||||
url: `/api/threads/${threadId}/artifacts`,
|
||||
reqParam: { threadId },
|
||||
returnParam: { count: result.files.length },
|
||||
|
||||
@@ -272,7 +272,7 @@ export async function listRecommendHistory(draftId: string): Promise<RecommendHi
|
||||
const items = (data.history ?? []).map(toHistoryItem);
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-席位推荐-查询历史",
|
||||
optDetail: "CM助手-全量-席位推荐-查询历史",
|
||||
url: `/api/roundtable-drafts/${draftId}/recommendations`,
|
||||
reqParam: { draftId },
|
||||
returnParam: { count: items.length },
|
||||
@@ -308,7 +308,7 @@ export async function saveRecommendHistory(
|
||||
const item = toHistoryItem((await res.json()) as ServerHistoryItem);
|
||||
writeYLog({
|
||||
optType: OptType.create,
|
||||
optDetail: "B1-CM助手-席位推荐-保存历史",
|
||||
optDetail: "CM助手-全量-席位推荐-保存历史",
|
||||
url: `/api/roundtable-drafts/${draftId}/recommendations`,
|
||||
reqParam: { draftId, status: payload.status, picks: payload.picks?.length ?? 0 },
|
||||
returnParam: { id: item.id },
|
||||
|
||||
@@ -133,7 +133,7 @@ export async function startJob(payload: StartJobPayload): Promise<RoundtableJob>
|
||||
const job = mapJob(await readJson<Record<string, unknown>>(res, "start job"));
|
||||
writeYLog({
|
||||
optType: OptType.other,
|
||||
optDetail: "B1-CM助手-会商-运行",
|
||||
optDetail: "CM助手-全量-会商-运行",
|
||||
url: BASE(),
|
||||
reqParam: { draftId: payload.draftId ?? null, taskId: payload.taskId ?? null, model: payload.model },
|
||||
returnParam: { id: job.id, status: job.status },
|
||||
@@ -192,7 +192,7 @@ export async function resumeJob(jobId: string, answer: string, taskId?: string |
|
||||
const job = mapJob(await readJson<Record<string, unknown>>(res, "resume job"));
|
||||
writeYLog({
|
||||
optType: OptType.other,
|
||||
optDetail: "B1-CM助手-会商-回答澄清续跑",
|
||||
optDetail: "CM助手-全量-会商-回答澄清续跑",
|
||||
url: `${BASE()}/${jobId}/resume`,
|
||||
reqParam: { jobId, taskId: taskId ?? null },
|
||||
returnParam: { id: job.id, status: job.status },
|
||||
@@ -206,7 +206,7 @@ export async function cancelJob(jobId: string, taskId?: string | null): Promise<
|
||||
const job = mapJob(await readJson<Record<string, unknown>>(res, "cancel job"));
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-会商-取消",
|
||||
optDetail: "CM助手-全量-会商-取消",
|
||||
url: `${BASE()}/${jobId}/cancel`,
|
||||
reqParam: { jobId, taskId: taskId ?? null },
|
||||
returnParam: { id: job.id, status: job.status },
|
||||
|
||||
@@ -37,7 +37,7 @@ export async function listTaskDraftsByTask(taskId: string): Promise<DraftMeta[]>
|
||||
const metas = (data.drafts ?? []).map(toMeta);
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-会商任务-查询草稿",
|
||||
optDetail: "CM助手-全量-会商任务-查询草稿",
|
||||
url: `${BASE()}/by-task/${taskId}`,
|
||||
reqParam: { taskId },
|
||||
returnParam: { count: metas.length },
|
||||
@@ -53,7 +53,7 @@ export async function getLatestTaskDraftByTask(taskId: string): Promise<DraftRec
|
||||
const record = toRecord(data);
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-会商任务-查看最新草稿",
|
||||
optDetail: "CM助手-全量-会商任务-查看最新草稿",
|
||||
url: `${BASE()}/by-task/${taskId}/latest`,
|
||||
reqParam: { taskId },
|
||||
returnParam: { id: record.id, title: record.title },
|
||||
@@ -69,7 +69,7 @@ export async function getTaskDraft(id: string): Promise<DraftRecord | null> {
|
||||
const record = toRecord(data);
|
||||
writeYLog({
|
||||
optType: OptType.view,
|
||||
optDetail: "B1-CM助手-会商任务-查看草稿",
|
||||
optDetail: "CM助手-全量-会商任务-查看草稿",
|
||||
url: `${BASE()}/${id}`,
|
||||
reqParam: { id },
|
||||
returnParam: { id: record.id, title: record.title },
|
||||
@@ -88,7 +88,7 @@ export async function createTaskDraft(payload: DraftCreatePayload): Promise<Draf
|
||||
const record = toRecord(data);
|
||||
writeYLog({
|
||||
optType: OptType.create,
|
||||
optDetail: "B1-CM助手-会商任务-新建草稿",
|
||||
optDetail: "CM助手-全量-会商任务-新建草稿",
|
||||
url: BASE(),
|
||||
reqParam: { taskId: payload.taskId ?? null, title: payload.title, furthestStep: payload.furthestStep },
|
||||
returnParam: { id: record.id, title: record.title },
|
||||
@@ -107,7 +107,7 @@ export async function updateTaskDraft(id: string, patch: DraftUpdatePayload): Pr
|
||||
const record = toRecord(data);
|
||||
writeYLog({
|
||||
optType: OptType.edit,
|
||||
optDetail: "B1-CM助手-会商任务-更新草稿",
|
||||
optDetail: "CM助手-全量-会商任务-更新草稿",
|
||||
url: `${BASE()}/${id}`,
|
||||
reqParam: { id, ...patch },
|
||||
returnParam: { id: record.id, title: record.title },
|
||||
@@ -123,7 +123,7 @@ export async function deleteTaskDraft(id: string): Promise<void> {
|
||||
}
|
||||
writeYLog({
|
||||
optType: OptType.delete,
|
||||
optDetail: "B1-CM助手-会商任务-删除草稿",
|
||||
optDetail: "CM助手-全量-会商任务-删除草稿",
|
||||
url: `${BASE()}/${id}`,
|
||||
reqParam: { id },
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user