fix(work): mark interrupted tasks red independently of reply delivery

This commit is contained in:
ex_tianzy
2026-11-12 16:21:10 +08:00
parent a33ce02fa6
commit 43e7b97c0f
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ DELIVERY={None:'尚未接收结果','ready':'已接收结果,等待投递','se
def card_content(task_id,execution,delivery,files=None):
execution=execution if execution in EXECUTION else 'unknown'
color='green' if execution=='completed' else 'red' if execution=='failed' else 'orange' if execution in {'waiting_for_approval','unknown'} else 'blue'
color='green' if execution=='completed' else 'red' if execution in {'failed','interrupted'} else 'orange' if execution in {'waiting_for_approval','unknown'} else 'blue'
elements=[{'tag':'div','text':{'tag':'plain_text','content':'任务状态:'+EXECUTION[execution]}},
{'tag':'div','text':{'tag':'plain_text','content':'文字回复:'+DELIVERY.get(delivery,'状态待核对')}},
{'tag':'note','elements':[{'tag':'plain_text','content':'任务编号:'+task_id}]}]