@suifei/dsh-ai-team 0.4.131 → 0.4.132

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,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.132 - 2026-11-18
4
+
5
+ **弹窗与人员池排版:按钮固定在右上角、成员资料分页签、团队成员卡片、组队三栏、批量配置模型**
6
+
7
+ - **所有弹窗**:标题栏固定在顶部,功能按钮放在右上角;内容再长也不用滚到底找按钮。人才市场、新建人才、组队这些嵌在弹窗里的页也把按钮交给标题栏。
8
+ - **成员资料**:仿系统设置分「资料 / 模型 / 技能 / 协作」四个页签;模型页按三列排(运行配方、Max tokens / 提供商、模型、推理等级);
9
+ 备忘放进可滚动的框,不再把整段长文铺满。右上角按钮按用途分组并用图标和颜色区分:去看(任务、对话)、复用(复制成员、存为人才,蓝)、
10
+ 会话维护(重试、重置会话、重新蒸馏,黄)、离开团队(红)、取消 / 保存。
11
+ - **新建项目**:左边填表,右边展示所选团队每位成员的卡片(名字、岗位、职责、简介、技能,负责人标出)。`/api/teams` 的成员多带 `description` / `category` / `skills`。
12
+ - **组队**:三栏——左边人才列表(搜索、点选,双击直接加入),中间是选中人才的简介卡片与「加入」,右边是已组的成员(改名、定负责人、移除)。
13
+ - **人员池**:改成成员卡片;顶部「批量配置模型」一次给勾选的多位成员(在其所在的全部项目)设同一模型,卡片上的「配置模型」只勾这一位,
14
+ 走同一个弹窗(提供商 / 模型 / 推理等级三列 + 成员勾选);成员资料里的单独设置照旧。页头说明不再误写「还没有成员」。
15
+ - **人才卡片**:标签一行、按钮一行靠右,不再挤成两行;在线库状态与同步结果并到一行。
16
+ - 测试:`test/catalog.test.js` 补团队成员卡片字段;全量 428。实机截图核对(无头 Edge + CDP,`r52`)。
17
+
3
18
  ## 0.4.131 - 2026-11-18
4
19
 
5
20
  **在线人才库走 npmmirror 整包;内容型弹窗放大到 90%,补单色图标**
