@xiangyixie/dsh-superagent 0.18.1 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/client.js +16 -10
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -233,6 +233,7 @@ window.__ModuleLoader__.load({
233
233
  .dsa-rail-count{font-size:11px;line-height:16px;color:var(--dsw-alias-label-tertiary,rgb(129,133,140))}
234
234
  .dsa-rowdot{flex:none;width:6px;height:6px;border-radius:50%;background:var(--dsw-alias-label-caption,rgb(129,133,140))}
235
235
  .dsa-rowdot[data-status=running]{background:var(--dsw-alias-state-success-primary,#22c55e)}
236
+ .dsa-rowdot[data-status=waiting]{background:var(--dsw-alias-state-warning-primary,#ffc140)}
236
237
  .dsa-rowdot[data-status=stopped]{background:var(--dsw-alias-state-warn-primary,#f59e0b)}
237
238
  .dsa-rail-head{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 8px;font-size:13px;line-height:20px;color:var(--dsw-alias-label-tertiary,rgb(129,133,140))}
238
239
  .dsa-rail-list{display:flex;flex:1;flex-direction:column;gap:2px;min-height:0;overflow-y:auto;margin-bottom:8px}
@@ -852,16 +853,21 @@ window.__ModuleLoader__.load({
852
853
  h('div', { className: 'dsa-rail-list' },
853
854
  runs.length === 0
854
855
  ? h('div', { className: 'dsa-hint', style: { padding: '8px' } }, '超级智能体还没有调度新的会话')
855
- : runs.map(run => tipped(run.goal ?? '', h('button', {
856
- key: run.id,
857
- type: 'button',
858
- className: 'dsa-rowitem',
859
- title: '查看任务详情',
860
- onClick: () => props.onOpen?.(run.id),
861
- },
862
- h('span', { className: 'dsa-rowdot', 'data-status': run.status }),
863
- h('span', { className: 'dsa-rowtitle' }, run.goal ?? '调度中的会话'),
864
- h('span', { className: 'dsa-rowtime' }, run.status === 'running' ? '运行中' : run.status === 'completed' ? '完成' : '已停')), 'left', run.id))))
856
+ : runs.map(run => {
857
+ // A run with an unanswered attention item is waiting on the user,
858
+ // not running: show that as its own amber state.
859
+ const waiting = Array.isArray(run.attention) && run.attention.length > 0
860
+ return tipped(run.goal ?? '', h('button', {
861
+ key: run.id,
862
+ type: 'button',
863
+ className: 'dsa-rowitem',
864
+ title: '查看任务详情',
865
+ onClick: () => props.onOpen?.(run.id),
866
+ },
867
+ h('span', { className: 'dsa-rowdot', 'data-status': waiting ? 'waiting' : run.status }),
868
+ h('span', { className: 'dsa-rowtitle' }, run.goal ?? '调度中的会话'),
869
+ h('span', { className: 'dsa-rowtime' }, waiting ? '等你决定' : run.status === 'running' ? '运行中' : run.status === 'completed' ? '完成' : '已停')), 'left', run.id)
870
+ })))
865
871
  }
866
872
 
867
873
  /** Artifacts are whatever the run report links to, same rule as the console page. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiangyixie/dsh-superagent",
3
- "version": "0.18.1",
3
+ "version": "0.18.2",
4
4
  "description": "长周期自主执行插件:一个目标拆成可并行的子任务,交付一份合并报告,重启后仍可继续。",
5
5
  "author": "Admire (LittleChenLiya)",
6
6
  "type": "module",