dsh-github-flow 0.6.0 → 0.7.1
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/README.en.md +102 -15
- package/README.md +105 -15
- package/docs/UPGRADE-NOTES.md +12 -11
- package/docs/architecture.md +67 -14
- package/lib/api/route-helpers.d.ts +19 -0
- package/lib/api/route-helpers.js +54 -0
- package/lib/api/routes-actions.js +126 -2
- package/lib/api/routes-lifecycle.js +8 -1
- package/lib/api/routes-overview.d.ts +26 -0
- package/lib/api/routes-overview.js +276 -34
- package/lib/api/routes-proxy.js +8 -1
- package/lib/api/routes.d.ts +11 -1
- package/lib/api/routes.js +15 -2
- package/lib/cache.d.ts +0 -21
- package/lib/cache.js +0 -37
- package/lib/client.d.ts +2 -1
- package/lib/client.js +2108 -658
- package/lib/destructive.d.ts +59 -0
- package/lib/destructive.js +285 -0
- package/lib/executor/args-guard.d.ts +17 -0
- package/lib/executor/args-guard.js +23 -0
- package/lib/executor/failure-anchors.d.ts +52 -0
- package/lib/executor/failure-anchors.js +116 -0
- package/lib/executor/pr-review.d.ts +95 -0
- package/lib/executor/pr-review.js +175 -0
- package/lib/executor/run-log.d.ts +36 -0
- package/lib/executor/run-log.js +78 -0
- package/lib/executor.d.ts +204 -3
- package/lib/executor.js +670 -28
- package/lib/github-service.d.ts +1 -1
- package/lib/main.d.ts +92 -18
- package/lib/main.js +186 -95
- package/lib/renderers/common.d.ts +0 -3
- package/lib/renderers/common.js +8 -44
- package/lib/renderers/markdown.d.ts +1 -0
- package/lib/renderers/markdown.js +1 -0
- package/lib/renderers/pr.js +26 -1
- package/lib/renderers/task.d.ts +9 -0
- package/lib/renderers/task.js +120 -0
- package/lib/review-rules.d.ts +60 -0
- package/lib/review-rules.js +204 -0
- package/lib/shared/state-badges.d.ts +42 -0
- package/lib/shared/state-badges.js +102 -0
- package/lib/task-primitives.d.ts +109 -0
- package/lib/task-primitives.js +194 -0
- package/lib/tool-tiers.d.ts +57 -0
- package/lib/tool-tiers.js +168 -0
- package/lib/tools/agent-task.d.ts +4 -0
- package/lib/tools/agent-task.js +22 -9
- package/lib/tools/api.d.ts +4 -0
- package/lib/tools/api.js +48 -12
- package/lib/tools/body-input.d.ts +58 -0
- package/lib/tools/body-input.js +123 -0
- package/lib/tools/cache.js +42 -40
- package/lib/tools/codespace.js +4 -12
- package/lib/tools/discussion.d.ts +4 -0
- package/lib/tools/discussion.js +33 -17
- package/lib/tools/gist.d.ts +1 -39
- package/lib/tools/gist.js +4 -14
- package/lib/tools/help.js +65 -13
- package/lib/tools/issue.d.ts +4 -0
- package/lib/tools/issue.js +37 -38
- package/lib/tools/label.js +4 -15
- package/lib/tools/pr.d.ts +51 -0
- package/lib/tools/pr.js +204 -46
- package/lib/tools/project.js +4 -13
- package/lib/tools/release.d.ts +4 -0
- package/lib/tools/release.js +26 -26
- package/lib/tools/repo.js +4 -4
- package/lib/tools/ruleset.js +9 -6
- package/lib/tools/run.js +76 -24
- package/lib/tools/secret.js +11 -17
- package/lib/tools/skill.js +18 -22
- package/lib/tools/status.js +4 -4
- package/lib/tools/task.d.ts +223 -0
- package/lib/tools/task.js +464 -0
- package/lib/types.d.ts +183 -1
- package/lib/ui/commit-modal.js +108 -4
- package/lib/ui/diff-utils.d.ts +51 -0
- package/lib/ui/diff-utils.js +155 -0
- package/lib/ui/file-diff-modal.d.ts +33 -0
- package/lib/ui/file-diff-modal.js +250 -0
- package/lib/ui/help-modal.d.ts +1 -1
- package/lib/ui/help-modal.js +24 -12
- package/lib/ui/issue-modal.js +7 -3
- package/lib/ui/pr-modal.js +50 -11
- package/lib/ui/run-modal.d.ts +26 -0
- package/lib/ui/run-modal.js +486 -0
- package/lib/ui/styles.d.ts +1 -1
- package/lib/ui/styles.js +376 -44
- package/lib/ui/sync-settings-modal.js +1 -1
- package/lib/ui/workspace-panel.js +78 -23
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +9 -2
package/lib/ui/styles.js
CHANGED
|
@@ -3,50 +3,13 @@
|
|
|
3
3
|
* 遵循 DSH 原生 DSW (DeepSeek Web) 设计语言规范
|
|
4
4
|
*/
|
|
5
5
|
export const GITHUB_PANEL_CSS = `
|
|
6
|
-
/* 1.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
color: var(--dsw-alias-label-secondary, #656d76);
|
|
15
|
-
transition: color 0.15s ease;
|
|
16
|
-
}
|
|
17
|
-
.dsh-github-icon:hover {
|
|
18
|
-
color: var(--dsw-alias-label-primary, #1f2328);
|
|
19
|
-
}
|
|
20
|
-
.dsh-github-icon-inner {
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
width: 28px;
|
|
25
|
-
height: 28px;
|
|
26
|
-
border-radius: 7px;
|
|
27
|
-
background: transparent;
|
|
28
|
-
color: inherit;
|
|
29
|
-
border: 1px solid transparent;
|
|
30
|
-
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
|
|
31
|
-
}
|
|
32
|
-
.dsh-github-icon-inner.active {
|
|
33
|
-
background: var(--dsw-alias-bg-module-platform, rgba(9, 105, 218, 0.08));
|
|
34
|
-
color: var(--dsw-alias-link, #0969da);
|
|
35
|
-
border-color: var(--dsw-alias-border-l2, rgba(9, 105, 218, 0.2));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
body[data-ds-dark-theme] .dsh-github-icon {
|
|
39
|
-
color: var(--dsw-alias-label-secondary, #9ca3af);
|
|
40
|
-
}
|
|
41
|
-
body[data-ds-dark-theme] .dsh-github-icon:hover {
|
|
42
|
-
color: var(--dsw-alias-label-primary, #ffffff);
|
|
43
|
-
}
|
|
44
|
-
body[data-ds-dark-theme] .dsh-github-icon-inner.active {
|
|
45
|
-
background: linear-gradient(135deg, rgba(46, 160, 67, 0.3) 0%, rgba(31, 111, 235, 0.45) 100%);
|
|
46
|
-
color: #ffffff;
|
|
47
|
-
box-shadow: 0 0 12px rgba(31, 111, 235, 0.4);
|
|
48
|
-
border-color: rgba(88, 166, 255, 0.45);
|
|
49
|
-
}
|
|
6
|
+
/* 1. 侧边栏入口图标:刻意不提供任何样式
|
|
7
|
+
*
|
|
8
|
+
* 宿主的 .panelRow 负责行高亮 / hover / 颜色,图标格 .panelGlyph 是 flex:none
|
|
9
|
+
* 且不设宽高(宽度完全由内容决定)。这里任何固定尺寸都会撑开图标格、把标签推右;
|
|
10
|
+
* 任何背景/发光都会与宿主选中态叠加。历史教训见 issue #9:
|
|
11
|
+
* 28px 内层盒子让图标格比同级宽 12px,深色渐变+发光则是多余的第二层选中态。
|
|
12
|
+
*/
|
|
50
13
|
|
|
51
14
|
/* 2. Octocat 科技勋章 Badge */
|
|
52
15
|
.dsh-octocat-badge {
|
|
@@ -1546,6 +1509,12 @@ body[data-ds-dark-theme] .dsh-github-stat-list {
|
|
|
1546
1509
|
|
|
1547
1510
|
.dsh-github-stat-row {
|
|
1548
1511
|
transition: background-color 0.15s ease;
|
|
1512
|
+
cursor: pointer;
|
|
1513
|
+
}
|
|
1514
|
+
/* 键盘可达性:文件行是「打开 diff」的入口,纯 hover 反馈对 Tab 用户不可见 */
|
|
1515
|
+
.dsh-github-stat-row:focus-visible {
|
|
1516
|
+
outline: 2px solid var(--dsw-alias-state-accent-primary, #1296db);
|
|
1517
|
+
outline-offset: -2px;
|
|
1549
1518
|
}
|
|
1550
1519
|
.dsh-github-stat-row:hover {
|
|
1551
1520
|
background: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, 0.04));
|
|
@@ -2488,6 +2457,369 @@ body[data-ds-dark-theme] .dsh-github-issue-timeline-title {
|
|
|
2488
2457
|
opacity: 0.6;
|
|
2489
2458
|
flex: 0 0 auto;
|
|
2490
2459
|
}
|
|
2460
|
+
|
|
2461
|
+
/* 23. Actions Run 详情弹窗 (RunDetailModal)
|
|
2462
|
+
*
|
|
2463
|
+
* 为什么是单列而不是 PR 那样的双栏:run 的信息是「一串 job + 一条日志流」,
|
|
2464
|
+
* 天然按纵向顺序阅读,没有需要并排对照的第二个信息源(PR 才有 diff 双栏);
|
|
2465
|
+
* 但宽度仍给到 960px——job/step 名称与日志行都要靠横向空间减少折行。
|
|
2466
|
+
*
|
|
2467
|
+
* 为什么日志块用 pre 而不是 Markdown:GitHub 原始日志里的 #、|、--- 分别是
|
|
2468
|
+
* shell 注释、表格与 diff 分隔符,交给 markdown-lite 会被当成标题/表格语法,
|
|
2469
|
+
* 把堆栈与 diff 片段撕碎;等宽字体 + pre-wrap + 自身滚动区才是日志的呈现形态。
|
|
2470
|
+
*/
|
|
2471
|
+
.dsh-github-run-modal-dialog {
|
|
2472
|
+
width: 92% !important;
|
|
2473
|
+
max-width: 960px !important;
|
|
2474
|
+
height: 84vh !important;
|
|
2475
|
+
max-height: 84vh !important;
|
|
2476
|
+
display: flex !important;
|
|
2477
|
+
flex-direction: column !important;
|
|
2478
|
+
overflow: hidden !important;
|
|
2479
|
+
padding: 0 !important;
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
.dsh-github-run-modal-header {
|
|
2483
|
+
padding: 12px 16px !important;
|
|
2484
|
+
border-bottom: 1px solid var(--dsw-alias-border-l2, #e1e4e8);
|
|
2485
|
+
background: var(--dsw-alias-bg-layer-1, #f6f8fa);
|
|
2486
|
+
flex-shrink: 0;
|
|
2487
|
+
}
|
|
2488
|
+
body[data-ds-dark-theme] .dsh-github-run-modal-header {
|
|
2489
|
+
border-bottom-color: var(--dsw-alias-border-l1, #30363d);
|
|
2490
|
+
background: var(--dsw-alias-bg-layer-1, #16161a);
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
/* 滚动容器:flex:1 与 min-height:0 缺一不可,否则 column flex 的子项会按内容
|
|
2494
|
+
* 撑高,overflow-y:auto 永远不触发(长 job 列表滚不动) */
|
|
2495
|
+
.dsh-github-run-body {
|
|
2496
|
+
padding: 14px 16px 20px;
|
|
2497
|
+
overflow-y: auto;
|
|
2498
|
+
flex: 1;
|
|
2499
|
+
min-height: 0;
|
|
2500
|
+
display: flex;
|
|
2501
|
+
flex-direction: column;
|
|
2502
|
+
gap: 10px;
|
|
2503
|
+
/* 滚到边界不把滚动传给弹窗外层,避免整页跟着滚 */
|
|
2504
|
+
overscroll-behavior: contain;
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
/* 元信息行:分隔符交给 ::before,省掉一批纯装饰的空 span */
|
|
2508
|
+
.dsh-github-run-meta {
|
|
2509
|
+
display: flex;
|
|
2510
|
+
flex-wrap: wrap;
|
|
2511
|
+
align-items: center;
|
|
2512
|
+
gap: 6px;
|
|
2513
|
+
padding: 8px 16px;
|
|
2514
|
+
font-size: 11px;
|
|
2515
|
+
line-height: 18px;
|
|
2516
|
+
color: var(--dsw-alias-label-secondary, #57606a);
|
|
2517
|
+
background: var(--dsw-alias-bg-module-platform, #f6f8fa);
|
|
2518
|
+
border-bottom: 1px solid var(--dsw-alias-border-l2, #e1e4e8);
|
|
2519
|
+
flex: 0 0 auto;
|
|
2520
|
+
}
|
|
2521
|
+
.dsh-github-run-meta > span:not(:first-child)::before {
|
|
2522
|
+
content: "·";
|
|
2523
|
+
margin-right: 6px;
|
|
2524
|
+
opacity: 0.5;
|
|
2525
|
+
}
|
|
2526
|
+
body[data-ds-dark-theme] .dsh-github-run-meta {
|
|
2527
|
+
color: var(--dsw-alias-label-secondary, #8b949e);
|
|
2528
|
+
background: var(--dsw-alias-bg-layer-1, #16161a);
|
|
2529
|
+
border-bottom-color: var(--dsw-alias-border-l1, #30363d);
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
.dsh-github-run-mono {
|
|
2533
|
+
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
|
|
2534
|
+
opacity: 0.9;
|
|
2535
|
+
}
|
|
2536
|
+
.dsh-github-run-degraded {
|
|
2537
|
+
color: var(--dsw-alias-state-warning-primary, #9a6700);
|
|
2538
|
+
}
|
|
2539
|
+
body[data-ds-dark-theme] .dsh-github-run-degraded {
|
|
2540
|
+
color: #d29922;
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
/* 单个 job 卡片 */
|
|
2544
|
+
.dsh-github-run-job {
|
|
2545
|
+
border: 1px solid var(--dsw-alias-border-l2, #e1e4e8);
|
|
2546
|
+
border-radius: 6px;
|
|
2547
|
+
background: var(--dsw-alias-bg-base, #ffffff);
|
|
2548
|
+
overflow: hidden;
|
|
2549
|
+
/* 禁止收缩:父容器是 column flex,默认 flex-shrink:1 会压缩卡片而不是撑开
|
|
2550
|
+
* 父容器,导致 overflow-y:auto 永不触发 */
|
|
2551
|
+
flex: 0 0 auto;
|
|
2552
|
+
}
|
|
2553
|
+
body[data-ds-dark-theme] .dsh-github-run-job {
|
|
2554
|
+
border-color: var(--dsw-alias-border-l1, #30363d);
|
|
2555
|
+
background: var(--dsw-alias-bg-layer-2, #1e1e22);
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
/* 折叠头是 <button>:必须整条重置,否则会继承宿主的按钮边框/灰底/文字居中,
|
|
2559
|
+
* 一排 job 就变成一排「大按钮」,与既有弹窗的行式排版完全冲突 */
|
|
2560
|
+
.dsh-github-run-job-header {
|
|
2561
|
+
display: flex;
|
|
2562
|
+
align-items: center;
|
|
2563
|
+
gap: 8px;
|
|
2564
|
+
width: 100%;
|
|
2565
|
+
padding: 7px 10px;
|
|
2566
|
+
border: none;
|
|
2567
|
+
background: transparent;
|
|
2568
|
+
cursor: pointer;
|
|
2569
|
+
text-align: left;
|
|
2570
|
+
font-family: inherit;
|
|
2571
|
+
font-size: 12px;
|
|
2572
|
+
line-height: 18px;
|
|
2573
|
+
color: var(--dsw-alias-label-primary, #1f2328);
|
|
2574
|
+
border-radius: 6px;
|
|
2575
|
+
transition: background 0.15s ease;
|
|
2576
|
+
}
|
|
2577
|
+
.dsh-github-run-job-header:hover {
|
|
2578
|
+
background: var(--dsw-alias-interactive-bg-hover, #eaeef2);
|
|
2579
|
+
}
|
|
2580
|
+
body[data-ds-dark-theme] .dsh-github-run-job-header {
|
|
2581
|
+
color: var(--dsw-alias-label-primary, #f0f6fc);
|
|
2582
|
+
}
|
|
2583
|
+
body[data-ds-dark-theme] .dsh-github-run-job-header:hover {
|
|
2584
|
+
background: rgba(56, 139, 253, 0.12);
|
|
2585
|
+
}
|
|
2586
|
+
.dsh-github-run-caret {
|
|
2587
|
+
flex-shrink: 0;
|
|
2588
|
+
width: 10px;
|
|
2589
|
+
font-size: 10px;
|
|
2590
|
+
opacity: 0.65;
|
|
2591
|
+
}
|
|
2592
|
+
.dsh-github-run-job-name {
|
|
2593
|
+
flex: 1 1 auto;
|
|
2594
|
+
min-width: 0;
|
|
2595
|
+
font-weight: 500;
|
|
2596
|
+
overflow: hidden;
|
|
2597
|
+
text-overflow: ellipsis;
|
|
2598
|
+
white-space: nowrap;
|
|
2599
|
+
}
|
|
2600
|
+
.dsh-github-run-failed-count {
|
|
2601
|
+
flex-shrink: 0;
|
|
2602
|
+
font-size: 11px;
|
|
2603
|
+
opacity: 0.6;
|
|
2604
|
+
white-space: nowrap;
|
|
2605
|
+
}
|
|
2606
|
+
/* 有失败步骤时点成错误色:0/N 与 2/N 的信息量完全不同,不能同色 */
|
|
2607
|
+
.dsh-github-run-failed-count.is-hit {
|
|
2608
|
+
opacity: 1;
|
|
2609
|
+
font-weight: 600;
|
|
2610
|
+
color: var(--dsw-alias-state-error-primary, #cf222e);
|
|
2611
|
+
}
|
|
2612
|
+
body[data-ds-dark-theme] .dsh-github-run-failed-count.is-hit {
|
|
2613
|
+
color: #f85149;
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2616
|
+
/* 步骤表:四列等宽对齐(序号 / 名称 / 状态 / 耗时);没有表头,用 grid 行式
|
|
2617
|
+
* 布局比 table 更轻,且能让长步骤名省略而不是撑破布局 */
|
|
2618
|
+
.dsh-github-run-steps {
|
|
2619
|
+
border-top: 1px solid var(--dsw-alias-border-l2, #e1e4e8);
|
|
2620
|
+
display: flex;
|
|
2621
|
+
flex-direction: column;
|
|
2622
|
+
}
|
|
2623
|
+
body[data-ds-dark-theme] .dsh-github-run-steps {
|
|
2624
|
+
border-top-color: var(--dsw-alias-border-l1, #30363d);
|
|
2625
|
+
}
|
|
2626
|
+
.dsh-github-run-step {
|
|
2627
|
+
display: grid;
|
|
2628
|
+
grid-template-columns: 32px minmax(0, 1fr) auto 62px;
|
|
2629
|
+
align-items: center;
|
|
2630
|
+
gap: 8px;
|
|
2631
|
+
padding: 5px 10px 5px 18px;
|
|
2632
|
+
font-size: 11px;
|
|
2633
|
+
line-height: 17px;
|
|
2634
|
+
color: var(--dsw-alias-label-primary, #1f2328);
|
|
2635
|
+
border-bottom: 1px solid var(--dsw-alias-border-l2, #eaeef2);
|
|
2636
|
+
}
|
|
2637
|
+
.dsh-github-run-step:last-child {
|
|
2638
|
+
border-bottom: none;
|
|
2639
|
+
}
|
|
2640
|
+
.dsh-github-run-step > span:first-child {
|
|
2641
|
+
font-variant-numeric: tabular-nums;
|
|
2642
|
+
opacity: 0.55;
|
|
2643
|
+
}
|
|
2644
|
+
.dsh-github-run-step > span:nth-child(2) {
|
|
2645
|
+
overflow: hidden;
|
|
2646
|
+
text-overflow: ellipsis;
|
|
2647
|
+
white-space: nowrap;
|
|
2648
|
+
}
|
|
2649
|
+
.dsh-github-run-step > span:nth-child(3) {
|
|
2650
|
+
justify-self: start;
|
|
2651
|
+
}
|
|
2652
|
+
body[data-ds-dark-theme] .dsh-github-run-step {
|
|
2653
|
+
color: var(--dsw-alias-label-primary, #f0f6fc);
|
|
2654
|
+
border-bottom-color: var(--dsw-alias-border-l1, #30363d);
|
|
2655
|
+
}
|
|
2656
|
+
/* 失败步骤:浅红底 + 左侧粗线,扫一眼就能定位断点,不必逐个读状态文字 */
|
|
2657
|
+
.dsh-github-run-step-failed {
|
|
2658
|
+
background: rgba(207, 34, 46, 0.07);
|
|
2659
|
+
box-shadow: inset 3px 0 0 rgba(207, 34, 46, 0.55);
|
|
2660
|
+
}
|
|
2661
|
+
body[data-ds-dark-theme] .dsh-github-run-step-failed {
|
|
2662
|
+
background: rgba(248, 81, 73, 0.12);
|
|
2663
|
+
box-shadow: inset 3px 0 0 rgba(248, 81, 73, 0.7);
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2666
|
+
/* 耗时列:tabular-nums 让 m/s 数字上下严格对齐 */
|
|
2667
|
+
.dsh-github-run-duration {
|
|
2668
|
+
font-size: 11px;
|
|
2669
|
+
font-variant-numeric: tabular-nums;
|
|
2670
|
+
white-space: nowrap;
|
|
2671
|
+
text-align: right;
|
|
2672
|
+
justify-self: end;
|
|
2673
|
+
opacity: 0.65;
|
|
2674
|
+
}
|
|
2675
|
+
|
|
2676
|
+
/* 日志提取按钮,同时也是错误块里的「重试」 */
|
|
2677
|
+
.dsh-github-run-log-btn {
|
|
2678
|
+
align-self: flex-start;
|
|
2679
|
+
flex-shrink: 0;
|
|
2680
|
+
font-family: inherit;
|
|
2681
|
+
font-size: 11px;
|
|
2682
|
+
line-height: 18px;
|
|
2683
|
+
padding: 5px 12px;
|
|
2684
|
+
border-radius: 6px;
|
|
2685
|
+
border: 1px solid var(--dsw-alias-border-l2, #d0d7de);
|
|
2686
|
+
background: var(--dsw-alias-bg-module-platform, #f6f8fa);
|
|
2687
|
+
color: var(--dsw-alias-label-primary, #1f2328);
|
|
2688
|
+
cursor: pointer;
|
|
2689
|
+
transition: border-color 0.15s ease, color 0.15s ease;
|
|
2690
|
+
}
|
|
2691
|
+
.dsh-github-run-log-btn:hover:not(:disabled) {
|
|
2692
|
+
color: var(--dsw-alias-link, #0969da);
|
|
2693
|
+
border-color: var(--dsw-alias-link, #0969da);
|
|
2694
|
+
}
|
|
2695
|
+
.dsh-github-run-log-btn:disabled {
|
|
2696
|
+
cursor: progress;
|
|
2697
|
+
opacity: 0.6;
|
|
2698
|
+
}
|
|
2699
|
+
body[data-ds-dark-theme] .dsh-github-run-log-btn {
|
|
2700
|
+
border-color: var(--dsw-alias-border-l1, #30363d);
|
|
2701
|
+
background: var(--dsw-alias-bg-layer-2, #1e1e22);
|
|
2702
|
+
color: var(--dsw-alias-label-primary, #f0f6fc);
|
|
2703
|
+
}
|
|
2704
|
+
body[data-ds-dark-theme] .dsh-github-run-log-btn:hover:not(:disabled) {
|
|
2705
|
+
color: #58a6ff;
|
|
2706
|
+
border-color: #58a6ff;
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
.dsh-github-run-log-section {
|
|
2710
|
+
display: flex;
|
|
2711
|
+
flex-direction: column;
|
|
2712
|
+
gap: 8px;
|
|
2713
|
+
flex: 0 0 auto;
|
|
2714
|
+
}
|
|
2715
|
+
.dsh-github-run-log-block {
|
|
2716
|
+
display: flex;
|
|
2717
|
+
flex-direction: column;
|
|
2718
|
+
gap: 6px;
|
|
2719
|
+
}
|
|
2720
|
+
.dsh-github-run-log-title {
|
|
2721
|
+
font-size: 12px;
|
|
2722
|
+
font-weight: 600;
|
|
2723
|
+
color: var(--dsw-alias-label-primary, #1f2328);
|
|
2724
|
+
overflow: hidden;
|
|
2725
|
+
text-overflow: ellipsis;
|
|
2726
|
+
white-space: nowrap;
|
|
2727
|
+
}
|
|
2728
|
+
body[data-ds-dark-theme] .dsh-github-run-log-title {
|
|
2729
|
+
color: var(--dsw-alias-label-primary, #f0f6fc);
|
|
2730
|
+
}
|
|
2731
|
+
/* 截断提示必须显眼:用户看到的是不完整日志,不能让他误以为日志就这么多 */
|
|
2732
|
+
.dsh-github-run-log-truncated {
|
|
2733
|
+
font-size: 11px;
|
|
2734
|
+
color: var(--dsw-alias-state-warning-primary, #9a6700);
|
|
2735
|
+
}
|
|
2736
|
+
body[data-ds-dark-theme] .dsh-github-run-log-truncated {
|
|
2737
|
+
color: #d29922;
|
|
2738
|
+
}
|
|
2739
|
+
.dsh-github-run-log-hint {
|
|
2740
|
+
font-size: 11px;
|
|
2741
|
+
line-height: 1.6;
|
|
2742
|
+
opacity: 0.7;
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
/* 日志正文:等宽 + pre-wrap(GitHub 日志几乎不折行,默认 pre 会把长行藏进横向
|
|
2746
|
+
* 滚动),max-height 内独立滚动,避免几万行日志把整个弹窗顶爆 */
|
|
2747
|
+
.dsh-github-run-log {
|
|
2748
|
+
margin: 0;
|
|
2749
|
+
padding: 8px 10px;
|
|
2750
|
+
max-height: 320px;
|
|
2751
|
+
overflow: auto;
|
|
2752
|
+
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
|
|
2753
|
+
font-size: 11px;
|
|
2754
|
+
line-height: 1.5;
|
|
2755
|
+
white-space: pre-wrap;
|
|
2756
|
+
word-break: break-word;
|
|
2757
|
+
border: 1px solid var(--dsw-alias-border-l2, #e1e4e8);
|
|
2758
|
+
border-radius: 6px;
|
|
2759
|
+
background: var(--dsw-alias-bg-layer-1, #f6f8fa);
|
|
2760
|
+
color: var(--dsw-alias-label-primary, #1f2328);
|
|
2761
|
+
overscroll-behavior: contain;
|
|
2762
|
+
}
|
|
2763
|
+
body[data-ds-dark-theme] .dsh-github-run-log {
|
|
2764
|
+
border-color: var(--dsw-alias-border-l1, #30363d);
|
|
2765
|
+
background: var(--dsw-alias-bg-layer-1, #16161a);
|
|
2766
|
+
color: var(--dsw-alias-label-primary, #f0f6fc);
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
/* 错误块:错误文本可能是一整段 gh 原始输出,单独限高滚动,别让它把重试按钮顶出视口 */
|
|
2770
|
+
.dsh-github-run-error {
|
|
2771
|
+
display: flex;
|
|
2772
|
+
flex-direction: column;
|
|
2773
|
+
gap: 6px;
|
|
2774
|
+
padding: 10px 12px;
|
|
2775
|
+
border-radius: 6px;
|
|
2776
|
+
border: 1px solid rgba(248, 81, 73, 0.35);
|
|
2777
|
+
background: rgba(248, 81, 73, 0.08);
|
|
2778
|
+
color: var(--dsw-alias-state-error-primary, #cf222e);
|
|
2779
|
+
font-size: 12px;
|
|
2780
|
+
flex: 0 0 auto;
|
|
2781
|
+
}
|
|
2782
|
+
body[data-ds-dark-theme] .dsh-github-run-error {
|
|
2783
|
+
border-color: rgba(248, 81, 73, 0.45);
|
|
2784
|
+
background: rgba(248, 81, 73, 0.12);
|
|
2785
|
+
color: #f85149;
|
|
2786
|
+
}
|
|
2787
|
+
.dsh-github-run-error-title {
|
|
2788
|
+
font-weight: 600;
|
|
2789
|
+
}
|
|
2790
|
+
.dsh-github-run-error-text {
|
|
2791
|
+
max-height: 180px;
|
|
2792
|
+
overflow: auto;
|
|
2793
|
+
opacity: 0.9;
|
|
2794
|
+
line-height: 1.6;
|
|
2795
|
+
word-break: break-word;
|
|
2796
|
+
white-space: pre-wrap;
|
|
2797
|
+
overscroll-behavior: contain;
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2800
|
+
.dsh-github-run-empty {
|
|
2801
|
+
padding: 18px 0;
|
|
2802
|
+
text-align: center;
|
|
2803
|
+
font-size: 12px;
|
|
2804
|
+
opacity: 0.6;
|
|
2805
|
+
flex: 0 0 auto;
|
|
2806
|
+
}
|
|
2807
|
+
body[data-ds-dark-theme] .dsh-github-run-empty {
|
|
2808
|
+
color: var(--dsw-alias-label-secondary, #8b949e);
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
/* ciBadge 的 neutral 档(skipped)在全局样式里没有定义;只在本弹窗作用域内补,
|
|
2812
|
+
* 免得影响其它面板已有徽章的观感 */
|
|
2813
|
+
.dsh-github-run-modal-dialog .dsh-badge-neutral {
|
|
2814
|
+
background: rgba(110, 118, 129, 0.14);
|
|
2815
|
+
border: 1px solid rgba(110, 118, 129, 0.28);
|
|
2816
|
+
color: var(--dsw-alias-label-secondary, #57606a);
|
|
2817
|
+
}
|
|
2818
|
+
body[data-ds-dark-theme] .dsh-github-run-modal-dialog .dsh-badge-neutral {
|
|
2819
|
+
background: rgba(139, 148, 158, 0.18);
|
|
2820
|
+
border-color: rgba(139, 148, 158, 0.35);
|
|
2821
|
+
color: var(--dsw-alias-label-secondary, #8b949e);
|
|
2822
|
+
}
|
|
2491
2823
|
`;
|
|
2492
2824
|
export function injectStyles() {
|
|
2493
2825
|
var styleId = "dsh-plugin-github-styles";
|
|
@@ -265,7 +265,7 @@ export function GlobalSyncSettingsModal(props) {
|
|
|
265
265
|
? "var(--dsw-alias-state-error-primary, #cf222e)"
|
|
266
266
|
: "var(--dsw-alias-label-secondary, #656d76)",
|
|
267
267
|
},
|
|
268
|
-
}, updateMsg.text) : null)) : activeSection === "about" ? h("div", null, h("div", { style: { display: "flex", alignItems: "center", gap: "10px", marginBottom: "14px" } }, renderOctocatBadge(40), h("div", null, h("div", { style: { fontSize: "15px", fontWeight: 600 } }, "DSH GitHub Flow"), h("div", { style: { fontSize: "12px", color: "var(--dsw-alias-label-secondary, #656d76)", marginTop: "2px" } }, "当前版本: v" + (aboutVersion || "…")))), h("div", { style: { fontSize: "12px", color: "var(--dsw-alias-label-secondary, #656d76)", marginBottom: "14px", lineHeight: "1.6" } }, "让 DeepSeek Harness Agent 拥有操作 GitHub 的原生手脚。原生复用宿主机 gh CLI 安全凭据,深度打通本地 Git 工作区与云端协作,提供
|
|
268
|
+
}, updateMsg.text) : null)) : activeSection === "about" ? h("div", null, h("div", { style: { display: "flex", alignItems: "center", gap: "10px", marginBottom: "14px" } }, renderOctocatBadge(40), h("div", null, h("div", { style: { fontSize: "15px", fontWeight: 600 } }, "DSH GitHub Flow"), h("div", { style: { fontSize: "12px", color: "var(--dsw-alias-label-secondary, #656d76)", marginTop: "2px" } }, "当前版本: v" + (aboutVersion || "…")))), h("div", { style: { fontSize: "12px", color: "var(--dsw-alias-label-secondary, #656d76)", marginBottom: "14px", lineHeight: "1.6" } }, "让 DeepSeek Harness Agent 拥有操作 GitHub 的原生手脚。原生复用宿主机 gh CLI 安全凭据,深度打通本地 Git 工作区与云端协作,提供 19 大领域 Agent 工具、人类 Slash 指令、Web 全景驾驶舱与一键跨平台升级。"), h("div", { style: { display: "flex", flexDirection: "column", gap: "8px", marginBottom: "14px" } }, h("div", { style: { display: "flex", alignItems: "center", gap: "8px", fontSize: "12px" } }, h("span", { style: { minWidth: "64px", color: "var(--dsw-alias-label-secondary, #656d76)" } }, "仓库地址"), h("a", { href: "https://github.com/ItQianChen/dsh-github-flow", target: "_blank", rel: "noopener noreferrer", style: { color: "var(--dsw-alias-link, #0969da)" } }, "github.com/ItQianChen/dsh-github-flow")), h("div", { style: { display: "flex", alignItems: "center", gap: "8px", fontSize: "12px" } }, h("span", { style: { minWidth: "64px", color: "var(--dsw-alias-label-secondary, #656d76)" } }, "npm 包"), h("a", { href: "https://www.npmjs.com/package/dsh-github-flow", target: "_blank", rel: "noopener noreferrer", style: { color: "var(--dsw-alias-link, #0969da)" } }, "npmjs.com/package/dsh-github-flow")), h("div", { style: { display: "flex", alignItems: "center", gap: "8px", fontSize: "12px" } }, h("span", { style: { minWidth: "64px", color: "var(--dsw-alias-label-secondary, #656d76)" } }, "开源协议"), h("a", { href: "https://github.com/ItQianChen/dsh-github-flow/blob/master/LICENSE", target: "_blank", rel: "noopener noreferrer", style: { color: "var(--dsw-alias-link, #0969da)" } }, "MIT License"))), h("div", {
|
|
269
269
|
className: "dsh-github-about-star-box",
|
|
270
270
|
style: {
|
|
271
271
|
display: "flex",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { prStateBadge, issueStateBadge } from '../shared/state-badges.js';
|
|
1
2
|
/**
|
|
2
3
|
* 全局工作区仪表盘主面板组件 (Dashboard View)
|
|
3
4
|
*/
|
|
@@ -28,6 +29,12 @@ export function GithubWorkspacePanel() {
|
|
|
28
29
|
var [activeIssueModal, setActiveIssueModal] = React.useState(null);
|
|
29
30
|
var cloudTimerRef = React.useRef(null);
|
|
30
31
|
var dataRef = React.useRef(data);
|
|
32
|
+
// 全局面板分页游标:PR 与 Issues 独立维护,防止点击加载更多相互膨胀
|
|
33
|
+
var prLimitRef = React.useRef(15);
|
|
34
|
+
var issueLimitRef = React.useRef(15);
|
|
35
|
+
// 「正在加载更多」UI 标记:请求往返期间页脚必须给反馈,否则用户会连点触发重复请求
|
|
36
|
+
var [loadingPrs, setLoadingPrs] = React.useState(false);
|
|
37
|
+
var [loadingIssues, setLoadingIssues] = React.useState(false);
|
|
31
38
|
dataRef.current = data;
|
|
32
39
|
var showToast = (msg) => {
|
|
33
40
|
setToastMsg(msg);
|
|
@@ -110,8 +117,14 @@ export function GithubWorkspacePanel() {
|
|
|
110
117
|
if (forceRefresh)
|
|
111
118
|
await fetch("/api/github/refresh", { method: "POST", signal: controller.signal }).catch(() => { });
|
|
112
119
|
var url = "/api/github/global-overview";
|
|
120
|
+
var params = [];
|
|
113
121
|
if (forceRefresh) {
|
|
114
|
-
|
|
122
|
+
params.push("force=true");
|
|
123
|
+
}
|
|
124
|
+
params.push("prLimit=" + prLimitRef.current);
|
|
125
|
+
params.push("issueLimit=" + issueLimitRef.current);
|
|
126
|
+
if (params.length > 0) {
|
|
127
|
+
url += "?" + params.join("&");
|
|
115
128
|
}
|
|
116
129
|
// 接入 1s/2s/4s 阶梯退避重试,平滑吸收代理节点与网络的偶发抖动断流
|
|
117
130
|
var { res, json } = await fetchWithRetry(url, {}, {
|
|
@@ -347,6 +360,21 @@ export function GithubWorkspacePanel() {
|
|
|
347
360
|
var workspaceMatrix = (data && data.workspaceMatrix) || [];
|
|
348
361
|
var myPrs = (data && data.myPrs) || [];
|
|
349
362
|
var myIssues = (data && data.myIssues) || [];
|
|
363
|
+
// 主面板列表分页:PR 与 Issue 各自独立游标,每页步长 15,避免点击加载更多相互膨胀
|
|
364
|
+
var loadMorePrs = function () {
|
|
365
|
+
if (loadingPrs)
|
|
366
|
+
return;
|
|
367
|
+
prLimitRef.current = prLimitRef.current + 15;
|
|
368
|
+
setLoadingPrs(true);
|
|
369
|
+
loadData(true).finally(function () { setLoadingPrs(false); });
|
|
370
|
+
};
|
|
371
|
+
var loadMoreIssues = function () {
|
|
372
|
+
if (loadingIssues)
|
|
373
|
+
return;
|
|
374
|
+
issueLimitRef.current = issueLimitRef.current + 15;
|
|
375
|
+
setLoadingIssues(true);
|
|
376
|
+
loadData(true).finally(function () { setLoadingIssues(false); });
|
|
377
|
+
};
|
|
350
378
|
var errorEl = error ? h("div", { style: { color: "#f85149", background: "rgba(248,81,73,0.1)", border: "1px solid rgba(248,81,73,0.3)", padding: "8px 12px", borderRadius: "6px", marginBottom: "16px", fontSize: "12px" } }, `⚠️ 加载失败: ${error}`) : null;
|
|
351
379
|
var statsCardsEl = h("div", { className: "dsh-github-overview-cards" }, h("div", { className: "dsh-github-card" }, h("div", { className: "dsh-github-card-title" }, "CLI 认证账号"), h("div", { className: "dsh-github-card-value" }, auth?.networkError
|
|
352
380
|
? (auth.user ? `👤 ${auth.user} (离线)` : "🌐 网络连接受限")
|
|
@@ -422,27 +450,38 @@ export function GithubWorkspacePanel() {
|
|
|
422
450
|
return true;
|
|
423
451
|
return String(pr.state || '').toLowerCase() === prStateFilter;
|
|
424
452
|
});
|
|
425
|
-
var prPillsEl = h("div", { className: "dsh-github-pills" },
|
|
453
|
+
var prPillsEl = h("div", { className: "dsh-github-pills" },
|
|
454
|
+
// 计数优先用账号级真实总数(服务端 GraphQL search.issueCount),拿不到才回落已加载条数
|
|
455
|
+
h("button", { className: `dsh-github-pill-btn ${prStateFilter === 'all' ? 'active' : ''}`, onClick: () => setPrStateFilter('all') }, `全部 (${typeof data?.prTotal === 'number' ? data.prTotal : myPrs.length})`), h("button", { className: `dsh-github-pill-btn ${prStateFilter === 'open' ? 'active' : ''}`, onClick: () => setPrStateFilter('open') }, `🟢 Open (${typeof data?.prOpenTotal === 'number' ? data.prOpenTotal : prByState.open})`), h("button", { className: `dsh-github-pill-btn ${prStateFilter === 'merged' ? 'active' : ''}`, onClick: () => setPrStateFilter('merged') }, `🟣 Merged (${typeof data?.prMergedTotal === 'number' ? data.prMergedTotal : prByState.merged})`), h("button", { className: `dsh-github-pill-btn ${prStateFilter === 'closed' ? 'active' : ''}`, onClick: () => setPrStateFilter('closed') }, `⚪ Closed (${typeof data?.prClosedTotal === 'number' ? data.prClosedTotal : prByState.closed})`));
|
|
426
456
|
// 空态必须区分「账号确实没有」与「当前筛选下没有」——否则用户会把筛空当成数据丢失
|
|
427
457
|
var prEmptyEl = myPrs.length === 0
|
|
428
458
|
? h("div", { className: "dsh-github-empty" }, "该账号下暂无任何 Pull Request 记录")
|
|
429
459
|
: h("div", { className: "dsh-github-empty" }, `当前筛选「${prStateFilter}」下无结果,共 ${myPrs.length} 条记录(切换到「全部」查看)`);
|
|
430
|
-
contentEl = h("div", null, h("h3", { className: "dsh-github-subheading" }, `🔀 我发起与参与的 Pull Requests
|
|
431
|
-
//
|
|
460
|
+
contentEl = h("div", null, h("h3", { className: "dsh-github-subheading" }, `🔀 我发起与参与的 Pull Requests(${filteredPrs.length} 条符合筛选 / 共 ${typeof data?.prTotal === 'number' ? data.prTotal : myPrs.length})`), prPillsEl,
|
|
461
|
+
// 「加载更多」页脚:服务端说还有更多(本次拉满)时渲染,点击即 +15 重取。
|
|
462
|
+
// 旧文案是「已触及检索上限,请到 GitHub 查看」——那是在没有分页能力时的兜底,
|
|
463
|
+
// 现在数据可以继续拉,改成可点击的入口。
|
|
432
464
|
data && data.prsTruncated
|
|
433
465
|
? h("div", {
|
|
466
|
+
onClick: loadingPrs ? undefined : loadMorePrs,
|
|
467
|
+
title: loadingPrs ? "正在加载更多 PR…" : "点击加载更多(滚动到底部也会自动加载)", "aria-busy": loadingPrs ? "true" : "false",
|
|
434
468
|
style: {
|
|
435
469
|
margin: "8px 0",
|
|
436
|
-
padding: "
|
|
470
|
+
padding: "8px 12px",
|
|
437
471
|
borderRadius: "6px",
|
|
438
472
|
fontSize: "11px",
|
|
439
473
|
lineHeight: 1.5,
|
|
474
|
+
textAlign: "center",
|
|
475
|
+
cursor: loadingPrs ? "default" : "pointer",
|
|
440
476
|
background: "rgba(210, 153, 34, 0.12)",
|
|
441
477
|
border: "1px solid rgba(210, 153, 34, 0.35)",
|
|
442
478
|
color: "var(--dsw-alias-state-attention-primary, #9a6700)",
|
|
443
479
|
},
|
|
444
|
-
},
|
|
445
|
-
:
|
|
480
|
+
}, loadingPrs ? "⏳ 正在加载中…" : `⬇️ 下滑或点击加载更多 PR(已显示 ${myPrs.length} 条)`)
|
|
481
|
+
: (typeof data?.prTotal === 'number' && myPrs.length < data.prTotal
|
|
482
|
+
// 顶到单次 100 条上限后不再有加载入口,必须说明「更早记录在哪」,否则用户以为界面坏了
|
|
483
|
+
? h("div", { style: { margin: "8px 0", fontSize: "11px", opacity: 0.6, textAlign: "center" } }, `已加载 ${myPrs.length} / 共 ${data.prTotal} 条,更早记录请到 GitHub 查看`)
|
|
484
|
+
: null), filteredPrs.length === 0 ? prEmptyEl : h("div", { className: "dsh-github-list" }, filteredPrs.map((pr) => {
|
|
446
485
|
// 点击卡片主体 → 在线审阅弹窗
|
|
447
486
|
return h("div", {
|
|
448
487
|
key: pr.number,
|
|
@@ -467,14 +506,11 @@ export function GithubWorkspacePanel() {
|
|
|
467
506
|
h("div", { className: "dsh-github-pr-title-row" }, h("span", { className: "dsh-github-item-title", style: { cursor: "pointer" } }, `${pr.isDraft ? "⚪ " : ""}[${pr.repository?.nameWithOwner || 'Repo'}] #${pr.number} ${pr.title}`), pr.isDraft ? h("span", { className: "dsh-github-badge dsh-badge-yellow", style: { flexShrink: 0 } }, "DRAFT") : null,
|
|
468
507
|
// 状态徽章:列表含 merged/closed,必须标明才能一眼区分
|
|
469
508
|
(() => {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
if (s === 'OPEN')
|
|
476
|
-
return h("span", { className: "dsh-github-badge dsh-badge-green", style: { flexShrink: 0 } }, "OPEN");
|
|
477
|
-
return null;
|
|
509
|
+
// 状态→色调来自 shared/state-badges(与右侧栏、CLI 输出同一份)
|
|
510
|
+
var b = prStateBadge(pr.state);
|
|
511
|
+
if (!b || b.tone === 'neutral')
|
|
512
|
+
return null;
|
|
513
|
+
return h("span", { className: "dsh-github-badge dsh-badge-" + b.tone, style: { flexShrink: 0 } }, b.label);
|
|
478
514
|
})(), h("a", {
|
|
479
515
|
className: "dsh-github-pr-gh-btn",
|
|
480
516
|
href: pr.url,
|
|
@@ -510,7 +546,7 @@ export function GithubWorkspacePanel() {
|
|
|
510
546
|
var issuePillsEl = h("div", { className: "dsh-github-pills" }, h("button", {
|
|
511
547
|
className: `dsh-github-pill-btn ${issueFilter === 'all' ? 'active' : ''}`,
|
|
512
548
|
onClick: () => setIssueFilter('all'),
|
|
513
|
-
}, `全部 (${
|
|
549
|
+
}, `全部 (${myIssues.length})`), h("button", {
|
|
514
550
|
className: `dsh-github-pill-btn ${issueFilter === 'reported' ? 'active' : ''}`,
|
|
515
551
|
onClick: () => setIssueFilter('reported'),
|
|
516
552
|
}, `📥 用户提起的 (${issueStats.reported || 0})`), h("button", {
|
|
@@ -520,7 +556,28 @@ export function GithubWorkspacePanel() {
|
|
|
520
556
|
className: `dsh-github-pill-btn ${issueFilter === 'created' ? 'active' : ''}`,
|
|
521
557
|
onClick: () => setIssueFilter('created'),
|
|
522
558
|
}, `✍️ 我创建的 (${issueStats.created || 0})`));
|
|
523
|
-
contentEl = h("div", null,
|
|
559
|
+
contentEl = h("div", null,
|
|
560
|
+
// Issue 侧没有可信总数(三路并集无法用单条查询计数),老实标「已加载」,不假装是总数
|
|
561
|
+
h("h3", { className: "dsh-github-subheading" }, `📝 我发起与参与的 Issues(${filteredIssues.length} 条符合筛选 / 已加载 ${myIssues.length})`), issuePillsEl,
|
|
562
|
+
// 「加载更多」页脚:与 PR 列表同一口径(服务端 issuesTruncated = 还能继续拉)
|
|
563
|
+
data && data.issuesTruncated
|
|
564
|
+
? h("div", {
|
|
565
|
+
onClick: loadingIssues ? undefined : loadMoreIssues,
|
|
566
|
+
title: loadingIssues ? "正在加载更多 Issue…" : "点击加载更多(滚动到底部也会自动加载)", "aria-busy": loadingIssues ? "true" : "false",
|
|
567
|
+
style: {
|
|
568
|
+
margin: "8px 0",
|
|
569
|
+
padding: "8px 12px",
|
|
570
|
+
borderRadius: "6px",
|
|
571
|
+
fontSize: "11px",
|
|
572
|
+
lineHeight: 1.5,
|
|
573
|
+
textAlign: "center",
|
|
574
|
+
cursor: loadingIssues ? "default" : "pointer",
|
|
575
|
+
background: "rgba(210, 153, 34, 0.12)",
|
|
576
|
+
border: "1px solid rgba(210, 153, 34, 0.35)",
|
|
577
|
+
color: "var(--dsw-alias-state-attention-primary, #9a6700)",
|
|
578
|
+
},
|
|
579
|
+
}, loadingIssues ? "⏳ 正在加载中…" : `⬇️ 下滑或点击加载更多 Issue(已显示 ${myIssues.length} 条)`)
|
|
580
|
+
: null, filteredIssues.length === 0
|
|
524
581
|
? (myIssues.length === 0
|
|
525
582
|
? h("div", { className: "dsh-github-empty" }, "该账号下暂无任何 Issue 记录")
|
|
526
583
|
: h("div", { className: "dsh-github-empty" }, `当前分类「${issueFilter}」下无结果,共 ${myIssues.length} 条记录(切换到「全部」查看)`))
|
|
@@ -556,12 +613,10 @@ export function GithubWorkspacePanel() {
|
|
|
556
613
|
// 标题行:标题 → 分类徽章 → 状态徽章 → GitHub 外跳,全部同一行
|
|
557
614
|
h("div", { className: "dsh-github-pr-title-row" }, h("span", { className: "dsh-github-item-title", style: { cursor: "pointer" } }, `[${is.repository?.nameWithOwner || 'Repo'}] #${is.number} ${is.title}`), ...badges, (() => {
|
|
558
615
|
// 状态徽章:全局检索含 closed,不标注会让用户把已关闭议题当成待办
|
|
559
|
-
var
|
|
560
|
-
if (
|
|
561
|
-
return
|
|
562
|
-
|
|
563
|
-
return h("span", { className: "dsh-github-badge dsh-badge-green", style: { flexShrink: 0 } }, "OPEN");
|
|
564
|
-
return null;
|
|
616
|
+
var b = issueStateBadge(is.state);
|
|
617
|
+
if (!b || b.tone === 'neutral')
|
|
618
|
+
return null;
|
|
619
|
+
return h("span", { className: "dsh-github-badge dsh-badge-" + b.tone, style: { flexShrink: 0 } }, b.label);
|
|
565
620
|
})(), h("a", {
|
|
566
621
|
className: "dsh-github-pr-gh-btn",
|
|
567
622
|
href: is.url,
|
package/lib/version.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* 2. 避免在 ESM 运行时动态读取 package.json 引入 fs 权限和路径解析边界问题;
|
|
7
7
|
* 3. 方便在 CI 发布流水线或 build 脚本中自动化校准。
|
|
8
8
|
*/
|
|
9
|
-
export declare const CURRENT_PLUGIN_VERSION = "0.
|
|
9
|
+
export declare const CURRENT_PLUGIN_VERSION = "0.7.1";
|
|
10
10
|
export declare const PLUGIN_PACKAGE_NAME = "dsh-github-flow";
|
|
11
11
|
export declare const NPM_PACKAGE_URL = "https://www.npmjs.com/package/dsh-github-flow";
|
|
12
12
|
export declare const NPM_REGISTRY_MIRROR = "https://registry.npmmirror.com";
|
package/lib/version.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* 2. 避免在 ESM 运行时动态读取 package.json 引入 fs 权限和路径解析边界问题;
|
|
7
7
|
* 3. 方便在 CI 发布流水线或 build 脚本中自动化校准。
|
|
8
8
|
*/
|
|
9
|
-
export const CURRENT_PLUGIN_VERSION = '0.
|
|
9
|
+
export const CURRENT_PLUGIN_VERSION = '0.7.1';
|
|
10
10
|
export const PLUGIN_PACKAGE_NAME = 'dsh-github-flow';
|
|
11
11
|
export const NPM_PACKAGE_URL = 'https://www.npmjs.com/package/dsh-github-flow';
|
|
12
12
|
export const NPM_REGISTRY_MIRROR = 'https://registry.npmmirror.com';
|