mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-15 04:41:57 +00:00
35583ba1d8
为什么:前三波召回只有接口;这一波收口,口径升版之后谁的答案受影响、重算了几组、数变没变、怎么处置都要在界面上走得通。 - canvas/versionUsage:使用情况那一行加问数回答、导出、定时任务、召回(老服务端不给就不写) - canvas/RecallPanel(新):发布弹窗「召回」一行——旧版本被谁用过、按参数去重几组、发布后自动重算几组、超出上限几组(可在 版本历史接着算)、上限为 0 时只列不算、不能重算的原因;版本历史展开一版——每组结论(数变了 / 没变 / 无法重算:原因 / 重算失败 / 正在重算 / 未重算)、变了的指标、开了几条待办、召回运行链接,「另有 M 组未重算」+ 接着算 - run/RecallTask(新)+ TaskCard:recall 待办卡——旧口径、新口径、两版之差一行一个指标,每个数点得开召回卡的指标链;每个答案 当时的值点得开(正式运行的口径卡、问数回答的查询快照),问数回答链回对话;「按新版重新出具」(不能时停用并写服务端给的 原因)、「知道了」;遮罩值写已遮罩、点不开;目录有变、表结构变了两种只有「知道了」 - run/decode:ledger.recalled(已按 vN 核对,不影响;召回核对数变没变;试算结果)、ledger.basis_changed(依据有变、依据的 表结构已变);缺字段不猜 - 文案进 lib/termsRecall.ts;接口 api/recall.ts、形状 typesRecall.ts;TaskKind 加 recall - 检查:check-inbox 加 recall 卡两段,check-publish 加召回预告和召回批次两段(版本历史、发布弹窗都在这里测;check-versions 测的是上传表格的版本页,和召回无关),check-decode 加两个新事件的夹具,check-capabilities 的可订阅事件跟上 ledger.recall
24 lines
1.4 KiB
TypeScript
24 lines
1.4 KiB
TypeScript
/**
|
||
* 口径召回的接口(docs/design/next-round/02-口径账本.md 做法 7、8),挂在 api.recall 上。形状见 typesRecall.ts。
|
||
*
|
||
* - preview:发布弹窗的召回预告(把这一版发布成新版本之后,旧版本被谁用过、预计重算几组、超出上限几组);
|
||
* - batches:版本历史里口径升到这一版之后的召回批次(每组的结论、「另有 M 组未重算」);
|
||
* - continueBatch:手动接着算下一批(都算过了回 409)。
|
||
* 待办里的「按新版重新出具」「知道了」走待办接口(api.tasks.respond,decision=reissue / ack)。
|
||
*
|
||
* 请求函数从 ./http 导入,不要从 ./client 导入(循环导入,见 http.ts 开头)。
|
||
*/
|
||
import type { RecallBatches, RecallPreview } from '../typesRecall'
|
||
import { get, post, qs, type RequestOptions } from './http'
|
||
|
||
const wf = (id: string) => encodeURIComponent(id)
|
||
|
||
export const recall = {
|
||
preview: (workflowId: string, version: number, opts?: RequestOptions) =>
|
||
get<RecallPreview>(`/workflows/${wf(workflowId)}/recall-preview${qs({ version })}`, opts),
|
||
batches: (workflowId: string, version: number, opts?: RequestOptions) =>
|
||
get<RecallBatches>(`/ledger/recall/${wf(workflowId)}/${version}`, opts),
|
||
continueBatch: (workflowId: string, version: number) =>
|
||
post<RecallBatches>(`/ledger/recall/${wf(workflowId)}/${version}/continue`),
|
||
}
|