gitee-ai-employee 1.2.3 → 1.2.4

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/dsh/client.js +38 -21
  2. package/package.json +1 -1
package/dsh/client.js CHANGED
@@ -83,10 +83,10 @@ window.__ModuleLoader__.load({
83
83
  },
84
84
  h('div', { className: 'At1oFq_head' },
85
85
  h('span', { className: 'At1oFq_label' }, label),
86
- hint
87
- ? h('span', { className: 'At1oFq_badgeMuted', style: { fontSize: '11px', lineHeight: '17px', color: 'var(--dsw-alias-label-tertiary)' } }, hint)
88
- : null,
89
86
  ),
87
+ hint
88
+ ? h('div', { style: { fontSize: '12px', lineHeight: '17px', color: 'var(--dsw-alias-label-tertiary)', display: 'block', whiteSpace: 'normal', overflow: 'visible', textOverflow: 'clip' } }, hint)
89
+ : null,
90
90
  control,
91
91
  )
92
92
 
@@ -112,6 +112,19 @@ window.__ModuleLoader__.load({
112
112
  sub ? h('span', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary)', lineHeight: 1.45 } }, sub) : null,
113
113
  )
114
114
 
115
+ // 分区内层卡片:把某一模块的全部字段包进带浅色描边的容器,与另一模块形成视觉隔离。
116
+ var innerCard = (key, accent, children) =>
117
+ h('div', {
118
+ key: key,
119
+ style: {
120
+ border: '1px solid ' + accent + '59',
121
+ borderRadius: '10px',
122
+ padding: '2px 14px 6px',
123
+ margin: '2px 0 2px',
124
+ background: accent + '0D',
125
+ },
126
+ }, children)
127
+
115
128
  // 自定义开关行:左侧标签,右侧紧凑的 iOS 风格 toggle
116
129
  var toggleRow = (label, hint, checked, onChange, key) =>
117
130
  h(
@@ -444,31 +457,32 @@ window.__ModuleLoader__.load({
444
457
  controls.push(sectionBlock(t.issueBlock,
445
458
  '监听 issue:@ 机器人后自动克隆仓库开发、推分支、提 PR,可自动合并 / 自动关闭。下面这些设置会真实操作你的仓库(改代码、推送分支、合并 PR),请仔细确认。',
446
459
  '会真实操作仓库 · 自动提 PR', '#dc2626', '#3b82f6', 'issueBlock'))
447
- controls.push(fieldRow(t.token, draft.tokenConfigured ? t.tokenHint : undefined, h(Input, {
460
+ var issueFields = []
461
+ issueFields.push(fieldRow(t.token, draft.tokenConfigured ? t.tokenHint : undefined, h(Input, {
448
462
  key: 'token',
449
463
  type: 'password',
450
464
  placeholder: draft.tokenConfigured ? '••••••••(留空保持原值)' : '输入 Gitee 私人令牌',
451
465
  value: (draft.token !== undefined ? draft.token : ''),
452
466
  onChange: (e) => setDraftFromControl({ token: e.target.value }),
453
467
  }), 'token'))
454
- controls.push(fieldRow('GitHub 令牌(可选)', '留空保持原值;用于 github: 前缀的仓库', h(Input, {
468
+ issueFields.push(fieldRow('GitHub 令牌(可选)', '留空保持原值;用于 github: 前缀的仓库', h(Input, {
455
469
  key: 'githubToken',
456
470
  type: 'password',
457
471
  placeholder: draft.githubTokenConfigured ? '••••••••(留空保持原值)' : '输入 GitHub 私人令牌(可选)',
458
472
  value: (draft.githubToken !== undefined ? draft.githubToken : ''),
459
473
  onChange: (e) => setDraftFromControl({ githubToken: e.target.value }),
460
474
  }), 'githubToken'))
461
- controls.push(fieldRow(t.bot, t.botHint, h(Input, {
475
+ issueFields.push(fieldRow(t.bot, t.botHint, h(Input, {
462
476
  key: 'bot',
463
477
  value: draft.botName || '',
464
478
  onChange: (e) => setDraftFromControl({ botName: e.target.value }),
465
479
  }), 'bot'))
466
- controls.push(fieldRow(t.workRoot, undefined, h(Input, {
480
+ issueFields.push(fieldRow(t.workRoot, undefined, h(Input, {
467
481
  key: 'workRoot',
468
482
  value: draft.workRoot || '',
469
483
  onChange: (e) => setDraftFromControl({ workRoot: e.target.value }),
470
484
  }), 'workRoot'))
471
- controls.push(fieldRow(t.repos, t.reposHint, h('textarea', {
485
+ issueFields.push(fieldRow(t.repos, t.reposHint, h('textarea', {
472
486
  key: 'repos',
473
487
  rows: 3,
474
488
  className: 'At1oFq_input',
@@ -476,29 +490,31 @@ window.__ModuleLoader__.load({
476
490
  value: draft.watchRepos || '',
477
491
  onChange: (e) => setDraftFromControl({ watchRepos: e.target.value }),
478
492
  }), 'repos'))
479
- controls.push(toggleRow(t.poll, undefined, draft.pollEnabled, (v) => setDraftFromControl({ pollEnabled: v }), 'poll'))
480
- controls.push(fieldRow(t.interval, undefined, h(Input, {
493
+ issueFields.push(toggleRow(t.poll, undefined, draft.pollEnabled, (v) => setDraftFromControl({ pollEnabled: v }), 'poll'))
494
+ issueFields.push(fieldRow(t.interval, undefined, h(Input, {
481
495
  key: 'interval',
482
496
  type: 'number',
483
497
  value: draft.pollIntervalMs,
484
498
  onChange: (e) => setDraftFromControl({ pollIntervalMs: e.target.value }),
485
499
  }), 'interval'))
486
- controls.push(toggleRow(t.merge, undefined, draft.autoMerge, (v) => setDraftFromControl({ autoMerge: v }), 'merge'))
487
- controls.push(toggleRow(t.close, undefined, draft.autoCloseIssue, (v) => setDraftFromControl({ autoCloseIssue: v }), 'close'))
500
+ issueFields.push(toggleRow(t.merge, undefined, draft.autoMerge, (v) => setDraftFromControl({ autoMerge: v }), 'merge'))
501
+ issueFields.push(toggleRow(t.close, undefined, draft.autoCloseIssue, (v) => setDraftFromControl({ autoCloseIssue: v }), 'close'))
502
+ controls.push(innerCard('issueCard', '#3b82f6', issueFields))
488
503
 
489
504
  // ── 分区B:代码安全扫描(只读审计)──
490
505
  controls.push(sectionBlock(t.scan,
491
506
  '对「扫描仓库」里的仓库做静态安全审计(克隆到本地、按内置/自定义提示词检查),发现新漏洞去重后提交 [安全扫描] issue。全程只读审计,不会改代码、不会提 PR。',
492
507
  '只读审计 · 只提交漏洞 issue', '#059669', '#10b981', 'scanBlock'))
493
- controls.push(toggleRow(t.scanEnable, undefined, draft.scanEnabled, (v) => setDraftFromControl({ scanEnabled: v }), 'scanEnable'))
494
- controls.push(fieldRow(t.scanReposLabel, t.scanReposHint, h('textarea', {
508
+ var scanFields = []
509
+ scanFields.push(toggleRow(t.scanEnable, undefined, draft.scanEnabled, (v) => setDraftFromControl({ scanEnabled: v }), 'scanEnable'))
510
+ scanFields.push(fieldRow(t.scanReposLabel, t.scanReposHint, h('textarea', {
495
511
  key: 'scanRepos', rows: 3,
496
512
  className: 'At1oFq_input',
497
513
  style: { height: 'auto', padding: '8px 12px', resize: 'vertical', lineHeight: 1.5 },
498
514
  value: draft.scanRepos || '',
499
515
  onChange: (e) => setDraftFromControl({ scanRepos: e.target.value }),
500
516
  }), 'scanRepos'))
501
- controls.push(h('div', { key: 'fetchReposRow', style: { display: 'flex', gap: '8px', alignItems: 'center', padding: '4px 0', flexWrap: 'wrap' } },
517
+ scanFields.push(h('div', { key: 'fetchReposRow', style: { display: 'flex', gap: '8px', alignItems: 'center', padding: '4px 0', flexWrap: 'wrap' } },
502
518
  h('button', {
503
519
  type: 'button',
504
520
  onClick: fetchMyRepos,
@@ -507,32 +523,32 @@ window.__ModuleLoader__.load({
507
523
  }, fetchBusy ? t.scanFetching : t.scanFetch),
508
524
  fetchNote ? h('span', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary)' } }, fetchNote) : null,
509
525
  ))
510
- controls.push(fieldRow(t.scanSeverity, t.scanSeverityHint, h('select', {
526
+ scanFields.push(fieldRow(t.scanSeverity, t.scanSeverityHint, h('select', {
511
527
  key: 'scanSeverity',
512
528
  className: 'At1oFq_input',
513
529
  style: { padding: '8px 12px' },
514
530
  value: draft.scanMinSeverity || 'medium',
515
531
  onChange: (e) => setDraftFromControl({ scanMinSeverity: e.target.value }),
516
532
  }, ['critical', 'high', 'medium', 'low', 'none'].map((s) => h('option', { key: s, value: s }, s))), 'scanSeverity'))
517
- controls.push(toggleRow(t.scanOneIssue, undefined, draft.scanOneIssuePerRun, (v) => setDraftFromControl({ scanOneIssuePerRun: v }), 'scanOneIssue'))
518
- controls.push(fieldRow(t.scanConcurrency, undefined, h(Input, {
533
+ scanFields.push(toggleRow(t.scanOneIssue, undefined, draft.scanOneIssuePerRun, (v) => setDraftFromControl({ scanOneIssuePerRun: v }), 'scanOneIssue'))
534
+ scanFields.push(fieldRow(t.scanConcurrency, undefined, h(Input, {
519
535
  key: 'scanConcurrency', type: 'number', min: 1, max: 8,
520
536
  value: draft.scanConcurrency,
521
537
  onChange: (e) => setDraftFromControl({ scanConcurrency: e.target.value }),
522
538
  }), 'scanConcurrency'))
523
- controls.push(fieldRow(t.scanPromptsLabel, t.scanPromptsHint, h('textarea', {
539
+ scanFields.push(fieldRow(t.scanPromptsLabel, t.scanPromptsHint, h('textarea', {
524
540
  key: 'scanPrompts', rows: 4,
525
541
  className: 'At1oFq_input',
526
542
  style: { height: 'auto', padding: '8px 12px', resize: 'vertical', lineHeight: 1.4, fontFamily: 'Consolas,monospace', fontSize: '11px' },
527
543
  value: draft.scanPrompts || '',
528
544
  onChange: (e) => setDraftFromControl({ scanPrompts: e.target.value }),
529
545
  }), 'scanPrompts'))
530
- controls.push(fieldRow(t.scanInterval, undefined, h(Input, {
546
+ scanFields.push(fieldRow(t.scanInterval, undefined, h(Input, {
531
547
  key: 'scanInterval', type: 'number',
532
548
  value: draft.scanIntervalMs,
533
549
  onChange: (e) => setDraftFromControl({ scanIntervalMs: e.target.value }),
534
550
  }), 'scanInterval'))
535
- controls.push(h('div', { key: 'scanNowRow', style: { display: 'flex', gap: '8px', alignItems: 'center', padding: '8px 0', flexWrap: 'wrap' } },
551
+ scanFields.push(h('div', { key: 'scanNowRow', style: { display: 'flex', gap: '8px', alignItems: 'center', padding: '8px 0', flexWrap: 'wrap' } },
536
552
  h('button', {
537
553
  type: 'button',
538
554
  onClick: scanNow,
@@ -541,6 +557,7 @@ window.__ModuleLoader__.load({
541
557
  }, scanBusy ? t.scanning : t.scanNow),
542
558
  scanNote ? h('span', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary)' } }, scanNote) : null,
543
559
  ))
560
+ controls.push(innerCard('scanCard', '#10b981', scanFields))
544
561
 
545
562
  body = h(
546
563
  'div',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitee-ai-employee",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Gitee/GitHub AI 员工:issue 里 @ 机器人自动开发并提 PR;v1.2 新增代码安全扫描——配置仓库地址后按内置/自定义提示词扫描漏洞,去重后提交 issue。An issue-driven AI developer for DeepSeek Harness (Gitee & GitHub) with optional static security scanning (dedup + issue reporting).",
5
5
  "license": "MIT",
6
6
  "type": "module",