docs: 更新 AGENTS/README 平台架构说明与月度总结,运行日志视图支持已取消状态
This commit is contained in:
@@ -8,7 +8,7 @@ zip 根含 plugin.json,可被 agent_cli publish 直接发布。
|
||||
用法(任意 cwd 均可):
|
||||
d:\\work\\code\\37duAutomation\\.venv\\Scripts\\python.exe plugins\\XQ0001-0100\\XQ0005 银行卡检查\\_pack.py
|
||||
随后发布:
|
||||
.venv\\Scripts\\python.exe -m controlplane.tools.agent_cli publish \
|
||||
.venv\\Scripts\\python.exe tools\\agent_cli.py publish \
|
||||
dist-plugin\\xq0005_v<版本>.zip --id xq0005 --version <版本>
|
||||
"""
|
||||
import json
|
||||
|
||||
@@ -293,7 +293,8 @@ export function usePluginUI(opts = {}) {
|
||||
ws = connectWS((ev) => {
|
||||
if (ev.run_id && ev.run_id !== runId) return // 只看本次运行
|
||||
if (ev.t === 'progress') progress.value = Math.max(progress.value, ev.pct || 0)
|
||||
else if (ev.t === 'run_done') ev.ok ? finished() : failed(ev.error || '执行失败')
|
||||
// 用户强制停止 / 排队取消 / 排队超时 → 「已取消」,不显示成「执行失败」
|
||||
else if (ev.t === 'run_done') ev.ok ? finished() : (ev.status === 'cancelled' ? cancelled(ev.error) : failed(ev.error || '执行失败'))
|
||||
})
|
||||
ws.onclose = () => { ws = null }
|
||||
}
|
||||
@@ -305,6 +306,7 @@ export function usePluginUI(opts = {}) {
|
||||
try {
|
||||
const r = await getRun(runId)
|
||||
if (r.status === 'done') finished(r.result?.summary || '执行完成')
|
||||
else if (r.status === 'cancelled') cancelled(r.error)
|
||||
else if (r.status === 'error') failed(r.error || '执行失败')
|
||||
} catch (_) { /* 下轮再试 */ }
|
||||
}, 5000)
|
||||
@@ -321,6 +323,13 @@ export function usePluginUI(opts = {}) {
|
||||
banner.value = { type: 'success', text: summary || '执行完成' }
|
||||
}
|
||||
|
||||
// 用户主动停止 / 排队取消 / 排队超时:不算失败,给中性的「已取消」提示
|
||||
function cancelled(err) {
|
||||
stopPolling()
|
||||
running.value = false
|
||||
banner.value = { type: 'warning', text: '任务已取消:' + (err || '用户已停止') }
|
||||
}
|
||||
|
||||
function failed(err) {
|
||||
stopPolling()
|
||||
running.value = false
|
||||
|
||||
+17
-17
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>银行卡检查</title>
|
||||
<script type="module" crossorigin src="/pui/xq0005/assets/index-DGZu9_gw.js"></script>
|
||||
<script type="module" crossorigin src="/pui/xq0005/assets/index-CYfWwOhW.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/pui/xq0005/assets/index-BEGkJ9zj.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user