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