package/client.js CHANGED
@@ -308,6 +308,9 @@ window.__ModuleLoader__.load({
308
308
  talentLoadFailed: '人才市场读取失败:{error}',
309
309
  talentSkills: '技能:{skills}',
310
310
  talentUser: '自建',
311
+ profileTabBasic: '资料', profileTabModel: '模型', profileTabSkills: '技能', profileTabCollab: '协作', profileNotes: '备忘',
312
+ teamPickDetail: '人才简介', teamPickDetailEmpty: '在左边点一位人才,这里看简介;点「加入」放进右边的团队。', teamLeadMark: '负责人', projectTeamMembers: '团队成员 · {n} 位',
313
+ peopleModelBatch: '批量配置模型', peopleModelTitle: '配置模型', peopleModelHint: '选中的成员在其所在的全部项目里改用这个模型;之后仍可在成员资料里单独改。', peopleModelPick: '应用到 {n} 位', peopleModelAll: '全选', peopleModelNone: '全不选', peopleModelApply: '应用', peopleModelNeed: '先选模型', peopleModelDone: '已为 {people} 位成员配置 {model}(成功 {done} 处,失败 {failed} 处)。',
311
314
  talentOfficial: '在线', catalogNone: '在线人才库:未同步(当前用插件内置)', catalogAt: '在线人才库:v{version} · {time} 同步', catalogSync: '同步在线库', catalogSyncing: '同步中…', catalogSyncHint: '从官方在线人才库(npmmirror / jsDelivr)取最新的人才与团队;逐文件校验,失败不影响现有的。你自建或改过的人才不受影响。', catalogUpdated: '已同步到 v{version}({files} 个文件)。', catalogLatest: '已是最新 v{version}。', catalogFailed: '同步失败:{error}', catalogClear: '退回内置', catalogClearConfirm: '删掉本机的在线人才库,退回插件内置版本?你自建或改过的人才不受影响。',
312
315
  talentFork: '复制为可编辑', talentForkHint: '把这位内置人才复制成你自己的副本(同名遮盖内置),之后可装技能、进化技能;已招的成员下次激活就用副本。', talentForked: '已改', talentRestore: '恢复内置', talentRestoreConfirm: '删掉「{name}」的可编辑副本,恢复内置版?副本里装的、进化过的技能都会丢弃。', skillEvolve: '进化', skillEvolveHint: '让这位成员用 SkillOpt 优化这份技能:诊断最弱一维、改写、评审官盲评,好就保留,不好回退。', skillEvolveSent: '已私信 {name} 进化技能「{skill}」。', skillEvolveForked: '内置人才「{talent}」已复制为可编辑副本,并已私信 {name} 进化技能「{skill}」。', skillEvolveFailed: '技能进化没发出去:{error}',
313
316
  talentHint: '挑一位人才预填表单,改名、换模型后再招进项目;自建人才放在 ~/.dsh/ai-team/catalog/user/talents/。',
@@ -408,6 +411,7 @@ window.__ModuleLoader__.load({
408
411
  people: '人员',
409
412
  peopleTitle: '人员池',
410
413
  peopleEmpty: '还没有成员;先在项目里添加。',
414
+ peopleGoal: '按人汇总各项目里的成员:看负载、配置模型、跳到所在项目。',
411
415
  peopleProjects: '{n} 个项目',
412
416
  refresh: '刷新',
413
417
  peopleActiveTasks: '{n} 个活跃任务',
@@ -428,9 +432,7 @@ window.__ModuleLoader__.load({
428
432
  teamBusyN: '在做 ×{n}',
429
433
  pendingAcceptanceN: '待验收 ×{n}',
430
434
  archivedCount: '已归档 {n}',
431
- personModelBtn: '统一配置模型',
432
- personModelTitle: '为「{name}」选择 LLM 端点(应用到其所有项目)',
433
- personModelDone: '已把「{name}」配置为 {model}(成功 {done} 处,失败 {failed} 处)。',
435
+ personModelBtn: '配置模型',
434
436
  modelCatalogEmpty: '模型目录为空:请先在 DSH 设置里配置可用的 LLM 端点。',
435
437
  q1Title: '需要你',
436
438
  q2Title: '团队在做',
@@ -760,6 +762,9 @@ window.__ModuleLoader__.load({
760
762
  talentLoadFailed: 'Could not load the talent market: {error}',
761
763
  talentSkills: 'Skills: {skills}',
762
764
  talentUser: 'Custom',
765
+ profileTabBasic: 'Profile', profileTabModel: 'Model', profileTabSkills: 'Skills', profileTabCollab: 'Collaboration', profileNotes: 'Notes',
766
+ teamPickDetail: 'Talent details', teamPickDetailEmpty: 'Pick a talent on the left to see its details; “Add” puts it into the team on the right.', teamLeadMark: 'Lead', projectTeamMembers: 'Team members · {n}',
767
+ peopleModelBatch: 'Set model for many', peopleModelTitle: 'Set model', peopleModelHint: 'The selected members switch to this model in every project they are in; each can still be changed in its profile.', peopleModelPick: 'Apply to {n}', peopleModelAll: 'All', peopleModelNone: 'None', peopleModelApply: 'Apply', peopleModelNeed: 'Pick a model first', peopleModelDone: 'Set {model} for {people} members ({done} ok, {failed} failed).',
763
768
  talentOfficial: 'Online', catalogNone: 'Online catalog: not synced (using the built-in one)', catalogAt: 'Online catalog: v{version} · synced {time}', catalogSync: 'Sync online catalog', catalogSyncing: 'Syncing…', catalogSyncHint: 'Fetch the latest talents and teams from the official online catalog (npmmirror / jsDelivr); every file is verified, and a failed sync leaves the current one untouched. Your own and edited talents are not affected.', catalogUpdated: 'Synced to v{version} ({files} files).', catalogLatest: 'Already up to date (v{version}).', catalogFailed: 'Sync failed: {error}', catalogClear: 'Use built-in', catalogClearConfirm: 'Delete the local online catalog and go back to the built-in one? Your own and edited talents are not affected.',
764
769
  talentFork: 'Make editable', talentForkHint: 'Copy this built-in talent into your own copy (same id, shadows the built-in) so you can install and evolve its skills; hired members use the copy on their next activation.', talentForked: 'Edited', talentRestore: 'Restore built-in', talentRestoreConfirm: 'Delete your editable copy of “{name}” and restore the built-in? Skills installed or evolved in the copy are discarded.', skillEvolve: 'Evolve', skillEvolveHint: 'Have this member optimize the skill with SkillOpt: diagnose the weakest dimension, rewrite, blind review by the reviewer; kept if better, reverted if not.', skillEvolveSent: 'Asked {name} to evolve the skill “{skill}”.', skillEvolveForked: 'Built-in talent “{talent}” was copied into an editable copy, and {name} was asked to evolve the skill “{skill}”.', skillEvolveFailed: 'Could not start skill evolution: {error}',
765
770
  talentHint: 'Pick a talent to prefill the form, rename it or change the model, then hire. Your own talents live in ~/.dsh/ai-team/catalog/user/talents/.',
@@ -860,6 +865,7 @@ window.__ModuleLoader__.load({
860
865
  people: 'People',
861
866
  peopleTitle: 'People',
862
867
  peopleEmpty: 'No members yet; add them in a project.',
868
+ peopleGoal: 'Members across projects, grouped by person: load, model and a jump to each project.',
863
869
  peopleProjects: '{n} project(s)',
864
870
  refresh: 'Refresh',
865
871
  peopleActiveTasks: '{n} active task(s)',
@@ -881,8 +887,6 @@ window.__ModuleLoader__.load({
881
887
  pendingAcceptanceN: 'awaiting acceptance ×{n}',
882
888
  archivedCount: 'Archived {n}',
883
889
  personModelBtn: 'Set model',
884
- personModelTitle: 'Choose the LLM endpoint for "{name}" (applies to all its projects)',
885
- personModelDone: 'Set "{name}" to {model} ({done} ok, {failed} failed).',
886
890
  modelCatalogEmpty: 'The model catalog is empty: configure an LLM endpoint in DSH settings first.',
887
891
  q1Title: 'Needs you',
888
892
  q2Title: 'Team is doing',
@@ -1398,7 +1402,42 @@ window.__ModuleLoader__.load({
1398
1402
  /* 内容型弹窗(添加成员 / 人才市场、成员资料、新建项目、组队):插件页面的 90% 宽高;确认框等小弹窗保持紧凑。 */
1399
1403
  .at-modalback:has(> .at-modal-wide) { padding: 0; }
1400
1404
  .at-modal.at-modal-wide { width: 90%; height: 90%; max-height: 90%; }
1401
- .at-modal-wide > .at-modalactions:last-child { margin-top: auto; }
1405
+ /* 所有弹窗:标题栏固定在顶部,功能按钮在右上角;内容再长也不用滚到底找按钮。 */
1406
+ .at-modal { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; column-gap: 12px; row-gap: 10px; padding-top: 0; }
1407
+ .at-modal > * { grid-column: 1 / -1; min-width: 0; }
1408
+ .at-modal > .at-addtabs { justify-self: start; }
1409
+ .at-modal > .at-modaltitle { grid-column: 1; grid-row: 1; position: sticky; top: 0; z-index: 3; align-self: stretch; margin: 0; padding: 14px 0 10px; background: var(--dsw-alias-bg-layer-2); border-bottom: 1px solid var(--dsw-alias-border-l1); }
1410
+ .at-modal > .at-modalactions { grid-column: 2; grid-row: 1; position: sticky; top: 0; z-index: 3; align-self: stretch; align-items: center; margin: 0; padding: 8px 0; background: var(--dsw-alias-bg-layer-2); border-bottom: 1px solid var(--dsw-alias-border-l1); }
1411
+ .at-actsep { width: 1px; align-self: stretch; margin: 6px 2px; background: var(--dsw-alias-border-l2); }
1412
+ .at-btn-danger { color: var(--dsw-alias-state-error-primary); border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary) 45%, transparent); }
1413
+ .at-btn-danger:hover { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent); }
1414
+ .at-btn-warn { color: var(--dsw-alias-state-warn-primary); border-color: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 45%, transparent); }
1415
+ .at-btn-warn:hover { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 10%, transparent); }
1416
+ .at-btn-accent { color: var(--dsw-alias-state-business-primary); border-color: color-mix(in srgb, var(--dsw-alias-state-business-primary) 45%, transparent); }
1417
+ .at-btn-accent:hover { background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 10%, transparent); }
1418
+ .at-fieldgrid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
1419
+ .at-fieldgrid3 .at-modelfields, .at-fieldgrid3 .at-modelfields > .at-fieldrow { display: contents; }
1420
+ .at-fieldgrid3 .at-modelfields > :not(.at-fieldrow) { grid-column: 1 / -1; }
1421
+ .at-notesbox { max-height: 200px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--dsw-alias-border-l1); border-radius: 8px; background: var(--dsw-alias-bg-base); color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
1422
+ .at-split { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.7fr); gap: 16px; align-items: start; }
1423
+ .at-teamcomposer { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 1.4fr) minmax(240px, 1.1fr); gap: 14px; align-items: start; }
1424
+ .at-pane { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
1425
+ .at-panetitle { color: var(--dsw-alias-label-secondary); font-size: 12px; font-weight: 600; }
1426
+ .at-panelist { display: flex; flex-direction: column; gap: 2px; max-height: 58vh; overflow-y: auto; padding: 4px; border: 1px solid var(--dsw-alias-border-l1); border-radius: 10px; }
1427
+ .at-pickrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--dsw-alias-label-primary); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
1428
+ .at-pickrow:hover { background: var(--dsw-alias-interactive-bg-hover); }
1429
+ .at-pickrow[aria-selected="true"] { background: var(--dsw-alias-button-ghost-active-fill); }
1430
+ .at-pickrow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1431
+ .at-pickrole { color: var(--dsw-alias-label-tertiary); }
1432
+ .at-peoplegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin: 0 12px 12px; }
1433
+ .at-pcard { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border: 1px solid var(--dsw-alias-border-l1); border-radius: 10px; background: var(--dsw-alias-bg-layer-1); }
1434
+ .at-pcard.at-people-failed { border-color: var(--dsw-alias-state-error-primary); }
1435
+ .at-streamwide { max-width: none; }
1436
+ .at-pcard .at-peoplebadges { margin-left: 0; }
1437
+ .at-pcardhead { display: flex; align-items: center; gap: 8px; min-width: 0; }
1438
+ .at-pcardfoot { display: flex; justify-content: flex-end; gap: 6px; margin-top: auto; }
1439
+ .at-peoplecheck { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
1440
+ @media (max-width: 900px) { .at-split, .at-teamcomposer, .at-fieldgrid3 { grid-template-columns: minmax(0, 1fr); } }
1402
1441
  .at-addtabs { align-self: flex-start; }
1403
1442
  .at-tcskills { display: flex; flex-wrap: wrap; gap: 6px; }
1404
1443
  .at-tcskill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(127,127,127,0.15); font-size: 12px; }
@@ -1413,7 +1452,6 @@ window.__ModuleLoader__.load({
1413
1452
  .at-teampickrow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1414
1453
  .at-market { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
1415
1454
  .at-catalogstate { display: inline-flex; align-items: center; gap: 5px; }
1416
- .at-catalogbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
1417
1455
  .at-marketsearch { width: 100%; padding: 6px 8px; 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; }
1418
1456
  .at-marketcats { display: flex; flex-wrap: wrap; gap: 4px; }
1419
1457
  .at-marketcat { min-height: 22px; padding: 0 8px; border: 1px solid var(--dsw-alias-border-l2); border-radius: 999px; background: transparent; color: var(--dsw-alias-label-tertiary); font: inherit; font-size: 11px; cursor: pointer; }
@@ -1425,7 +1463,8 @@ window.__ModuleLoader__.load({
1425
1463
  .at-talentrole { color: var(--dsw-alias-label-secondary); font-size: 12px; }
1426
1464
  .at-talentduty { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border: 1px solid var(--dsw-alias-border-l2); border-radius: 999px; color: var(--dsw-alias-label-tertiary); font-size: 10.5px; line-height: 16px; }
1427
1465
  .at-talentdesc { color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 18px; }
1428
- .at-talentfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
1466
+ .at-talentfoot { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: auto; }
1467
+ .at-talentfoot .at-tcpick { justify-content: flex-end; flex-wrap: nowrap; margin-top: 0; }
1429
1468
  .at-modalmeta { color: var(--dsw-alias-label-tertiary); font-size: 11px; line-height: 16px; }
1430
1469
  .at-modal .at-check { display: flex; align-items: center; gap: 6px; color: var(--dsw-alias-label-secondary); font-size: 12px; }
1431
1470
  .at-modal .at-check input { accent-color: var(--dsw-alias-state-business-primary); }
@@ -1561,7 +1600,7 @@ window.__ModuleLoader__.load({
1561
1600
  if (name === 'users') return h('svg', common, h('circle', { cx: 6, cy: 5.5, r: 2.4 }), h('path', { d: 'M1.5 13.5a4.5 4.5 0 0 1 9 0' }), h('path', { d: 'M10 3.3a2.4 2.4 0 0 1 0 4.4M12 9.5a4.5 4.5 0 0 1 2.5 4' }));
1562
1601
  if (name === 'cloud') return h('svg', common, h('path', { d: 'M4.5 12.5h7a3 3 0 0 0 .4-6 4 4 0 0 0-7.7.9 2.6 2.6 0 0 0 .3 5.1Z' }));
1563
1602
  if (name === 'pen') return h('svg', common, h('path', { d: 'M10.5 3 13 5.5 6 12.5H3.5V10Z' }), h('path', { d: 'M9 4.5 11.5 7' }));
1564
- if (name === 'spark') return h('svg', common, h('path', { d: 'M8 2v3M8 11v3M2 8h3M11 8h3' }), h('path', { d: 'M8 5.5 9 7l1.5 1L9 9l-1 1.5L7 9 5.5 8 7 7Z' }));
1603
+ if (name === 'spark') return h('svg', common, h('path', { d: 'M7 2.5 8.3 6.2 12 7.5 8.3 8.8 7 12.5 5.7 8.8 2 7.5 5.7 6.2Z' }), h('path', { d: 'M12.5 10.5v3M11 12h3' }));
1565
1604
  if (name === 'store') return h('svg', common, h('path', { d: 'M2.5 6 3.5 3h9l1 3' }), h('path', { d: 'M2.5 6a1.8 1.8 0 0 0 3.7 0 1.8 1.8 0 0 0 3.6 0 1.8 1.8 0 0 0 3.7 0' }), h('path', { d: 'M3.5 8v5.5h9V8' }));
1566
1605
  if (name === 'folderPlus') return h('svg', common, h('path', { d: 'M2.5 4.5a1 1 0 0 1 1-1h3l1.5 1.5h4.5a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1Z' }), h('path', { d: 'M8 7.5v3M6.5 9h3' }));
1567
1606
  if (name === 'loop') return h('svg', { width: 18, height: 18, viewBox: '0 0 32 32', fill: 'none', 'aria-hidden': 'true', focusable: 'false' }, h('rect', { x: 2.5, y: 5.5, width: 21, height: 21, rx: 6.5, stroke: 'currentColor', strokeWidth: 2.6 }), h('circle', { cx: 23.5, cy: 16, r: 4.8, fill: 'var(--dsw-alias-state-business-primary)' }));
@@ -2089,6 +2128,41 @@ window.__ModuleLoader__.load({
2089
2128
  h('button', { className: 'at-btn at-btn-primary at-btn-small', type: 'button', disabled: !complete || busy, onClick: submit }, busy ? t('saving') : t('decisionSubmit')));
2090
2129
  }
2091
2130
 
2131
+ /**
2132
+ * 人员池「配置模型」:一次给选中的多位成员(在其所在的全部项目)设同一模型;单人入口也走这里(只勾那一位)。
2133
+ * 成员资料里的单独设置照旧保留。
2134
+ */
2135
+ function PeopleModelDialog({ t, catalog, catalogError, people, initial, onApply, onClose }) {
2136
+ const [picked, setPicked] = React.useState(() => new Set(initial));
2137
+ const [provider, setProvider] = React.useState(catalog?.defaultModel?.provider ?? '');
2138
+ const [model, setModel] = React.useState(catalog?.defaultModel?.model ?? '');
2139
+ const [effort, setEffort] = React.useState('');
2140
+ const [busy, setBusy] = React.useState(false);
2141
+ const toggle = (name) => setPicked((prev) => { const next = new Set(prev); if (next.has(name)) next.delete(name); else next.add(name); return next; });
2142
+ const apply = async () => {
2143
+ if (busy || model === '' || picked.size === 0) return;
2144
+ setBusy(true);
2145
+ try { await onApply([...picked], { provider, model, ...(effort === '' ? {} : { reasoningEffort: effort }) }); } finally { setBusy(false); }
2146
+ };
2147
+ return h(ModalBack, { onClose },
2148
+ h('div', { className: 'at-modal at-modal-wide', role: 'dialog', 'aria-modal': 'true', 'aria-label': t('peopleModelTitle') },
2149
+ h('h2', { className: 'at-modaltitle' }, withIco('layers', t('peopleModelTitle'), 16)),
2150
+ h('div', { className: 'at-modalactions' },
2151
+ h('button', { className: 'at-btn', type: 'button', onClick: onClose, disabled: busy }, withIco('close', t('cancel'))),
2152
+ h('button', { className: 'at-btn at-btn-primary', type: 'button', onClick: () => void apply(), disabled: busy || model === '' || picked.size === 0, title: model === '' ? t('peopleModelNeed') : '' }, withIco('check', busy ? t('saving') : tf(t, 'peopleModelPick', { n: picked.size })))),
2153
+ h('div', { className: 'at-modalmeta' }, t('peopleModelHint')),
2154
+ h('div', { className: 'at-fieldgrid3' },
2155
+ h(ModelFields, { t, catalog, provider, effort, onEffort: setEffort, model, onProvider: setProvider, onModel: setModel, error: catalogError })),
2156
+ h('div', { className: 'at-pane' },
2157
+ h('div', { className: 'at-tcpick' },
2158
+ h('span', { className: 'at-panetitle' }, t('peopleTitle') + ' · ' + picked.size + '/' + people.length),
2159
+ h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => setPicked(new Set(people.map((p) => p.name))) }, t('peopleModelAll')),
2160
+ h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => setPicked(new Set()) }, t('peopleModelNone'))),
2161
+ h('div', { className: 'at-peoplecheck' }, people.map((person) => h('label', { key: person.name, className: 'at-check' },
2162
+ h('input', { type: 'checkbox', checked: picked.has(person.name), onChange: () => toggle(person.name) }),
2163
+ h('span', null, person.name + (person.role ? ' · ' + person.role : ''))))))));
2164
+ }
2165
+
2092
2166
  /**
2093
2167
  * 人员池总览(全局层,11-管理视角 §2):按"人"聚合各项目身份。
2094
2168
  * 数据 = GET /ai-team/api/people(各项目账本 members/tasks 的只读聚合)。
@@ -2108,10 +2182,11 @@ window.__ModuleLoader__.load({
2108
2182
  if (!people || people.length === 0) return h('div', { className: 'at-stream', role: 'region', 'aria-label': t('peopleTitle') },
2109
2183
  h('div', { className: 'at-streaminner' }, h(EmptyState, { t, icon: 'layers', title: t('peopleTitle'), body: t('peopleEmpty') })));
2110
2184
  return h('div', { className: 'at-stream', role: 'region', 'aria-label': t('peopleTitle') },
2111
- h('div', { className: 'at-streaminner' },
2185
+ h('div', { className: 'at-streaminner at-streamwide' },
2112
2186
  h('div', { className: 'at-peoplehead' },
2113
2187
  h('span', { className: 'at-peoplecount' }, loading ? t('loading') : tf(t, 'peopleProjects', { n: people.length })),
2114
- h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: onRefresh, disabled: loading }, t('refresh'))),
2188
+ onConfigModel ? h('button', { className: 'at-btn at-btn-small at-btn-accent', type: 'button', onClick: () => onConfigModel(people.map((person) => person.name)) }, withIco('layers', t('peopleModelBatch'), 12)) : null,
2189
+ h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: onRefresh, disabled: loading }, withIco('sync', t('refresh'), 12))),
2115
2190
  onBindAlias ? h('details', { className: 'at-aliasbox' },
2116
2191
  h('summary', { className: 'at-peoplesum' }, h('span', { className: 'at-people-role' }, t('aliasTitle'))),
2117
2192
  h('div', { className: 'at-aliasrow' },
@@ -2120,37 +2195,36 @@ window.__ModuleLoader__.load({
2120
2195
  h('input', { className: 'at-decisioninput', value: aliasDraft?.target ?? '', placeholder: t('aliasTargetPlaceholder'), onChange: (event) => aliasDraft.onTarget(event.target.value) }),
2121
2196
  h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => onBindAlias(aliasDraft?.target ?? '') }, t('aliasBind'))),
2122
2197
  h('div', { className: 'at-modalmeta' }, t('aliasHint'))) : null,
2123
- people.map((person) => {
2124
- const badges = [
2125
- tf(t, 'peopleProjects', { n: person.projects.length }),
2126
- tf(t, 'peopleActiveTasks', { n: person.activeTasks }),
2127
- ];
2128
- if (person.failures > 0) badges.push(tf(t, 'peopleFailure', { n: person.failures }));
2129
- return h('details', { key: person.name, className: cx('at-people', person.failures > 0 && 'at-people-failed') },
2130
- h('summary', { className: 'at-peoplesum' },
2131
- h(Avatar, { name: person.name, human: false }),
2132
- h('span', { className: 'at-peoplename' }, person.name),
2133
- person.role ? h('span', { className: 'at-people-role' }, person.role) : null,
2134
- h('span', { className: 'at-peoplebadges' }, badges.join(' · ')),
2135
- // P2:统一配置该人在所有项目的 LLM 端点(人员池级入口,
2136
- // 免去逐项目×逐成员修改)。
2137
- onConfigModel ? h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: (event) => { event.preventDefault(); onConfigModel(person); } }, t('personModelBtn')) : null),
2138
- h('div', { className: 'at-peopleprojects' }, person.projects.map((row) => {
2139
- const failed = row.lastFailure !== undefined && row.lastFailure !== null;
2140
- const localHere = localNames.has(person.name);
2141
- return h('div', { key: row.projectId, className: 'at-peopleproject' },
2142
- h('span', { className: 'at-peopleprojectname' }, row.projectName),
2143
- row.talentPool
2144
- ? h('span', { className: 'at-peoplestate' }, t('talentPool'))
2145
- : h('span', { className: 'at-peoplestate' }, t(AGENT_STATUS[row.status] ?? 'agentIdle')),
2146
- h('span', { className: 'at-peopletasks' }, tf(t, 'peopleActiveTasks', { n: row.activeTasks })),
2147
- failed ? h('span', { className: 'at-peoplefail', title: row.lastFailure.message ?? '' }, tf(t, 'peopleFailure', { n: 1 }) + ' · ' + failureHuman(t, row.lastFailure.category)) : null,
2198
+ h('div', { className: 'at-peoplegrid' }, people.map((person) => {
2199
+ const badges = [
2200
+ tf(t, 'peopleProjects', { n: person.projects.length }),
2201
+ tf(t, 'peopleActiveTasks', { n: person.activeTasks }),
2202
+ ];
2203
+ if (person.failures > 0) badges.push(tf(t, 'peopleFailure', { n: person.failures }));
2204
+ const localHere = localNames.has(person.name);
2205
+ return h('div', { key: person.name, className: cx('at-pcard', person.failures > 0 && 'at-people-failed') },
2206
+ h('div', { className: 'at-pcardhead' },
2207
+ h(Avatar, { name: person.name, human: false }),
2208
+ h('span', { className: 'at-peoplename' }, person.name),
2209
+ person.role ? h('span', { className: 'at-people-role' }, person.role) : null),
2210
+ h('div', { className: 'at-peoplebadges' }, badges.join(' · ')),
2211
+ h('div', { className: 'at-peopleprojects' }, person.projects.map((row) => {
2212
+ const failed = row.lastFailure !== undefined && row.lastFailure !== null;
2213
+ return h('div', { key: row.projectId, className: 'at-peopleproject' },
2214
+ h('span', { className: 'at-peopleprojectname' }, row.projectName),
2215
+ row.talentPool
2216
+ ? h('span', { className: 'at-peoplestate' }, t('talentPool'))
2217
+ : h('span', { className: 'at-peoplestate' }, t(AGENT_STATUS[row.status] ?? 'agentIdle')),
2218
+ h('span', { className: 'at-peopletasks' }, tf(t, 'peopleActiveTasks', { n: row.activeTasks })),
2219
+ failed ? h('span', { className: 'at-peoplefail', title: row.lastFailure.message ?? '' }, failureHuman(t, row.lastFailure.category)) : null,
2220
+ h('button', { className: 'at-btn at-btn-small at-iconbtn', type: 'button', title: t('peopleOpenProject'), 'aria-label': t('peopleOpenProject'), onClick: () => onOpenProject(row.projectId) }, h(Ico, { name: 'chevron', size: 12 })));
2221
+ })),
2222
+ h('div', { className: 'at-pcardfoot' },
2148
2223
  // R-03 入口统一:在本项目内才能直达资料/私信(跨项目先切项目)。
2149
- localHere ? h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => onOpenPerson(person.name) }, t('memberProfileTitle')) : null,
2150
- localHere ? h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => onChatPerson(person.name) }, t('agentChat')) : null,
2151
- h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => onOpenProject(row.projectId) }, t('peopleOpenProject')));
2152
- })));
2153
- })));
2224
+ localHere ? h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => onOpenPerson(person.name) }, withIco('user', t('memberProfileTitle'), 12)) : null,
2225
+ localHere ? h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => onChatPerson(person.name) }, withIco('reply', t('agentChat'), 12)) : null,
2226
+ onConfigModel ? h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => onConfigModel([person.name]) }, withIco('layers', t('personModelBtn'), 12)) : null));
2227
+ }))));
2154
2228
  }
2155
2229
 
2156
2230
  /**
@@ -2742,18 +2816,37 @@ window.__ModuleLoader__.load({
2742
2816
  }
2743
2817
 
2744
2818
  const DUTY_LABEL = { lead: 'dutyLead', qa: 'dutyQa', executor: 'dutyExecutor' };
2819
+ /** 人才 / 团队成员的卡片正文(人才市场、组队简介、新建项目的团队成员共用一份)。 */
2820
+ function TalentInfo({ t, talent, lead, full }) {
2821
+ const badge = talent.forked ? withIco('pen', t('talentForked'), 10)
2822
+ : talent.source === 'user' ? withIco('user', t('talentUser'), 10)
2823
+ : talent.source === 'official' ? withIco('cloud', t('talentOfficial'), 10) : null;
2824
+ return [
2825
+ h('div', { key: 'head', className: 'at-talenthead' },
2826
+ h('span', { className: 'at-talentname' }, talent.name),
2827
+ talent.role ? h('span', { className: 'at-talentrole' }, talent.role) : null,
2828
+ talent.duty ? h('span', { className: 'at-talentduty' }, t(DUTY_LABEL[talent.duty])) : null,
2829
+ lead ? h('span', { className: 'at-talentduty' }, withIco('check', t('teamLeadMark'), 10)) : null,
2830
+ badge ? h('span', { className: 'at-talentduty' }, badge) : null),
2831
+ talent.description ? h('div', { key: 'desc', className: 'at-talentdesc' }, talent.description) : null,
2832
+ full && talent.personality ? h('div', { key: 'pers', className: 'at-modalmeta' }, talent.personality) : null,
2833
+ talent.skills?.length ? h('div', { key: 'skills', className: 'at-modalmeta' }, tf(t, 'talentSkills', { skills: talent.skills.join('、') })) : null,
2834
+ ];
2835
+ }
2745
2836
  /** 「添加成员」弹窗的人才市场页:分类、搜索、卡片;点「招聘」按人才预填表单。 */
2746
2837
  function TalentMarket({ t, talents, error, query, onQuery, category, onCategory, onHire, onFork, onRestore, onCancel, catalog, catalogBusy, catalogNote, onSync, onClear }) {
2747
2838
  const categories = [...new Set((talents ?? []).map((talent) => talent.category).filter(Boolean))];
2748
2839
  const shown = filterTalents(talents, query, category);
2749
- return h('div', { className: 'at-market' },
2840
+ // Fragment:按钮栏直接挂在弹窗下,由弹窗的标题栏放到右上角。
2841
+ return h(React.Fragment, null,
2842
+ h('div', { className: 'at-modalactions' },
2843
+ onSync && catalog && onClear ? h('button', { type: 'button', className: 'at-btn', disabled: catalogBusy, onClick: onClear }, withIco('undo', t('catalogClear'))) : null,
2844
+ onSync ? h('button', { type: 'button', className: 'at-btn at-btn-accent', title: t('catalogSyncHint'), disabled: catalogBusy, onClick: onSync }, withIco('sync', catalogBusy ? t('catalogSyncing') : t('catalogSync'))) : null,
2845
+ h('span', { className: 'at-actsep', 'aria-hidden': 'true' }),
2846
+ h('button', { className: 'at-btn', type: 'button', onClick: onCancel }, withIco('close', t('cancel')))),
2750
2847
  h('div', { className: 'at-modalmeta' }, t('talentHint')),
2751
- onSync ? h('div', { className: 'at-catalogbar' },
2752
- h('span', { className: 'at-modalmeta at-catalogstate' }, h(Ico, { name: 'cloud', size: 13 }), catalog ? tf(t, 'catalogAt', { version: catalog.version, time: catalog.syncedAt ? new Date(catalog.syncedAt).toLocaleString() : '' }) : t('catalogNone')),
2753
- h('span', { className: 'at-tcpick' },
2754
- catalog && onClear ? h('button', { type: 'button', className: 'at-btn at-btn-small', disabled: catalogBusy, onClick: onClear }, withIco('undo', t('catalogClear'))) : null,
2755
- h('button', { type: 'button', className: 'at-btn at-btn-small', title: t('catalogSyncHint'), disabled: catalogBusy, onClick: onSync }, withIco('sync', catalogBusy ? t('catalogSyncing') : t('catalogSync'))))) : null,
2756
- catalogNote ? h('div', { className: 'at-modalmeta', role: 'status' }, catalogNote) : null,
2848
+ onSync ? h('div', { className: 'at-modalmeta at-catalogstate', role: 'status' }, h(Ico, { name: 'cloud', size: 13 }),
2849
+ (catalog ? tf(t, 'catalogAt', { version: catalog.version, time: catalog.syncedAt ? new Date(catalog.syncedAt).toLocaleString() : '' }) : t('catalogNone')) + (catalogNote ? ' · ' + catalogNote : '')) : null,
2757
2850
  h('input', { className: 'at-marketsearch', type: 'search', value: query, placeholder: t('talentSearch'), 'aria-label': t('talentSearch'), onChange: (event) => onQuery(event.target.value), autoFocus: true }),
2758
2851
  categories.length > 1 ? h('div', { className: 'at-marketcats', role: 'group', 'aria-label': t('talentMarket') },
2759
2852
  ['', ...categories].map((name) => h('button', {
@@ -2767,21 +2860,13 @@ window.__ModuleLoader__.load({
2767
2860
  talents === null ? h('div', { className: 'at-modalmeta' }, t('talentLoading'))
2768
2861
  : shown.length === 0 ? h('div', { className: 'at-modalmeta' }, t('talentEmpty'))
2769
2862
  : h('div', { className: 'at-marketgrid', role: 'list', 'aria-label': t('talentMarket') }, shown.map((talent) => h('div', { key: talent.id, className: 'at-talent', role: 'listitem' },
2770
- h('div', { className: 'at-talenthead' },
2771
- h('span', { className: 'at-talentname' }, talent.name),
2772
- h('span', { className: 'at-talentrole' }, talent.role),
2773
- talent.duty ? h('span', { className: 'at-talentduty' }, t(DUTY_LABEL[talent.duty])) : null,
2774
- talent.forked ? h('span', { className: 'at-talentduty' }, withIco('pen', t('talentForked'), 10)) : talent.source === 'user' ? h('span', { className: 'at-talentduty' }, withIco('user', t('talentUser'), 10)) : talent.source === 'official' ? h('span', { className: 'at-talentduty' }, withIco('cloud', t('talentOfficial'), 10)) : null),
2775
- talent.description ? h('div', { className: 'at-talentdesc' }, talent.description) : null,
2776
- talent.skills?.length ? h('div', { className: 'at-modalmeta' }, tf(t, 'talentSkills', { skills: talent.skills.join('、') })) : null,
2863
+ h(TalentInfo, { t, talent }),
2777
2864
  h('div', { className: 'at-talentfoot' },
2778
2865
  h('span', { className: 'at-modalmeta' }, [talent.category, ...(talent.tags ?? [])].filter(Boolean).join(' · ')),
2779
2866
  h('span', { className: 'at-tcpick' },
2780
- talent.source !== 'user' && onFork ? h('button', { type: 'button', className: 'at-btn at-btn-small', title: t('talentForkHint'), onClick: () => onFork(talent) }, withIco('copy', t('talentFork'))) : null,
2781
- talent.forked && onRestore ? h('button', { type: 'button', className: 'at-btn at-btn-small', onClick: () => onRestore(talent) }, withIco('undo', t('talentRestore'))) : null,
2782
- h('button', { type: 'button', className: 'at-btn at-btn-primary', onClick: () => onHire(talent) }, withIco('userPlus', t('talentHire')))))))),
2783
- h('div', { className: 'at-modalactions' },
2784
- h('button', { className: 'at-btn', type: 'button', onClick: onCancel }, t('cancel'))));
2867
+ talent.source !== 'user' && onFork ? h('button', { type: 'button', className: 'at-btn at-btn-small', title: t('talentForkHint'), onClick: () => onFork(talent) }, withIco('copy', t('talentFork'), 12)) : null,
2868
+ talent.forked && onRestore ? h('button', { type: 'button', className: 'at-btn at-btn-small', onClick: () => onRestore(talent) }, withIco('undo', t('talentRestore'), 12)) : null,
2869
+ h('button', { type: 'button', className: 'at-btn at-btn-small at-btn-primary', onClick: () => onHire(talent) }, withIco('userPlus', t('talentHire'), 12))))))));
2785
2870
  }
2786
2871
  function TalentCreator({ t, initial, onSaved, onCancel }) {
2787
2872
  const seed = initial && initial.draft ? talentCreatorInit(initial) : null;
@@ -2845,17 +2930,18 @@ window.__ModuleLoader__.load({
2845
2930
  setBusy(false);
2846
2931
  }
2847
2932
  }
2848
- return h('div', { className: 'at-market' },
2933
+ return h(React.Fragment, null,
2849
2934
  h('div', { className: 'at-modalmeta' }, t('tcHint')),
2850
2935
  initial && initial.error ? h('div', { className: 'at-modalerror', role: 'alert' }, initial.error) : null,
2851
2936
  seed ? h('div', { className: 'at-modalmeta' }, tf(t, 'tcFromMember', { name: seed.sourceName })) : null,
2852
2937
  seed && seed.model ? h('div', { className: 'at-modalmeta' }, tf(t, 'tcModelKept', { model: [seed.model.provider, seed.model.model].filter(Boolean).join(' / ') })) : null,
2853
2938
  seed && seed.missing.length ? h('div', { className: 'at-modalmeta' }, tf(t, 'tcMissing', { skills: seed.missing.join('、') })) : null,
2854
- h('label', { className: 'at-field' }, h('span', null, t('tcName')), h('input', { value: form.name, onChange: set('name'), autoFocus: true })),
2855
- h('label', { className: 'at-field' }, h('span', null, t('tcRole')), h('input', { value: form.role, onChange: set('role') })),
2856
- h('label', { className: 'at-field' }, h('span', null, t('tcDuty')), h('select', { value: form.duty, onChange: set('duty') }, ['executor', 'qa', 'lead'].map((d) => h('option', { key: d, value: d }, t(DUTY_LABEL[d]))))),
2857
- h('label', { className: 'at-field' }, h('span', null, t('tcCategory')), h('input', { value: form.category, onChange: set('category') })),
2858
- h('label', { className: 'at-field' }, h('span', null, t('tcTags')), h('input', { value: form.tags, onChange: set('tags'), placeholder: t('tcTagsHint') })),
2939
+ h('div', { className: 'at-fieldgrid3' },
2940
+ h('label', { className: 'at-field' }, h('span', null, t('tcName')), h('input', { value: form.name, onChange: set('name'), autoFocus: true })),
2941
+ h('label', { className: 'at-field' }, h('span', null, t('tcRole')), h('input', { value: form.role, onChange: set('role') })),
2942
+ h('label', { className: 'at-field' }, h('span', null, t('tcDuty')), h('select', { value: form.duty, onChange: set('duty') }, ['executor', 'qa', 'lead'].map((d) => h('option', { key: d, value: d }, t(DUTY_LABEL[d]))))),
2943
+ h('label', { className: 'at-field' }, h('span', null, t('tcCategory')), h('input', { value: form.category, onChange: set('category') })),
2944
+ h('label', { className: 'at-field' }, h('span', null, t('tcTags')), h('input', { value: form.tags, onChange: set('tags'), placeholder: t('tcTagsHint') }))),
2859
2945
  h('label', { className: 'at-field' }, h('span', null, t('tcPersonality')), h('textarea', { value: form.personality, onChange: set('personality'), placeholder: t('tcPersonalityHint') })),
2860
2946
  h('div', { className: 'at-field' }, h('span', null, t('tcSkills')),
2861
2947
  pending.length === 0 ? h('div', { className: 'at-modalmeta' }, t('tcEmpty')) : h('div', { className: 'at-tcskills' }, pending.map((sk) => h('span', { key: sk.name, className: 'at-tcskill' }, sk.name, h('button', { type: 'button', 'aria-label': t('tcRemove'), onClick: () => setPending((pp) => pp.filter((x) => x.name !== sk.name)) }, '×')))),
@@ -2868,15 +2954,17 @@ window.__ModuleLoader__.load({
2868
2954
  error ? h('div', { className: 'at-modalerror', role: 'alert' }, error) : null,
2869
2955
  h('div', { className: 'at-modalactions' },
2870
2956
  h('button', { type: 'button', className: 'at-btn', onClick: onCancel }, t('cancel')),
2871
- h('button', { type: 'button', className: 'at-btn at-btn-primary', disabled: !form.name.trim() || busy, onClick: save }, busy ? t('tcSaving') : t('tcSave'))));
2957
+ h('button', { type: 'button', className: 'at-btn at-btn-primary', disabled: !form.name.trim() || busy, onClick: save }, withIco('check', busy ? t('tcSaving') : t('tcSave')))));
2872
2958
  }
2873
2959
  function TeamComposer({ t, talents, onSaved, onCancel }) {
2874
2960
  const [draft, setDraft] = React.useState({ name: '', description: '', members: [], lead: 0 });
2875
2961
  const [query, setQuery] = React.useState('');
2962
+ const [focus, setFocus] = React.useState('');
2876
2963
  const [busy, setBusy] = React.useState(false);
2877
2964
  const [error, setError] = React.useState('');
2878
- const shown = filterTalents(talents, query, '').slice(0, 40);
2965
+ const shown = filterTalents(talents, query, '');
2879
2966
  const byId = (id) => (talents || []).find((x) => x.id === id);
2967
+ const focused = byId(focus) || shown[0] || null;
2880
2968
  function add(talent) { setDraft((d) => ({ ...d, members: [...d.members, { talent: talent.id, name: '' }] })); }
2881
2969
  function remove(index) { setDraft((d) => ({ ...d, members: d.members.filter((_, i) => i !== index), lead: d.lead === index ? 0 : d.lead > index ? d.lead - 1 : d.lead })); }
2882
2970
  function rename(index, name) { setDraft((d) => ({ ...d, members: d.members.map((m, i) => (i === index ? { ...m, name } : m)) })); }
@@ -2895,28 +2983,47 @@ window.__ModuleLoader__.load({
2895
2983
  setBusy(false);
2896
2984
  }
2897
2985
  }
2898
- return h('div', { className: 'at-market' },
2986
+ // 三栏:人才列表 → 选中人才的简介(加入)→ 已组的团队(改名、定负责人、移除)。按钮在弹窗右上角。
2987
+ return h(React.Fragment, null,
2988
+ h('div', { className: 'at-modalactions' },
2989
+ h('button', { type: 'button', className: 'at-btn', onClick: onCancel }, withIco('back', t('teamBack'))),
2990
+ h('button', { type: 'button', className: 'at-btn at-btn-primary', disabled: busy || !draft.name.trim() || draft.members.length === 0, onClick: save }, withIco('check', busy ? t('saving') : t('teamSave')))),
2899
2991
  h('div', { className: 'at-modalmeta' }, t('teamComposeHint')),
2900
- h('label', { className: 'at-field' }, h('span', null, t('teamName')), h('input', { value: draft.name, onChange: (e) => setDraft({ ...draft, name: e.target.value }), autoFocus: true })),
2901
- h('label', { className: 'at-field' }, h('span', null, t('teamDesc')), h('input', { value: draft.description, onChange: (e) => setDraft({ ...draft, description: e.target.value }) })),
2902
- h('div', { className: 'at-field' }, h('span', null, t('teamMembers')),
2903
- draft.members.length === 0 ? h('div', { className: 'at-modalmeta' }, t('teamEmptyPick')) : h('div', { className: 'at-teamrows' }, draft.members.map((m, i) => {
2904
- const talent = byId(m.talent) || { name: m.talent, role: '' };
2905
- return h('div', { key: i, className: 'at-teamrow' },
2906
- h('input', { value: m.name, placeholder: talent.name, 'aria-label': t('teamName'), onChange: (e) => rename(i, e.target.value) }),
2907
- h('span', { className: 'at-modalmeta' }, talent.role),
2908
- h('label', { className: 'at-teamlead' }, h('input', { type: 'radio', name: 'team-lead', checked: draft.lead === i, onChange: () => setDraft({ ...draft, lead: i }) }), t('teamLead')),
2909
- h('button', { type: 'button', className: 'at-btn at-btn-small', 'aria-label': t('tcRemove'), onClick: () => remove(i) }, '×'));
2910
- }))),
2911
- h('div', { className: 'at-field' }, h('span', null, t('teamPick')),
2912
- h('input', { className: 'at-marketsearch', type: 'search', value: query, placeholder: t('talentSearch'), onChange: (e) => setQuery(e.target.value) }),
2913
- talents === null ? h('div', { className: 'at-modalmeta' }, t('talentLoading')) : h('div', { className: 'at-teampick' }, shown.map((talent) => h('div', { key: talent.id, className: 'at-teampickrow' },
2914
- h('span', null, talent.name + ' · ' + talent.role + (talent.source === 'user' ? ' · ' + t('talentUser') : '')),
2915
- h('button', { type: 'button', className: 'at-btn at-btn-small', onClick: () => add(talent) }, t('teamAdd')))))),
2992
+ h('div', { className: 'at-fieldrow' },
2993
+ h('label', { className: 'at-field' }, h('span', null, t('teamName')), h('input', { value: draft.name, onChange: (e) => setDraft({ ...draft, name: e.target.value }), autoFocus: true })),
2994
+ h('label', { className: 'at-field' }, h('span', null, t('teamDesc')), h('input', { value: draft.description, onChange: (e) => setDraft({ ...draft, description: e.target.value }) }))),
2916
2995
  error ? h('div', { className: 'at-modalerror', role: 'alert' }, error) : null,
2917
- h('div', { className: 'at-modalactions' },
2918
- h('button', { type: 'button', className: 'at-btn', onClick: onCancel }, t('teamBack')),
2919
- h('button', { type: 'button', className: 'at-btn at-btn-primary', disabled: busy || !draft.name.trim() || draft.members.length === 0, onClick: save }, busy ? t('saving') : t('teamSave'))));
2996
+ h('div', { className: 'at-teamcomposer' },
2997
+ h('div', { className: 'at-pane' },
2998
+ h('div', { className: 'at-panetitle' }, t('teamPick')),
2999
+ h('input', { className: 'at-marketsearch', type: 'search', value: query, placeholder: t('talentSearch'), 'aria-label': t('talentSearch'), onChange: (e) => setQuery(e.target.value) }),
3000
+ talents === null ? h('div', { className: 'at-modalmeta' }, t('talentLoading')) : h('div', { className: 'at-panelist', role: 'listbox', 'aria-label': t('teamPick') }, shown.map((talent) => h('button', {
3001
+ key: talent.id,
3002
+ type: 'button',
3003
+ role: 'option',
3004
+ className: 'at-pickrow',
3005
+ 'aria-selected': focused && focused.id === talent.id ? 'true' : 'false',
3006
+ onClick: () => setFocus(talent.id),
3007
+ onDoubleClick: () => add(talent),
3008
+ }, h('span', null, talent.name, ' ', h('span', { className: 'at-pickrole' }, talent.role)), talent.duty ? h('span', { className: 'at-pickrole' }, t(DUTY_LABEL[talent.duty])) : null)))),
3009
+ h('div', { className: 'at-pane' },
3010
+ h('div', { className: 'at-panetitle' }, t('teamPickDetail')),
3011
+ focused ? h('div', { className: 'at-talent' },
3012
+ h(TalentInfo, { t, talent: focused, full: true }),
3013
+ h('div', { className: 'at-talentfoot' },
3014
+ h('span', { className: 'at-modalmeta' }, [focused.category, ...(focused.tags ?? [])].filter(Boolean).join(' · ')),
3015
+ h('span', { className: 'at-tcpick' }, h('button', { type: 'button', className: 'at-btn at-btn-small at-btn-primary', onClick: () => add(focused) }, withIco('plus', t('teamAdd'), 12)))))
3016
+ : h('div', { className: 'at-modalmeta' }, t('teamPickDetailEmpty'))),
3017
+ h('div', { className: 'at-pane' },
3018
+ h('div', { className: 'at-panetitle' }, t('teamMembers') + ' · ' + draft.members.length),
3019
+ draft.members.length === 0 ? h('div', { className: 'at-modalmeta' }, t('teamEmptyPick')) : h('div', { className: 'at-teamrows' }, draft.members.map((m, i) => {
3020
+ const talent = byId(m.talent) || { name: m.talent, role: '' };
3021
+ return h('div', { key: i, className: 'at-teamrow' },
3022
+ h('input', { value: m.name, placeholder: talent.name, 'aria-label': t('teamName'), onChange: (e) => rename(i, e.target.value), onFocus: () => setFocus(m.talent) }),
3023
+ h('span', { className: 'at-modalmeta' }, talent.role),
3024
+ h('label', { className: 'at-teamlead' }, h('input', { type: 'radio', name: 'team-lead', checked: draft.lead === i, onChange: () => setDraft({ ...draft, lead: i }) }), t('teamLead')),
3025
+ h('button', { type: 'button', className: 'at-btn at-btn-small at-iconbtn', 'aria-label': t('tcRemove'), title: t('tcRemove'), onClick: () => remove(i) }, h(Ico, { name: 'close', size: 12 })));
3026
+ })))));
2920
3027
  }
2921
3028
  function ModelFields({ t, catalog, provider, model, effort, onEffort, onProvider, onModel, error }) {
2922
3029
  const providers = Array.isArray(catalog?.providers) ? catalog.providers.slice() : [];
@@ -3370,6 +3477,9 @@ window.__ModuleLoader__.load({
3370
3477
  const [pSkill, setPSkill] = React.useState('');
3371
3478
  const [pMessage, setPMessage] = React.useState('');
3372
3479
  const [pEvolve, setPEvolve] = React.useState('');
3480
+ const [pTab, setPTab] = React.useState('basic');
3481
+ // 人员池「配置模型」弹窗:选中的成员名(null = 关)。
3482
+ const [peopleModel, setPeopleModel] = React.useState(null);
3373
3483
  const [newOpen, setNewOpen] = React.useState(false);
3374
3484
  const [nName, setNName] = React.useState('');
3375
3485
  const [nGoal, setNGoal] = React.useState('');
@@ -3806,62 +3916,30 @@ window.__ModuleLoader__.load({
3806
3916
  loadPeople();
3807
3917
  }).catch((error) => sayRight(tf(t, 'sendFailed', { message: error?.message ?? String(error) })));
3808
3918
  }
3809
- // P2:人员池统一配置模型——对同名成员在其所有项目逐个
3810
- // member.config.update(跨项目批量,免逐项目进资料面板)。
3811
- // catalog 形状:providers[] = { id, name, models: [{ id, name }] }。
3812
- async function configPersonModel(person) {
3813
- const providers = modelCatalog?.providers ?? [];
3814
- const labels = [];
3815
- const values = [];
3816
- for (const provider of providers) {
3817
- for (const entry of provider.models ?? []) {
3818
- // 兼容历史上可能出现的字符串模型项。
3819
- const modelId = typeof entry === 'string' ? entry : entry?.id;
3820
- const modelName = typeof entry === 'string' ? entry : (entry?.name ?? entry?.id);
3821
- if (typeof modelId !== 'string' || modelId === '') continue;
3822
- labels.push(provider.name + ' / ' + modelName);
3823
- values.push({ providerId: provider.id, providerName: provider.name, model: modelId, modelName });
3824
- if (labels.length >= 60) break;
3825
- }
3826
- if (labels.length >= 60) break;
3827
- }
3828
- if (labels.length === 0) { say(t('modelCatalogEmpty')); return; }
3829
- const picked = await askPrompt(tf(t, 'personModelTitle', { name: person.name }), { options: labels });
3830
- if (picked === null) return;
3831
- // 用索引映射取值:模型显示名可能含分隔符,不能按字符串拆解。
3832
- const pickedIndex = labels.indexOf(picked);
3833
- const target = values[pickedIndex >= 0 ? pickedIndex : 0];
3834
- if (target === undefined) return;
3835
- // 该模型若支持推理等级,顺带让用户挑一档;读不到档位就保持模型默认,不阻断改模型。
3836
- let effort = '';
3837
- try {
3838
- const effortsQuery = '?provider=' + encodeURIComponent(target.providerId) + '&model=' + encodeURIComponent(target.model);
3839
- const effortsResponse = await fetch('/ai-team/api/model-efforts' + effortsQuery, { headers: { accept: 'application/json' } });
3840
- const effortsBody = await effortsResponse.json().catch(() => null);
3841
- const effortRows = Array.isArray(effortsBody?.efforts) ? effortsBody.efforts : [];
3842
- if (effortRows.length > 0) {
3843
- const effortLabels = [t('memberReasoningDefault')].concat(effortRows.map((entry) => (entry.name === entry.id ? entry.id : entry.name + ' · ' + entry.id)));
3844
- const pickedEffort = await askPrompt(tf(t, 'memberReasoningAsk', { model: target.modelName ?? target.model }), { options: effortLabels });
3845
- if (pickedEffort !== null) {
3846
- const effortIndex = effortLabels.indexOf(pickedEffort) - 1;
3847
- if (effortIndex >= 0 && effortRows[effortIndex] !== undefined) effort = effortRows[effortIndex].id;
3848
- }
3849
- }
3850
- } catch { /* 读不到档位时按模型默认走 */ }
3851
- const patch = { provider: target.providerId, model: target.model, ...(effort === '' ? {} : { reasoningEffort: effort }) };
3919
+ // P2:人员池配置模型——选中的成员在其所在的全部项目逐个 member.config.update(批量;单人也走这里)。
3920
+ // 成员资料里的单独设置保留,不受影响(以后再单独改即可)。
3921
+ function configPersonModel(names) {
3922
+ if (!Array.isArray(names) || names.length === 0) return;
3923
+ setPeopleModel(names);
3924
+ }
3925
+ async function applyPeopleModel(names, patch) {
3926
+ const chosen = new Set(names);
3852
3927
  let done = 0; let failed = 0;
3853
- for (const row of person.projects ?? []) {
3854
- const memberIds = Array.isArray(row.memberIds) ? row.memberIds : [];
3855
- for (const memberId of memberIds) {
3856
- try {
3857
- await runCommand('member.config.update', { memberId, patch, reason: 'people pool model' }, row.projectId);
3858
- done += 1;
3859
- } catch {
3860
- failed += 1;
3928
+ for (const person of peopleData ?? []) {
3929
+ if (!chosen.has(person.name)) continue;
3930
+ for (const row of person.projects ?? []) {
3931
+ for (const memberId of Array.isArray(row.memberIds) ? row.memberIds : []) {
3932
+ try {
3933
+ await runCommand('member.config.update', { memberId, patch, reason: 'people pool model' }, row.projectId);
3934
+ done += 1;
3935
+ } catch {
3936
+ failed += 1;
3937
+ }
3861
3938
  }
3862
3939
  }
3863
3940
  }
3864
- sayRight(tf(t, 'personModelDone', { name: person.name, model: target.modelName ?? target.model, done, failed }));
3941
+ setPeopleModel(null);
3942
+ sayRight(tf(t, 'peopleModelDone', { people: chosen.size, model: patch.model, done, failed }));
3865
3943
  await reloadData();
3866
3944
  loadPeople();
3867
3945
  }
@@ -4457,6 +4535,7 @@ window.__ModuleLoader__.load({
4457
4535
  function openProfile(agent) {
4458
4536
  setProfileAgent(agent);
4459
4537
  setPEvolve('');
4538
+ setPTab('basic');
4460
4539
  setPName(agent.name ?? '');
4461
4540
  setPRole(agent.role ?? '');
4462
4541
  setPPersonality(agent.personality ?? '');
@@ -4966,7 +5045,7 @@ window.__ModuleLoader__.load({
4966
5045
  const memberViewAgent = data.agents.find((agent) => agent.id === memberViewId) ?? null;
4967
5046
  const memberViewTasks = memberViewAgent === null ? [] : tasks.filter((task) => task.ownerId === memberViewAgent.id || task.assigneeId === memberViewAgent.id);
4968
5047
  const headerTitle = inPeople ? t('peopleTitle') : inInbox ? t('inboxTitle') : project ? '# ' + project.name : t('noProject');
4969
- const headerGoal = inPeople ? t('peopleEmpty') : inInbox ? t('inboxGoal') : (project?.goal ?? '');
5048
+ const headerGoal = inPeople ? t('peopleGoal') : inInbox ? t('inboxGoal') : (project?.goal ?? '');
4970
5049
  const unread = inboxUnread > 99 ? '99+' : inboxUnread;
4971
5050
 
4972
5051
  const leftProps = {
@@ -5379,31 +5458,56 @@ window.__ModuleLoader__.load({
5379
5458
  onSubmit: (event) => { event.preventDefault(); saveProfile(); },
5380
5459
  },
5381
5460
  h('h2', { className: 'at-modaltitle' }, withIco('user', tf(t, 'memberProfileTitleName', { name: profileAgent.name }), 16)),
5461
+ // 右上角按钮按用途分组:去看(任务 / 对话)· 复用(复制 / 存为人才)· 会话维护(重试 / 重置 / 重新蒸馏,黄)· 离开(红)· 取消 / 保存。
5462
+ h('div', { className: 'at-modalactions' },
5463
+ h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => { const target = profileAgent; setProfileAgent(null); openMemberView(target); } }, withIco('board', t('memberTasks'), 12)),
5464
+ h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => { const target = profileAgent; setProfileAgent(null); void openAgentChat(target); } }, withIco('reply', t('agentChat'), 12)),
5465
+ h('span', { className: 'at-actsep', 'aria-hidden': 'true' }),
5466
+ h('button', { className: 'at-btn at-btn-small at-btn-accent', type: 'button', onClick: () => { const source = profileAgent; setProfileAgent(null); openCopyAgent(source); }, disabled: pBusy }, withIco('copy', t('memberCopy'), 12)),
5467
+ h('button', { className: 'at-btn at-btn-small at-btn-accent', type: 'button', onClick: () => { const source = profileAgent; setProfileAgent(null); void openSaveAsTalent(source); }, disabled: pBusy }, withIco('store', t('memberSaveAsTalent'), 12)),
5468
+ h('span', { className: 'at-actsep', 'aria-hidden': 'true' }),
5469
+ profileAgent.status === 'failed' ? h('button', { className: 'at-btn at-btn-small at-btn-warn', type: 'button', onClick: retryProfile, disabled: pBusy }, withIco('sync', t('retry'), 12)) : null,
5470
+ profileAgent.sessionId ? h('button', { className: 'at-btn at-btn-small at-btn-warn', type: 'button', title: t('reseatConfirm'), onClick: reseatProfile, disabled: pBusy }, withIco('undo', t('reseatSession'), 12)) : null,
5471
+ h('button', { className: 'at-btn at-btn-small at-btn-warn', type: 'button', onClick: distillProfile, disabled: pBusy }, withIco('spark', t('redistill'), 12)),
5472
+ h('button', { className: 'at-btn at-btn-small at-btn-danger', type: 'button', onClick: leaveProfile, disabled: pBusy }, withIco('block', t('leaveTeam'), 12)),
5473
+ h('span', { className: 'at-actsep', 'aria-hidden': 'true' }),
5474
+ h('button', { className: 'at-btn', type: 'button', onClick: () => setProfileAgent(null), disabled: pBusy }, withIco('close', t('cancel'))),
5475
+ h('button', { className: 'at-btn at-btn-primary', type: 'submit', disabled: pBusy || !pName.trim() }, withIco('check', pBusy ? t('saving') : t('save')))),
5382
5476
  h('div', { className: 'at-modalmeta' },
5383
- tf(t, 'memberProfileMeta', {
5384
- status: t(AGENT_STATUS[profileAgent.status] ?? 'agentIdle'),
5385
- version: profileAgent.profileVersion ?? 1,
5386
- distill: profileAgent.distillVersion ?? 0,
5387
- })),
5477
+ tf(t, 'memberProfileMeta', {
5478
+ status: t(AGENT_STATUS[profileAgent.status] ?? 'agentIdle'),
5479
+ version: profileAgent.profileVersion ?? 1,
5480
+ distill: profileAgent.distillVersion ?? 0,
5481
+ })),
5388
5482
  // R-02 权限可见性:把守卫背后的运行事实亮给用户(P6 诚实边界)。
5389
5483
  h('div', { className: 'at-permbadge', title: t('permissionNote') },
5390
5484
  t('permissionBadge') + ' @ ' + (project?.workspacePath || '—')),
5391
- h('div', { className: 'at-modalmeta' }, t('permissionNote')),
5392
- profileAgent.skills?.length
5393
- ? h('div', { className: 'at-tcskills', 'aria-label': t('memberSkills') },
5394
- h('span', { className: 'at-modalmeta' }, t('memberSkills') + ':'),
5395
- profileAgent.skills.map((name) => h('span', { key: name, className: 'at-tcskill' }, name,
5396
- h('button', { type: 'button', className: 'at-btn at-btn-small', title: t('skillEvolveHint'), onClick: () => void evolveSkill(profileAgent, name) }, withIco('spark', t('skillEvolve'), 12)))))
5397
- : null,
5398
- pEvolve ? h('div', { className: 'at-modalmeta', role: 'status' }, pEvolve) : null,
5399
- profileAgent.notes?.length ? h('div', { className: 'at-modalmeta' }, t('memberNotes') + ':' + profileAgent.notes.slice(-3).join(';')) : null,
5400
- h('label', { className: 'at-field' }, h('span', null, t('memberName')),
5401
- h('input', { value: pName, onChange: (event) => setPName(event.target.value), autoFocus: true })),
5402
- h('label', { className: 'at-field' }, h('span', null, t('memberRole')),
5403
- h('input', { value: pRole, onChange: (event) => setPRole(event.target.value) })),
5404
- h('label', { className: 'at-field' }, h('span', null, t('memberPersonality')),
5405
- h('textarea', { value: pPersonality, onChange: (event) => setPPersonality(event.target.value) })),
5406
- h('div', { className: 'at-fieldrow' },
5485
+ pError ? h('div', { className: 'at-modalerror', role: 'alert' }, pError) : null,
5486
+ // 仿系统设置:按用途分页签,一页只放一类设置。
5487
+ h('div', { className: 'at-mode at-addtabs', role: 'tablist', 'aria-label': t('memberProfileTitle') },
5488
+ [['basic', 'user', 'profileTabBasic'], ['model', 'layers', 'profileTabModel'], ['skills', 'spark', 'profileTabSkills'], ['collab', 'reply', 'profileTabCollab']].map(([id, icon, key]) => h('button', {
5489
+ key: id,
5490
+ type: 'button',
5491
+ role: 'tab',
5492
+ 'aria-selected': pTab === id ? 'true' : 'false',
5493
+ 'aria-pressed': pTab === id ? 'true' : 'false',
5494
+ onClick: () => setPTab(id),
5495
+ }, withIco(icon, t(key), 12)))),
5496
+ pTab === 'basic' ? [
5497
+ h('div', { key: 'nr', className: 'at-fieldrow' },
5498
+ h('label', { className: 'at-field' }, h('span', null, t('memberName')),
5499
+ h('input', { value: pName, onChange: (event) => setPName(event.target.value), autoFocus: true })),
5500
+ h('label', { className: 'at-field' }, h('span', null, t('memberRole')),
5501
+ h('input', { value: pRole, onChange: (event) => setPRole(event.target.value) }))),
5502
+ h('label', { key: 'pers', className: 'at-field' }, h('span', null, t('memberPersonality')),
5503
+ h('textarea', { value: pPersonality, rows: 6, onChange: (event) => setPPersonality(event.target.value) })),
5504
+ h('div', { key: 'notes', className: 'at-field' }, h('span', null, t('profileNotes')),
5505
+ profileAgent.notes?.length ? h('div', { className: 'at-notesbox' }, profileAgent.notes.slice(-3).join('\n\n')) : null,
5506
+ h('div', { className: 'at-inlineadd' },
5507
+ h('input', { value: pNote, onChange: (event) => setPNote(event.target.value), placeholder: t('notePlaceholder') }),
5508
+ h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: addNote, disabled: !pNote.trim() }, withIco('plus', t('addNote'), 12)))),
5509
+ ] : null,
5510
+ pTab === 'model' ? h('div', { className: 'at-fieldgrid3' },
5407
5511
  h('label', { className: 'at-field' }, h('span', null, t('memberPreset')),
5408
5512
  h('select', { value: pPreset, onChange: (event) => setPPreset(event.target.value) },
5409
5513
  h('option', { value: 'standard' }, t('presetStandard')),
@@ -5411,54 +5515,50 @@ window.__ModuleLoader__.load({
5411
5515
  h('option', { value: 'minimal' }, t('presetMinimal')),
5412
5516
  h('option', { value: 'cordis' }, t('presetCordis')))),
5413
5517
  h('label', { className: 'at-field' }, h('span', null, t('memberMaxTokens')),
5414
- h('input', { value: pMaxTokens, onChange: (event) => setPMaxTokens(event.target.value), inputMode: 'numeric' }))),
5415
- h(ModelFields, {
5416
- t,
5417
- catalog: modelCatalog,
5418
- provider: pProvider,
5419
- effort: pEffort,
5420
- onEffort: setPEffort,
5421
- model: pModel,
5422
- onProvider: setPProvider,
5423
- onModel: setPModel,
5424
- error: modelCatalogError,
5425
- }),
5426
- h('label', { className: 'at-field' }, h('span', null, t('successor')),
5427
- h('select', {
5428
- value: pSuccessor,
5429
- onChange: (event) => setPSuccessor(event.target.value),
5430
- },
5431
- h('option', { value: '' }, t('noSuccessor')),
5432
- (data?.agents ?? []).filter((candidate) => candidate.id !== profileAgent.id && candidate.status !== 'retired')
5433
- .map((candidate) => h('option', { key: candidate.id, value: candidate.id }, candidate.name + (candidate.qa ? ' · QA' : ''))))),
5434
- h('div', { className: 'at-inlineadd' },
5435
- h('input', { value: pNote, onChange: (event) => setPNote(event.target.value), placeholder: t('notePlaceholder') }),
5436
- h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: addNote, disabled: !pNote.trim() }, t('addNote'))),
5437
- h('div', { className: 'at-inlineadd' },
5438
- h('input', { value: pSkill, onChange: (event) => setPSkill(event.target.value), placeholder: t('skillPlaceholder') }),
5439
- h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: addSkill, disabled: !pSkill.trim() }, t('addSkill'))),
5440
- h('div', { className: 'at-inlineadd' },
5441
- h('input', {
5442
- value: pMessage,
5443
- onChange: (event) => setPMessage(event.target.value),
5444
- placeholder: t('messagePlaceholder'),
5445
- }),
5446
- h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: sendMemberMessage, disabled: !pMessage.trim() }, t('sendMessage'))),
5447
- // 成员作为 DSH 子智能体管理:从「管理的子智能体」面板可直接对话;
5448
- // 此私信写入同一会话,成员下一轮回复。
5449
- h('div', { className: 'at-modalmeta' }, t('routingHint')),
5450
- pError ? h('div', { className: 'at-modalerror', role: 'alert' }, pError) : null,
5451
- h('div', { className: 'at-modalactions' },
5452
- h('button', { className: 'at-btn', type: 'button', onClick: () => setProfileAgent(null), disabled: pBusy }, t('cancel')),
5453
- h('button', { className: 'at-btn', type: 'button', onClick: () => { const target = profileAgent; setProfileAgent(null); openMemberView(target); } }, t('memberTasks')),
5454
- h('button', { className: 'at-btn', type: 'button', onClick: () => { const target = profileAgent; setProfileAgent(null); void openAgentChat(target); } }, t('agentChat')),
5455
- h('button', { className: 'at-btn', type: 'button', onClick: () => { const source = profileAgent; setProfileAgent(null); openCopyAgent(source); }, disabled: pBusy }, t('memberCopy')),
5456
- h('button', { className: 'at-btn', type: 'button', onClick: () => { const source = profileAgent; setProfileAgent(null); void openSaveAsTalent(source); }, disabled: pBusy }, t('memberSaveAsTalent')),
5457
- h('button', { className: 'at-btn', type: 'button', onClick: leaveProfile, disabled: pBusy }, t('leaveTeam')),
5458
- profileAgent.status === 'failed' ? h('button', { className: 'at-btn', type: 'button', onClick: retryProfile, disabled: pBusy }, t('retry')) : null,
5459
- profileAgent.sessionId ? h('button', { className: 'at-btn', type: 'button', title: t('reseatConfirm'), onClick: reseatProfile, disabled: pBusy }, t('reseatSession')) : null,
5460
- h('button', { className: 'at-btn', type: 'button', onClick: distillProfile, disabled: pBusy }, t('redistill')),
5461
- h('button', { className: 'at-btn at-btn-primary', type: 'submit', disabled: pBusy || !pName.trim() }, pBusy ? t('saving') : t('save'))))) : null,
5518
+ h('input', { value: pMaxTokens, onChange: (event) => setPMaxTokens(event.target.value), inputMode: 'numeric' })),
5519
+ h('span', { 'aria-hidden': 'true' }),
5520
+ h(ModelFields, {
5521
+ t,
5522
+ catalog: modelCatalog,
5523
+ provider: pProvider,
5524
+ effort: pEffort,
5525
+ onEffort: setPEffort,
5526
+ model: pModel,
5527
+ onProvider: setPProvider,
5528
+ onModel: setPModel,
5529
+ error: modelCatalogError,
5530
+ })) : null,
5531
+ pTab === 'skills' ? [
5532
+ profileAgent.skills?.length
5533
+ ? h('div', { key: 'list', className: 'at-tcskills', 'aria-label': t('memberSkills') },
5534
+ profileAgent.skills.map((name) => h('span', { key: name, className: 'at-tcskill' }, name,
5535
+ h('button', { type: 'button', className: 'at-btn at-btn-small', title: t('skillEvolveHint'), onClick: () => void evolveSkill(profileAgent, name) }, withIco('spark', t('skillEvolve'), 12)))))
5536
+ : null,
5537
+ pEvolve ? h('div', { key: 'ev', className: 'at-modalmeta', role: 'status' }, pEvolve) : null,
5538
+ h('div', { key: 'add', className: 'at-inlineadd' },
5539
+ h('input', { value: pSkill, onChange: (event) => setPSkill(event.target.value), placeholder: t('skillPlaceholder') }),
5540
+ h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: addSkill, disabled: !pSkill.trim() }, withIco('plus', t('addSkill'), 12))),
5541
+ ] : null,
5542
+ pTab === 'collab' ? [
5543
+ h('label', { key: 'succ', className: 'at-field' }, h('span', null, t('successor')),
5544
+ h('select', {
5545
+ value: pSuccessor,
5546
+ onChange: (event) => setPSuccessor(event.target.value),
5547
+ },
5548
+ h('option', { value: '' }, t('noSuccessor')),
5549
+ (data?.agents ?? []).filter((candidate) => candidate.id !== profileAgent.id && candidate.status !== 'retired')
5550
+ .map((candidate) => h('option', { key: candidate.id, value: candidate.id }, candidate.name + (candidate.qa ? ' · QA' : ''))))),
5551
+ h('div', { key: 'msg', className: 'at-inlineadd' },
5552
+ h('input', {
5553
+ value: pMessage,
5554
+ onChange: (event) => setPMessage(event.target.value),
5555
+ placeholder: t('messagePlaceholder'),
5556
+ }),
5557
+ h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: sendMemberMessage, disabled: !pMessage.trim() }, withIco('reply', t('sendMessage'), 12))),
5558
+ // 成员作为 DSH 子智能体管理:从「管理的子智能体」面板可直接对话;
5559
+ // 此私信写入同一会话,成员下一轮回复。
5560
+ h('div', { key: 'hint', className: 'at-modalmeta' }, t('routingHint')),
5561
+ ] : null)) : null,
5462
5562
  workspaceOpen ? h(ModalBack, { onClose: () => setWorkspaceOpen(false) },
5463
5563
  h('form', {
5464
5564
  className: 'at-modal',
@@ -5486,30 +5586,38 @@ window.__ModuleLoader__.load({
5486
5586
  onSubmit: (event) => { event.preventDefault(); createProject(); },
5487
5587
  },
5488
5588
  h('h2', { className: 'at-modaltitle' }, withIco('folderPlus', t('newProjectTitle'), 16)),
5489
- h('label', { className: 'at-field' }, h('span', null, t('projectName')),
5490
- h('input', { value: nName, onChange: (event) => setNName(event.target.value), autoFocus: true })),
5491
- h('label', { className: 'at-field' }, h('span', null, t('projectGoal')),
5492
- h('textarea', { value: nGoal, onChange: (event) => setNGoal(event.target.value) })),
5493
- h('label', { className: 'at-field' }, h('span', null, t('workspace')),
5494
- h('div', { className: 'at-inlineadd' },
5495
- h('input', { value: nWorkspace, onChange: (event) => setNWorkspace(event.target.value), placeholder: data?.workspaceExample ?? t('workspacePathPlaceholder') }),
5496
- h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: pickNewWorkspace }, t('workspaceChoose')))),
5497
- h('label', { className: 'at-field' }, h('span', null, t('projectTeam')),
5498
- teamList === null ? h('div', { className: 'at-modalmeta' }, t('talentLoading'))
5499
- : h('select', { value: nTeam, onChange: (event) => setNTeam(event.target.value) }, teamList.filter((entry) => !entry.broken).map((entry) => h('option', { key: entry.id, value: entry.id }, entry.name + '(' + entry.members.length + ')' + (entry.source === 'user' ? ' · ' + t('talentUser') : ''))))),
5500
- selectedTeam ? h('div', { className: 'at-modalmeta' }, (selectedTeam.description ? selectedTeam.description + ':' : '') + teamMembersLine(selectedTeam)) : null,
5501
- teamLoadError ? h('div', { className: 'at-modalerror', role: 'alert' }, teamLoadError) : null,
5502
- h('div', { className: 'at-tcpick' },
5503
- h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => { setTeamComposeOpen(true); loadTalents(); } }, t('teamCompose')),
5504
- selectedTeam && selectedTeam.source === 'user' ? h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: () => void removeTeam(selectedTeam) }, t('teamDelete')) : null),
5505
- nError ? h('div', { className: 'at-modalerror', role: 'alert' }, nError) : null,
5506
5589
  h('div', { className: 'at-modalactions' },
5507
- h('button', { className: 'at-btn', type: 'button', onClick: () => setNewOpen(false), disabled: nBusy }, t('cancel')),
5508
- h('button', { className: 'at-btn at-btn-primary', type: 'submit', disabled: nBusy || !nName.trim() || !nWorkspace.trim() }, nBusy ? t('saving') : t('projectCreate'))))) : null,
5590
+ h('button', { className: 'at-btn', type: 'button', onClick: () => setNewOpen(false), disabled: nBusy }, withIco('close', t('cancel'))),
5591
+ h('button', { className: 'at-btn at-btn-primary', type: 'submit', disabled: nBusy || !nName.trim() || !nWorkspace.trim() }, withIco('check', nBusy ? t('saving') : t('projectCreate')))),
5592
+ nError ? h('div', { className: 'at-modalerror', role: 'alert' }, nError) : null,
5593
+ h('div', { className: 'at-split' },
5594
+ h('div', { className: 'at-pane' },
5595
+ h('label', { className: 'at-field' }, h('span', null, t('projectName')),
5596
+ h('input', { value: nName, onChange: (event) => setNName(event.target.value), autoFocus: true })),
5597
+ h('label', { className: 'at-field' }, h('span', null, t('projectGoal')),
5598
+ h('textarea', { value: nGoal, rows: 5, onChange: (event) => setNGoal(event.target.value) })),
5599
+ h('label', { className: 'at-field' }, h('span', null, t('workspace')),
5600
+ h('div', { className: 'at-inlineadd' },
5601
+ h('input', { value: nWorkspace, onChange: (event) => setNWorkspace(event.target.value), placeholder: data?.workspaceExample ?? t('workspacePathPlaceholder') }),
5602
+ h('button', { className: 'at-btn at-btn-small', type: 'button', onClick: pickNewWorkspace }, withIco('folderPlus', t('workspaceChoose'), 12)))),
5603
+ h('label', { className: 'at-field' }, h('span', null, t('projectTeam')),
5604
+ teamList === null ? h('div', { className: 'at-modalmeta' }, t('talentLoading'))
5605
+ : h('select', { value: nTeam, onChange: (event) => setNTeam(event.target.value) }, teamList.filter((entry) => !entry.broken).map((entry) => h('option', { key: entry.id, value: entry.id }, entry.name + '(' + entry.members.length + ')' + (entry.source === 'user' ? ' · ' + t('talentUser') : ''))))),
5606
+ teamLoadError ? h('div', { className: 'at-modalerror', role: 'alert' }, teamLoadError) : null,
5607
+ h('div', { className: 'at-tcpick' },
5608
+ h('button', { className: 'at-btn at-btn-small at-btn-accent', type: 'button', onClick: () => { setTeamComposeOpen(true); loadTalents(); } }, withIco('users', t('teamCompose'), 12)),
5609
+ selectedTeam && selectedTeam.source === 'user' ? h('button', { className: 'at-btn at-btn-small at-btn-danger', type: 'button', onClick: () => void removeTeam(selectedTeam) }, withIco('close', t('teamDelete'), 12)) : null)),
5610
+ // 右栏:选中团队的成员卡片(名字、岗位、职责、简介、技能;负责人标出来)。
5611
+ h('div', { className: 'at-pane' },
5612
+ selectedTeam ? h('div', { className: 'at-panetitle', title: teamMembersLine(selectedTeam) }, selectedTeam.name + ' · ' + tf(t, 'projectTeamMembers', { n: selectedTeam.members.length })) : null,
5613
+ selectedTeam && selectedTeam.description ? h('div', { className: 'at-modalmeta' }, selectedTeam.description) : null,
5614
+ selectedTeam ? h('div', { className: 'at-marketgrid', role: 'list' }, selectedTeam.members.map((member) => h('div', { key: member.id, className: 'at-talent', role: 'listitem' },
5615
+ h(TalentInfo, { t, talent: member, lead: member.id === selectedTeam.lead })))) : null)))) : null,
5509
5616
  teamComposeOpen ? h(ModalBack, { onClose: () => setTeamComposeOpen(false) },
5510
5617
  h('div', { className: 'at-modal at-modal-wide', role: 'dialog', 'aria-modal': 'true', 'aria-label': t('teamComposeTitle') },
5511
5618
  h('h2', { className: 'at-modaltitle' }, withIco('users', t('teamComposeTitle'), 16)),
5512
5619
  h(TeamComposer, { t, talents, onSaved: (team) => { setTeamComposeOpen(false); void loadTeams(team && team.id); }, onCancel: () => setTeamComposeOpen(false) }))) : null,
