mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-21 07:11:59 +00:00
起草失败单独记一种状态,别再停在「起草中」
没有可用模型、模型回复读不懂时,草稿此前一直留在 drafting,界面会以为还在跑。现在置 failed 并把原因写进 error;补上真指标后 PATCH 仍能把它推回正常流程。
This commit is contained in:
@@ -230,13 +230,14 @@ export const LEDGER_UI = {
|
||||
subtitle: '文档里写的是业务说法,这里整理成定义草稿;取数路径接上一次真实运行',
|
||||
back: '返回口径目录',
|
||||
refresh: '刷新',
|
||||
/** 列表按状态筛:全部加四种落点,起草中的只出现在全部里 */
|
||||
/** 列表按状态筛:全部加五种落点,起草中的只出现在全部里 */
|
||||
filter: {
|
||||
all: '全部',
|
||||
questions_open: '待确认问题',
|
||||
path_pending: '待接数据路径',
|
||||
attached: '已接上',
|
||||
rejected: '已驳回',
|
||||
failed: '起草失败',
|
||||
} as Record<string, string>,
|
||||
status: {
|
||||
drafting: '起草中',
|
||||
@@ -244,6 +245,7 @@ export const LEDGER_UI = {
|
||||
path_pending: '待接数据路径',
|
||||
attached: '已接上',
|
||||
rejected: '已驳回',
|
||||
failed: '起草失败',
|
||||
} as Record<string, string>,
|
||||
filterLabel: '按状态筛',
|
||||
summary: (metrics: number, questions: number) => `${formatNumber(metrics)} 个指标 · ${
|
||||
|
||||
@@ -28,12 +28,12 @@ const D = LEDGER_UI.drafts
|
||||
|
||||
/** 列表的状态筛:全部加四种落点,起草中的只出现在全部里 */
|
||||
type Filter = '' | Exclude<CaliberDraftStatus, 'drafting'>
|
||||
const FILTERS: Filter[] = ['', 'questions_open', 'path_pending', 'attached', 'rejected']
|
||||
const FILTERS: Filter[] = ['', 'questions_open', 'path_pending', 'attached', 'rejected', 'failed']
|
||||
|
||||
/** 状态标签:起草中 / 待确认问题 / 待接数据路径 / 已接上 / 已驳回 */
|
||||
/** 状态标签:起草中 / 待确认问题 / 待接数据路径 / 已接上 / 已驳回 / 起草失败 */
|
||||
function StatusPill({ status }: { status: CaliberDraftStatus }) {
|
||||
const color = status === 'attached' ? 'var(--ok)' : status === 'rejected' ? 'var(--text-faint)'
|
||||
: status === 'drafting' ? 'var(--accent)' : 'var(--warn)'
|
||||
: status === 'drafting' ? 'var(--accent)' : status === 'failed' ? 'var(--err)' : 'var(--warn)'
|
||||
return (
|
||||
<span className="shrink-0 rounded border px-1.5 py-0.5 text-[10px]"
|
||||
style={{ color, borderColor: `color-mix(in srgb, ${color} 40%, var(--border))` }}>
|
||||
|
||||
@@ -444,7 +444,7 @@ export interface CaliberTrialOut {
|
||||
* 草稿的状态(app/ledger/docdraft.STATUSES):起草中 → 有待确认的问题 / 待接数据路径 → 已接上;
|
||||
* 另有已驳回。path_pending 不是合法图,取数路径只能来自一次真实运行。
|
||||
*/
|
||||
export type CaliberDraftStatus = 'drafting' | 'questions_open' | 'path_pending' | 'attached' | 'rejected'
|
||||
export type CaliberDraftStatus = 'drafting' | 'questions_open' | 'path_pending' | 'attached' | 'rejected' | 'failed'
|
||||
|
||||
/** 一条引用:逐字原文、原文所在段落(chunk)、span 是原文里的 [start, end) */
|
||||
export interface DraftCitation {
|
||||
|
||||
Reference in New Issue
Block a user