@suifei/dsh-ai-team 0.3.27 → 0.3.28

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.28 — 2026-11-10
4
+
5
+ - 收件箱决策项增加逐条「采纳」与「全部采纳建议」;建议直接填入可编辑输入框,不再手抄;
6
+ - 提交仍要求所有问题有答案,采纳后可继续修改。
7
+
3
8
  ## 0.3.27 — 2026-11-10
4
9
 
5
10
  - 主对话「任务」模式拆成标题 + 验收标准;不再把 Human 原话直接当 resultDefinition;
package/client.js CHANGED
@@ -115,6 +115,9 @@ window.__ModuleLoader__.load({
115
115
  decisionChoose: '请选择…',
116
116
  decisionAnswer: '填写你的决定',
117
117
  decisionRecommend: '推荐',
118
+ decisionAdopt: '采纳',
119
+ decisionAdoptAll: '全部采纳建议',
120
+ decisionAdoptHint: '建议可直接采纳,再按需修改',
118
121
  decisionSubmit: '提交决策',
119
122
  decisionSubmitted: '决策已提交给团队。',
120
123
  inboxEmptyAction: '看任务看板',
@@ -427,6 +430,9 @@ window.__ModuleLoader__.load({
427
430
  decisionChoose: 'Choose…',
428
431
  decisionAnswer: 'Write your decision',
429
432
  decisionRecommend: 'Recommended',
433
+ decisionAdopt: 'Adopt',
434
+ decisionAdoptAll: 'Adopt all suggestions',
435
+ decisionAdoptHint: 'Adopt a suggestion, then edit if needed',
430
436
  decisionSubmit: 'Submit decision',
431
437
  decisionSubmitted: 'Decision sent to the team.',
432
438
  inboxEmptyAction: 'Open the board',
@@ -980,6 +986,10 @@ window.__ModuleLoader__.load({
980
986
  .at-inboxoptions { display: block; color: var(--dsw-alias-label-tertiary); font-size: 11px; }
981
987
  .at-inboxrecommend { display: block; color: var(--dsw-alias-state-business-primary); font-size: 11px; }
982
988
  .at-decision { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
989
+ .at-decisionhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
990
+ .at-decisionhint { color: var(--dsw-alias-label-tertiary); font-size: 11px; }
991
+ .at-decisionrecommend { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; color: var(--dsw-alias-state-business-primary); font-size: 11px; }
992
+ .at-adopt { flex: 0 0 auto; padding: 0; border: 0; background: transparent; color: var(--dsw-alias-state-business-primary); font: inherit; font-size: 11px; cursor: pointer; text-decoration: underline; }
983
993
  .at-decisionselect, .at-decisioninput { width: 100%; margin-top: 4px; padding: 4px 6px; border: 1px solid var(--dsw-alias-border-l2); border-radius: var(--dsw-radius-sm); background: var(--dsw-alias-bg-base); color: var(--dsw-alias-label-primary); font: inherit; font-size: 12px; line-height: 18px; }
984
994
  .at-decision .at-btn { align-self: flex-start; }
985
995
  .at-inboxtitle { color: var(--dsw-alias-label-primary); font-size: 13px; line-height: 20px; }
@@ -1650,6 +1660,9 @@ window.__ModuleLoader__.load({
1650
1660
  const [answers, setAnswers] = React.useState(() => questions.map(() => ''));
1651
1661
  const [busy, setBusy] = React.useState(false);
1652
1662
  const setAnswer = (index, value) => setAnswers((prev) => prev.map((entry, i) => i === index ? value : entry));
1663
+ const recommendations = questions.map((question) => typeof question.recommendation === 'string' ? question.recommendation.trim() : '');
1664
+ const hasRecommendations = recommendations.some((value) => value !== '');
1665
+ const adoptAll = () => setAnswers((prev) => prev.map((entry, index) => recommendations[index] || entry));
1653
1666
  const complete = questions.every((question, index) => answers[index].trim() !== '');
1654
1667
  const submit = async () => {
1655
1668
  if (!complete || busy) return;
@@ -1661,6 +1674,9 @@ window.__ModuleLoader__.load({
1661
1674
  }
1662
1675
  };
1663
1676
  return h('div', { className: 'at-decision' },
1677
+ hasRecommendations ? h('div', { className: 'at-decisionhead' },
1678
+ h('span', { className: 'at-decisionhint' }, t('decisionAdoptHint')),
1679
+ h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: adoptAll }, t('decisionAdoptAll'))) : null,
1664
1680
  h('ol', { className: 'at-inboxquestions' }, questions.map((question, index) => h('li', { key: question.id ?? index },
1665
1681
  h('span', { className: 'at-inboxquestion' }, question.text),
1666
1682
  Array.isArray(question.options) && question.options.length
@@ -1668,7 +1684,9 @@ window.__ModuleLoader__.load({
1668
1684
  h('option', { value: '' }, t('decisionChoose')),
1669
1685
  question.options.map((option) => h('option', { key: option, value: option }, option)))
1670
1686
  : h('input', { className: 'at-decisioninput', value: answers[index], placeholder: question.recommendation ?? t('decisionAnswer'), onChange: (event) => setAnswer(index, event.target.value) }),
1671
- question.recommendation ? h('span', { className: 'at-inboxrecommend' }, t('decisionRecommend') + ':' + question.recommendation) : null))),
1687
+ question.recommendation ? h('div', { className: 'at-decisionrecommend' },
1688
+ h('span', null, t('decisionRecommend') + ':' + question.recommendation),
1689
+ h('button', { className: 'at-adopt', type: 'button', onClick: () => setAnswer(index, question.recommendation) }, t('decisionAdopt'))) : null))),
1672
1690
  h('button', { className: 'at-btn at-btn-primary at-btn-small', type: 'button', disabled: !complete || busy, onClick: submit }, busy ? t('saving') : t('decisionSubmit')));
1673
1691
  }
1674
1692
 
package/index.js CHANGED
@@ -34,7 +34,7 @@ export const name = 'ai-team';
34
34
  /** The workbench only makes sense where the Web carrier exists. */
35
35
  export const inject = ['webServer', 'permissionPresets', 'sandboxPolicy'];
36
36
 
37
- const VERSION = '0.3.27';
37
+ const VERSION = '0.3.28';
38
38
  const PROJECT_ID = 'prj_main';
39
39
  const HUMAN_ID = 'mem_human';
40
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suifei/dsh-ai-team",
3
- "version": "0.3.27",
3
+ "version": "0.3.28",
4
4
  "type": "module",
5
5
  "description": "文渊阁 (Wenyuan Pavilion) — AI Team mode for DeepSeek Harness: concurrent projects, owned tasks, threads, inbox and an append-only team ledger",
6
6
  "license": "MIT",