5620
+ peopleModel ? h(PeopleModelDialog, { t, catalog: modelCatalog, catalogError: modelCatalogError, people: peopleData ?? [], initial: peopleModel, onApply: applyPeopleModel, onClose: () => setPeopleModel(null) }) : null,
5513
5621
  dialog ? h(WorkbenchDialog, { key: dialogSeqRef.current, t, dialog, onDismiss: () => setDialog(null) }) : null,
5514
5622
  shortcutsOpen ? h(ModalBack, { onClose: () => setShortcutsOpen(false) },
5515
5623
  h('div', { className: 'at-modal', role: 'dialog', 'aria-modal': 'true', 'aria-label': t('shortcutTitle') },
@@ -355,7 +355,7 @@ export function listTeams(catalog) {
355
355
  .map((entry) => {
356
356
  const members = entry.members.map((m) => {
357
357
  const t = catalog.talents.get(m.talent);
358
- return { id: m.id, talent: m.talent, name: m.name || t?.name || m.talent, role: m.role || t?.role || '', duty: m.duty ?? t?.duty ?? null, missing: t === undefined };
358
+ return { id: m.id, talent: m.talent, name: m.name || t?.name || m.talent, role: m.role || t?.role || '', duty: m.duty ?? t?.duty ?? null, description: t?.description ?? '', category: t?.category ?? '', skills: [...new Set([...(t?.skills ?? []), ...(m.skills ?? [])])], missing: t === undefined };
359
359
  });
360
360
  return { id: entry.id, source: entry.source, name: entry.name || entry.id, description: entry.description, lead: entry.lead, members, broken: members.some((m) => m.missing) };
361
361
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suifei/dsh-ai-team",
3
- "version": "0.4.131",
3
+ "version": "0.4.132",
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",