gitee-ai-employee 1.2.2 → 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.
- package/dsh/client.js +69 -23
- package/package.json +1 -1
package/dsh/client.js
CHANGED
|
@@ -43,6 +43,7 @@ window.__ModuleLoader__.load({
|
|
|
43
43
|
merge: '自动合并 PR',
|
|
44
44
|
close: '成功后自动关闭 issue',
|
|
45
45
|
status: '查看任务状态',
|
|
46
|
+
issueBlock: '处理 Issue(自动开发 · 提 PR)',
|
|
46
47
|
scan: '代码安全扫描',
|
|
47
48
|
scanEnable: '启用定时扫描(全部仓库排队持续扫描,去重幂等)',
|
|
48
49
|
scanReposLabel: '扫描仓库',
|
|
@@ -82,13 +83,48 @@ window.__ModuleLoader__.load({
|
|
|
82
83
|
},
|
|
83
84
|
h('div', { className: 'At1oFq_head' },
|
|
84
85
|
h('span', { className: 'At1oFq_label' }, label),
|
|
85
|
-
hint
|
|
86
|
-
? h('span', { className: 'At1oFq_badgeMuted', style: { fontSize: '11px', lineHeight: '17px', color: 'var(--dsw-alias-label-tertiary)' } }, hint)
|
|
87
|
-
: null,
|
|
88
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,
|
|
89
90
|
control,
|
|
90
91
|
)
|
|
91
92
|
|
|
93
|
+
// 分区标题块:色条 + 标题 + 行为标签 + 说明,
|
|
94
|
+
// 用于把「处理 Issue」与「代码安全扫描」两个功能模块清楚分隔,防止误配置/误操作。
|
|
95
|
+
var sectionBlock = (label, sub, tag, tagBg, accent, key) =>
|
|
96
|
+
h('div', {
|
|
97
|
+
key: key,
|
|
98
|
+
style: {
|
|
99
|
+
margin: '16px 0 6px',
|
|
100
|
+
padding: '10px 12px',
|
|
101
|
+
borderRadius: '10px',
|
|
102
|
+
border: '1px solid ' + accent,
|
|
103
|
+
background: 'linear-gradient(90deg, ' + accent + '1A, transparent 75%)',
|
|
104
|
+
display: 'flex', flexDirection: 'column', gap: '4px',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'wrap' } },
|
|
108
|
+
h('span', { style: { width: '6px', height: '16px', borderRadius: '3px', background: accent, display: 'inline-block' } }),
|
|
109
|
+
h('span', { style: { fontSize: '14px', fontWeight: 800, color: 'var(--dsw-alias-label-primary)' } }, label),
|
|
110
|
+
tag ? h('span', { style: { fontSize: '11px', fontWeight: 700, color: '#fff', background: tagBg, borderRadius: '999px', padding: '2px 8px' } }, tag) : null,
|
|
111
|
+
),
|
|
112
|
+
sub ? h('span', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary)', lineHeight: 1.45 } }, sub) : null,
|
|
113
|
+
)
|
|
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
|
+
|
|
92
128
|
// 自定义开关行:左侧标签,右侧紧凑的 iOS 风格 toggle
|
|
93
129
|
var toggleRow = (label, hint, checked, onChange, key) =>
|
|
94
130
|
h(
|
|
@@ -417,31 +453,36 @@ window.__ModuleLoader__.load({
|
|
|
417
453
|
)
|
|
418
454
|
} else {
|
|
419
455
|
var controls = []
|
|
420
|
-
|
|
456
|
+
// ── 分区A:处理 Issue(真实操作仓库)──
|
|
457
|
+
controls.push(sectionBlock(t.issueBlock,
|
|
458
|
+
'监听 issue:@ 机器人后自动克隆仓库开发、推分支、提 PR,可自动合并 / 自动关闭。下面这些设置会真实操作你的仓库(改代码、推送分支、合并 PR),请仔细确认。',
|
|
459
|
+
'会真实操作仓库 · 自动提 PR', '#dc2626', '#3b82f6', 'issueBlock'))
|
|
460
|
+
var issueFields = []
|
|
461
|
+
issueFields.push(fieldRow(t.token, draft.tokenConfigured ? t.tokenHint : undefined, h(Input, {
|
|
421
462
|
key: 'token',
|
|
422
463
|
type: 'password',
|
|
423
464
|
placeholder: draft.tokenConfigured ? '••••••••(留空保持原值)' : '输入 Gitee 私人令牌',
|
|
424
465
|
value: (draft.token !== undefined ? draft.token : ''),
|
|
425
466
|
onChange: (e) => setDraftFromControl({ token: e.target.value }),
|
|
426
467
|
}), 'token'))
|
|
427
|
-
|
|
468
|
+
issueFields.push(fieldRow('GitHub 令牌(可选)', '留空保持原值;用于 github: 前缀的仓库', h(Input, {
|
|
428
469
|
key: 'githubToken',
|
|
429
470
|
type: 'password',
|
|
430
471
|
placeholder: draft.githubTokenConfigured ? '••••••••(留空保持原值)' : '输入 GitHub 私人令牌(可选)',
|
|
431
472
|
value: (draft.githubToken !== undefined ? draft.githubToken : ''),
|
|
432
473
|
onChange: (e) => setDraftFromControl({ githubToken: e.target.value }),
|
|
433
474
|
}), 'githubToken'))
|
|
434
|
-
|
|
475
|
+
issueFields.push(fieldRow(t.bot, t.botHint, h(Input, {
|
|
435
476
|
key: 'bot',
|
|
436
477
|
value: draft.botName || '',
|
|
437
478
|
onChange: (e) => setDraftFromControl({ botName: e.target.value }),
|
|
438
479
|
}), 'bot'))
|
|
439
|
-
|
|
480
|
+
issueFields.push(fieldRow(t.workRoot, undefined, h(Input, {
|
|
440
481
|
key: 'workRoot',
|
|
441
482
|
value: draft.workRoot || '',
|
|
442
483
|
onChange: (e) => setDraftFromControl({ workRoot: e.target.value }),
|
|
443
484
|
}), 'workRoot'))
|
|
444
|
-
|
|
485
|
+
issueFields.push(fieldRow(t.repos, t.reposHint, h('textarea', {
|
|
445
486
|
key: 'repos',
|
|
446
487
|
rows: 3,
|
|
447
488
|
className: 'At1oFq_input',
|
|
@@ -449,27 +490,31 @@ window.__ModuleLoader__.load({
|
|
|
449
490
|
value: draft.watchRepos || '',
|
|
450
491
|
onChange: (e) => setDraftFromControl({ watchRepos: e.target.value }),
|
|
451
492
|
}), 'repos'))
|
|
452
|
-
|
|
453
|
-
|
|
493
|
+
issueFields.push(toggleRow(t.poll, undefined, draft.pollEnabled, (v) => setDraftFromControl({ pollEnabled: v }), 'poll'))
|
|
494
|
+
issueFields.push(fieldRow(t.interval, undefined, h(Input, {
|
|
454
495
|
key: 'interval',
|
|
455
496
|
type: 'number',
|
|
456
497
|
value: draft.pollIntervalMs,
|
|
457
498
|
onChange: (e) => setDraftFromControl({ pollIntervalMs: e.target.value }),
|
|
458
499
|
}), 'interval'))
|
|
459
|
-
|
|
460
|
-
|
|
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))
|
|
461
503
|
|
|
462
|
-
// ──
|
|
463
|
-
controls.push(
|
|
464
|
-
|
|
465
|
-
|
|
504
|
+
// ── 分区B:代码安全扫描(只读审计)──
|
|
505
|
+
controls.push(sectionBlock(t.scan,
|
|
506
|
+
'对「扫描仓库」里的仓库做静态安全审计(克隆到本地、按内置/自定义提示词检查),发现新漏洞去重后提交 [安全扫描] issue。全程只读审计,不会改代码、不会提 PR。',
|
|
507
|
+
'只读审计 · 只提交漏洞 issue', '#059669', '#10b981', 'scanBlock'))
|
|
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', {
|
|
466
511
|
key: 'scanRepos', rows: 3,
|
|
467
512
|
className: 'At1oFq_input',
|
|
468
513
|
style: { height: 'auto', padding: '8px 12px', resize: 'vertical', lineHeight: 1.5 },
|
|
469
514
|
value: draft.scanRepos || '',
|
|
470
515
|
onChange: (e) => setDraftFromControl({ scanRepos: e.target.value }),
|
|
471
516
|
}), 'scanRepos'))
|
|
472
|
-
|
|
517
|
+
scanFields.push(h('div', { key: 'fetchReposRow', style: { display: 'flex', gap: '8px', alignItems: 'center', padding: '4px 0', flexWrap: 'wrap' } },
|
|
473
518
|
h('button', {
|
|
474
519
|
type: 'button',
|
|
475
520
|
onClick: fetchMyRepos,
|
|
@@ -478,32 +523,32 @@ window.__ModuleLoader__.load({
|
|
|
478
523
|
}, fetchBusy ? t.scanFetching : t.scanFetch),
|
|
479
524
|
fetchNote ? h('span', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary)' } }, fetchNote) : null,
|
|
480
525
|
))
|
|
481
|
-
|
|
526
|
+
scanFields.push(fieldRow(t.scanSeverity, t.scanSeverityHint, h('select', {
|
|
482
527
|
key: 'scanSeverity',
|
|
483
528
|
className: 'At1oFq_input',
|
|
484
529
|
style: { padding: '8px 12px' },
|
|
485
530
|
value: draft.scanMinSeverity || 'medium',
|
|
486
531
|
onChange: (e) => setDraftFromControl({ scanMinSeverity: e.target.value }),
|
|
487
532
|
}, ['critical', 'high', 'medium', 'low', 'none'].map((s) => h('option', { key: s, value: s }, s))), 'scanSeverity'))
|
|
488
|
-
|
|
489
|
-
|
|
533
|
+
scanFields.push(toggleRow(t.scanOneIssue, undefined, draft.scanOneIssuePerRun, (v) => setDraftFromControl({ scanOneIssuePerRun: v }), 'scanOneIssue'))
|
|
534
|
+
scanFields.push(fieldRow(t.scanConcurrency, undefined, h(Input, {
|
|
490
535
|
key: 'scanConcurrency', type: 'number', min: 1, max: 8,
|
|
491
536
|
value: draft.scanConcurrency,
|
|
492
537
|
onChange: (e) => setDraftFromControl({ scanConcurrency: e.target.value }),
|
|
493
538
|
}), 'scanConcurrency'))
|
|
494
|
-
|
|
539
|
+
scanFields.push(fieldRow(t.scanPromptsLabel, t.scanPromptsHint, h('textarea', {
|
|
495
540
|
key: 'scanPrompts', rows: 4,
|
|
496
541
|
className: 'At1oFq_input',
|
|
497
542
|
style: { height: 'auto', padding: '8px 12px', resize: 'vertical', lineHeight: 1.4, fontFamily: 'Consolas,monospace', fontSize: '11px' },
|
|
498
543
|
value: draft.scanPrompts || '',
|
|
499
544
|
onChange: (e) => setDraftFromControl({ scanPrompts: e.target.value }),
|
|
500
545
|
}), 'scanPrompts'))
|
|
501
|
-
|
|
546
|
+
scanFields.push(fieldRow(t.scanInterval, undefined, h(Input, {
|
|
502
547
|
key: 'scanInterval', type: 'number',
|
|
503
548
|
value: draft.scanIntervalMs,
|
|
504
549
|
onChange: (e) => setDraftFromControl({ scanIntervalMs: e.target.value }),
|
|
505
550
|
}), 'scanInterval'))
|
|
506
|
-
|
|
551
|
+
scanFields.push(h('div', { key: 'scanNowRow', style: { display: 'flex', gap: '8px', alignItems: 'center', padding: '8px 0', flexWrap: 'wrap' } },
|
|
507
552
|
h('button', {
|
|
508
553
|
type: 'button',
|
|
509
554
|
onClick: scanNow,
|
|
@@ -512,6 +557,7 @@ window.__ModuleLoader__.load({
|
|
|
512
557
|
}, scanBusy ? t.scanning : t.scanNow),
|
|
513
558
|
scanNote ? h('span', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary)' } }, scanNote) : null,
|
|
514
559
|
))
|
|
560
|
+
controls.push(innerCard('scanCard', '#10b981', scanFields))
|
|
515
561
|
|
|
516
562
|
body = h(
|
|
517
563
|
'div',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gitee-ai-employee",
|
|
3
|
-
"version": "1.2.
|
|
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",
|