@gobing-ai/knowledge-kit 0.1.2 → 0.1.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/.claude-plugin/marketplace.json +1 -1
- package/dist/board/collect/index.css +178 -0
- package/dist/board/collect/index.js +1164 -345
- package/dist/board/daily-voice/index.css +178 -0
- package/dist/board/daily-voice/index.js +32 -8
- package/dist/board/itc/index.css +178 -0
- package/dist/board/itc/index.js +32 -8
- package/dist/index.js +3991 -3032
- package/package.json +4 -4
- package/plugins/generations/content-gen/dist/index.js +11 -11
- package/plugins/generations/core-facts-gen/dist/index.js +14 -14
- package/plugins/generations/daily-article-gen/dist/index.js +14 -14
- package/plugins/generations/dailynews-gen/dist/index.js +11 -11
- package/plugins/generations/episode-plan-gen/dist/index.js +14 -14
- package/plugins/generations/gemini-tts/dist/index.js +11 -11
- package/plugins/generations/image-gen/dist/index.js +11 -11
- package/plugins/generations/news-report-gen/dist/index.js +14 -14
- package/plugins/generations/voice-gen/dist/index.js +11 -11
- package/plugins/generations/voxcpm-tts/dist/index.js +11 -11
- package/plugins/ingestions/aihot-ingest/dist/index.js +14 -14
- package/plugins/ingestions/horizon-ingest/dist/index.js +14 -14
- package/plugins/ingestions/karakeep-local/dist/index.js +15 -15
- package/plugins/ingestions/last30days-ingest/dist/index.js +14 -14
- package/plugins/ingestions/web-search/dist/index.js +12 -12
- package/plugins/kk/commands/workflow-run.md +8 -4
- package/plugins/kk/decisions/extract/ai-news.yaml +7 -1
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/scripts/kk-workflow-stages.ts +4 -3
- package/plugins/kk/workflows/feature-verification.yaml +1 -9
- package/plugins/kk/workflows/kk-itc-author.yaml +12 -9
- package/plugins/kk/workflows/kk-itc-publish-tail.yaml +90 -0
- package/plugins/kk/workflows/kk-solo-podcast.yaml +6 -0
- package/plugins/publishings/bilibili-pub/dist/index.js +24 -24
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/cnblogs-pub/dist/index.js +24 -24
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/csdn-pub/dist/index.js +24 -24
- package/plugins/publishings/csdn-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/emdash-pub/dist/index.js +11 -11
- package/plugins/publishings/infoq-pub/dist/index.js +24 -24
- package/plugins/publishings/infoq-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/jike-pub/dist/index.js +24 -24
- package/plugins/publishings/jike-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/juejin-pub/dist/index.js +24 -24
- package/plugins/publishings/juejin-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/medium-pub/dist/index.js +11 -11
- package/plugins/publishings/podcast-pub/dist/index.js +11 -11
- package/plugins/publishings/qiita-pub/dist/index.js +11 -11
- package/plugins/publishings/shipinhao-pub/dist/index.js +24 -24
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/sspai-pub/dist/index.js +24 -24
- package/plugins/publishings/sspai-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/substack-pub/dist/index.js +24 -24
- package/plugins/publishings/substack-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/surfdash-pub/dist/index.js +11 -11
- package/plugins/publishings/threads-pub/dist/index.js +11 -11
- package/plugins/publishings/wechatmp-pub/dist/index.js +29 -25
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +24 -24
- package/plugins/publishings/wechatmp-pub/src/modes.ts +11 -1
- package/plugins/publishings/weibo-pub/dist/index.js +24 -24
- package/plugins/publishings/weibo-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/x-pub/dist/index.js +24 -24
- package/plugins/publishings/x-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/x-pub/plugin.json +18 -0
- package/plugins/publishings/xhs-pub/dist/index.js +24 -24
- package/plugins/publishings/xhs-pub/dist/profile-check.js +24 -24
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +24 -24
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/zenn-pub/dist/index.js +11 -11
|
@@ -678,3 +678,181 @@
|
|
|
678
678
|
font-size: 0.75rem;
|
|
679
679
|
color: var(--color-spur-text-faint);
|
|
680
680
|
}
|
|
681
|
+
|
|
682
|
+
/* ── Collect store views (G81/0308) ────────────────────────────────────── */
|
|
683
|
+
|
|
684
|
+
.kk-collect-overview {
|
|
685
|
+
display: flex;
|
|
686
|
+
flex-direction: column;
|
|
687
|
+
gap: 0.875rem;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.kk-collect-banner {
|
|
691
|
+
display: grid;
|
|
692
|
+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
693
|
+
gap: 0.75rem;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.kk-collect-banner-cell {
|
|
697
|
+
display: flex;
|
|
698
|
+
flex-direction: column;
|
|
699
|
+
gap: 0.25rem;
|
|
700
|
+
padding: 0.75rem 0.875rem;
|
|
701
|
+
background: var(--color-spur-surface-2);
|
|
702
|
+
border: 1px solid var(--color-spur-border);
|
|
703
|
+
border-radius: 0.5rem;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.kk-collect-banner-value {
|
|
707
|
+
display: flex;
|
|
708
|
+
align-items: center;
|
|
709
|
+
gap: 0.5rem;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
.kk-collect-run-link {
|
|
713
|
+
padding: 0;
|
|
714
|
+
font: inherit;
|
|
715
|
+
text-align: left;
|
|
716
|
+
color: var(--color-spur-accent);
|
|
717
|
+
background: none;
|
|
718
|
+
border: 0;
|
|
719
|
+
cursor: pointer;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.kk-collect-run-link:hover {
|
|
723
|
+
text-decoration: underline;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.kk-collect-nostore {
|
|
727
|
+
color: var(--color-spur-text-muted);
|
|
728
|
+
font-style: italic;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.kk-collect-bar {
|
|
732
|
+
display: flex;
|
|
733
|
+
width: 9rem;
|
|
734
|
+
height: 0.5rem;
|
|
735
|
+
overflow: hidden;
|
|
736
|
+
background: var(--color-spur-surface-2);
|
|
737
|
+
border: 1px solid var(--color-spur-border);
|
|
738
|
+
border-radius: 999px;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.kk-collect-bar-seg {
|
|
742
|
+
height: 100%;
|
|
743
|
+
background: var(--color-spur-accent);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.kk-collect-bar-seg-1 {
|
|
747
|
+
opacity: 0.65;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.kk-collect-bar-seg-2 {
|
|
751
|
+
opacity: 0.4;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.kk-collect-bar-total {
|
|
755
|
+
display: block;
|
|
756
|
+
margin-top: 0.25rem;
|
|
757
|
+
font-size: 0.75rem;
|
|
758
|
+
color: var(--color-spur-text-muted);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.kk-collect-detail {
|
|
762
|
+
display: flex;
|
|
763
|
+
flex-direction: column;
|
|
764
|
+
gap: 0.875rem;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
.kk-collect-detail > p {
|
|
768
|
+
margin: 0;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
.kk-collect-quality-block + .kk-collect-quality-block {
|
|
772
|
+
margin-top: 0.875rem;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
.kk-collect-quality-block h3 {
|
|
776
|
+
margin: 0 0 0.375rem;
|
|
777
|
+
font-size: 0.8125rem;
|
|
778
|
+
font-weight: 600;
|
|
779
|
+
text-transform: uppercase;
|
|
780
|
+
letter-spacing: 0.04em;
|
|
781
|
+
color: var(--color-spur-text-muted);
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.kk-collect-filters {
|
|
785
|
+
display: flex;
|
|
786
|
+
flex-wrap: wrap;
|
|
787
|
+
align-items: flex-end;
|
|
788
|
+
gap: 0.75rem;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
.kk-collect-items {
|
|
792
|
+
display: flex;
|
|
793
|
+
flex-direction: column;
|
|
794
|
+
gap: 0.875rem;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
/* The items filters carry their own class: `.kk-board-run-selector` stays one unique control. */
|
|
798
|
+
.kk-collect-filter {
|
|
799
|
+
display: inline-flex;
|
|
800
|
+
align-items: center;
|
|
801
|
+
gap: 0.375rem;
|
|
802
|
+
font-size: 0.8125rem;
|
|
803
|
+
font-weight: 500;
|
|
804
|
+
color: var(--color-spur-text-muted);
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
.kk-collect-filter select {
|
|
808
|
+
max-width: 200px;
|
|
809
|
+
padding: 0.3125rem 0.625rem;
|
|
810
|
+
font-size: 0.8125rem;
|
|
811
|
+
font-family: inherit;
|
|
812
|
+
color: var(--color-spur-text);
|
|
813
|
+
background: var(--color-spur-surface);
|
|
814
|
+
border: 1px solid var(--color-spur-border);
|
|
815
|
+
border-radius: 0.375rem;
|
|
816
|
+
cursor: pointer;
|
|
817
|
+
outline: none;
|
|
818
|
+
transition: border-color 0.15s ease;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.kk-collect-filter select:focus {
|
|
822
|
+
border-color: var(--color-spur-accent);
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.kk-collect-pager {
|
|
826
|
+
display: flex;
|
|
827
|
+
align-items: center;
|
|
828
|
+
justify-content: space-between;
|
|
829
|
+
gap: 0.75rem;
|
|
830
|
+
font-size: 0.8125rem;
|
|
831
|
+
color: var(--color-spur-text-muted);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
.kk-collect-pager button {
|
|
835
|
+
padding: 0.375rem 0.75rem;
|
|
836
|
+
font-size: 0.8125rem;
|
|
837
|
+
color: var(--color-spur-text);
|
|
838
|
+
background: var(--color-spur-surface-2);
|
|
839
|
+
border: 1px solid var(--color-spur-border);
|
|
840
|
+
border-radius: 0.45rem;
|
|
841
|
+
cursor: pointer;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.kk-collect-pager button:disabled {
|
|
845
|
+
opacity: 0.5;
|
|
846
|
+
cursor: not-allowed;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.kk-chip {
|
|
850
|
+
display: inline-block;
|
|
851
|
+
margin: 0 0.25rem 0.25rem 0;
|
|
852
|
+
padding: 0.125rem 0.5rem;
|
|
853
|
+
font-size: 0.6875rem;
|
|
854
|
+
color: var(--color-spur-text);
|
|
855
|
+
background: var(--color-spur-surface-2);
|
|
856
|
+
border: 1px solid var(--color-spur-border);
|
|
857
|
+
border-radius: 999px;
|
|
858
|
+
}
|
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
|
|
4
4
|
// ../board/src/shared/api.ts
|
|
5
|
+
var MAX_OVERVIEW_RUNS = 25;
|
|
6
|
+
function storeItemsQueryString(query) {
|
|
7
|
+
const params = new URLSearchParams;
|
|
8
|
+
if (query.page !== undefined)
|
|
9
|
+
params.set("page", String(query.page));
|
|
10
|
+
if (query.source !== undefined)
|
|
11
|
+
params.set("source", query.source);
|
|
12
|
+
if (query.seen !== undefined)
|
|
13
|
+
params.set("seen", query.seen);
|
|
14
|
+
if (query.decision !== undefined && query.value !== undefined) {
|
|
15
|
+
params.set("decision", query.decision);
|
|
16
|
+
params.set("value", query.value);
|
|
17
|
+
}
|
|
18
|
+
if (query.selection !== undefined)
|
|
19
|
+
params.set("selection", query.selection);
|
|
20
|
+
return params.toString();
|
|
21
|
+
}
|
|
5
22
|
var DEFAULT_READER_ORIGIN = "http://127.0.0.1:4340";
|
|
6
23
|
function readerOriginFrom(search) {
|
|
7
24
|
const override = new URLSearchParams(search).get("kkApi");
|
|
@@ -63,6 +80,12 @@ function createBoardClient(options) {
|
|
|
63
80
|
params.set("cursor", cursor);
|
|
64
81
|
return getJson(`${board}/api/runs?${params.toString()}`);
|
|
65
82
|
},
|
|
83
|
+
storeOverview: (runIds) => {
|
|
84
|
+
const params = new URLSearchParams({ runs: runIds.slice(0, MAX_OVERVIEW_RUNS).join(",") });
|
|
85
|
+
return getJson(`${reader}/api/workflows/kk-collect/store/overview?${params.toString()}`);
|
|
86
|
+
},
|
|
87
|
+
storeRun: (runId) => getJson(`${reader}/api/workflows/kk-collect/runs/${encodeURIComponent(runId)}/store`),
|
|
88
|
+
storeItems: (runId, query = {}) => getJson(`${reader}/api/workflows/kk-collect/runs/${encodeURIComponent(runId)}/store/items?${storeItemsQueryString(query)}`),
|
|
66
89
|
runDetail: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}`),
|
|
67
90
|
progress: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}/progress`)
|
|
68
91
|
};
|
|
@@ -172,22 +195,23 @@ function freshnessLabel(state) {
|
|
|
172
195
|
|
|
173
196
|
// ../board/src/shared/run-selection.ts
|
|
174
197
|
var BOARD_TABS = ["summary", "results", "progress", "config"];
|
|
175
|
-
function
|
|
176
|
-
return value !== null && value !== undefined && BOARD_TABS.includes(value);
|
|
177
|
-
}
|
|
178
|
-
function parseDeepLink(search) {
|
|
198
|
+
function parseDeepLink(search, tabs = BOARD_TABS, aliases = {}) {
|
|
179
199
|
const params = new URLSearchParams(search.startsWith("?") ? search.slice(1) : search);
|
|
180
200
|
const diagnostics = [];
|
|
181
201
|
const rawTab = params.get("tab");
|
|
182
202
|
const rawRun = params.get("run");
|
|
203
|
+
const known = tabs;
|
|
183
204
|
let tab;
|
|
184
205
|
if (rawTab !== null) {
|
|
185
|
-
|
|
206
|
+
const aliased = Object.hasOwn(aliases, rawTab) ? aliases[rawTab] : undefined;
|
|
207
|
+
if (known.includes(rawTab)) {
|
|
186
208
|
tab = rawTab;
|
|
209
|
+
} else if (aliased !== undefined && known.includes(aliased)) {
|
|
210
|
+
tab = aliased;
|
|
187
211
|
} else {
|
|
188
212
|
diagnostics.push({
|
|
189
213
|
code: "board.deeplink.unknown-tab",
|
|
190
|
-
message: `Unknown tab '${rawTab}'; showing
|
|
214
|
+
message: `Unknown tab '${rawTab}'; showing the default tab.`
|
|
191
215
|
});
|
|
192
216
|
}
|
|
193
217
|
}
|
|
@@ -201,8 +225,8 @@ function parseDeepLink(search) {
|
|
|
201
225
|
}
|
|
202
226
|
return { ...runId === undefined ? {} : { runId }, ...tab === undefined ? {} : { tab }, diagnostics };
|
|
203
227
|
}
|
|
204
|
-
function resolveSelection(rows, link) {
|
|
205
|
-
const tab = link.tab ??
|
|
228
|
+
function resolveSelection(rows, link, defaultTab = "summary") {
|
|
229
|
+
const tab = link.tab ?? defaultTab;
|
|
206
230
|
const diagnostics = [...link.diagnostics];
|
|
207
231
|
if (link.runId !== undefined) {
|
|
208
232
|
if (rows.some((row) => row.id === link.runId)) {
|
package/dist/board/itc/index.css
CHANGED
|
@@ -678,3 +678,181 @@
|
|
|
678
678
|
font-size: 0.75rem;
|
|
679
679
|
color: var(--color-spur-text-faint);
|
|
680
680
|
}
|
|
681
|
+
|
|
682
|
+
/* ── Collect store views (G81/0308) ────────────────────────────────────── */
|
|
683
|
+
|
|
684
|
+
.kk-collect-overview {
|
|
685
|
+
display: flex;
|
|
686
|
+
flex-direction: column;
|
|
687
|
+
gap: 0.875rem;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.kk-collect-banner {
|
|
691
|
+
display: grid;
|
|
692
|
+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
693
|
+
gap: 0.75rem;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.kk-collect-banner-cell {
|
|
697
|
+
display: flex;
|
|
698
|
+
flex-direction: column;
|
|
699
|
+
gap: 0.25rem;
|
|
700
|
+
padding: 0.75rem 0.875rem;
|
|
701
|
+
background: var(--color-spur-surface-2);
|
|
702
|
+
border: 1px solid var(--color-spur-border);
|
|
703
|
+
border-radius: 0.5rem;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.kk-collect-banner-value {
|
|
707
|
+
display: flex;
|
|
708
|
+
align-items: center;
|
|
709
|
+
gap: 0.5rem;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
.kk-collect-run-link {
|
|
713
|
+
padding: 0;
|
|
714
|
+
font: inherit;
|
|
715
|
+
text-align: left;
|
|
716
|
+
color: var(--color-spur-accent);
|
|
717
|
+
background: none;
|
|
718
|
+
border: 0;
|
|
719
|
+
cursor: pointer;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.kk-collect-run-link:hover {
|
|
723
|
+
text-decoration: underline;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.kk-collect-nostore {
|
|
727
|
+
color: var(--color-spur-text-muted);
|
|
728
|
+
font-style: italic;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.kk-collect-bar {
|
|
732
|
+
display: flex;
|
|
733
|
+
width: 9rem;
|
|
734
|
+
height: 0.5rem;
|
|
735
|
+
overflow: hidden;
|
|
736
|
+
background: var(--color-spur-surface-2);
|
|
737
|
+
border: 1px solid var(--color-spur-border);
|
|
738
|
+
border-radius: 999px;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.kk-collect-bar-seg {
|
|
742
|
+
height: 100%;
|
|
743
|
+
background: var(--color-spur-accent);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.kk-collect-bar-seg-1 {
|
|
747
|
+
opacity: 0.65;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.kk-collect-bar-seg-2 {
|
|
751
|
+
opacity: 0.4;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.kk-collect-bar-total {
|
|
755
|
+
display: block;
|
|
756
|
+
margin-top: 0.25rem;
|
|
757
|
+
font-size: 0.75rem;
|
|
758
|
+
color: var(--color-spur-text-muted);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.kk-collect-detail {
|
|
762
|
+
display: flex;
|
|
763
|
+
flex-direction: column;
|
|
764
|
+
gap: 0.875rem;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
.kk-collect-detail > p {
|
|
768
|
+
margin: 0;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
.kk-collect-quality-block + .kk-collect-quality-block {
|
|
772
|
+
margin-top: 0.875rem;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
.kk-collect-quality-block h3 {
|
|
776
|
+
margin: 0 0 0.375rem;
|
|
777
|
+
font-size: 0.8125rem;
|
|
778
|
+
font-weight: 600;
|
|
779
|
+
text-transform: uppercase;
|
|
780
|
+
letter-spacing: 0.04em;
|
|
781
|
+
color: var(--color-spur-text-muted);
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.kk-collect-filters {
|
|
785
|
+
display: flex;
|
|
786
|
+
flex-wrap: wrap;
|
|
787
|
+
align-items: flex-end;
|
|
788
|
+
gap: 0.75rem;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
.kk-collect-items {
|
|
792
|
+
display: flex;
|
|
793
|
+
flex-direction: column;
|
|
794
|
+
gap: 0.875rem;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
/* The items filters carry their own class: `.kk-board-run-selector` stays one unique control. */
|
|
798
|
+
.kk-collect-filter {
|
|
799
|
+
display: inline-flex;
|
|
800
|
+
align-items: center;
|
|
801
|
+
gap: 0.375rem;
|
|
802
|
+
font-size: 0.8125rem;
|
|
803
|
+
font-weight: 500;
|
|
804
|
+
color: var(--color-spur-text-muted);
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
.kk-collect-filter select {
|
|
808
|
+
max-width: 200px;
|
|
809
|
+
padding: 0.3125rem 0.625rem;
|
|
810
|
+
font-size: 0.8125rem;
|
|
811
|
+
font-family: inherit;
|
|
812
|
+
color: var(--color-spur-text);
|
|
813
|
+
background: var(--color-spur-surface);
|
|
814
|
+
border: 1px solid var(--color-spur-border);
|
|
815
|
+
border-radius: 0.375rem;
|
|
816
|
+
cursor: pointer;
|
|
817
|
+
outline: none;
|
|
818
|
+
transition: border-color 0.15s ease;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.kk-collect-filter select:focus {
|
|
822
|
+
border-color: var(--color-spur-accent);
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.kk-collect-pager {
|
|
826
|
+
display: flex;
|
|
827
|
+
align-items: center;
|
|
828
|
+
justify-content: space-between;
|
|
829
|
+
gap: 0.75rem;
|
|
830
|
+
font-size: 0.8125rem;
|
|
831
|
+
color: var(--color-spur-text-muted);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
.kk-collect-pager button {
|
|
835
|
+
padding: 0.375rem 0.75rem;
|
|
836
|
+
font-size: 0.8125rem;
|
|
837
|
+
color: var(--color-spur-text);
|
|
838
|
+
background: var(--color-spur-surface-2);
|
|
839
|
+
border: 1px solid var(--color-spur-border);
|
|
840
|
+
border-radius: 0.45rem;
|
|
841
|
+
cursor: pointer;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.kk-collect-pager button:disabled {
|
|
845
|
+
opacity: 0.5;
|
|
846
|
+
cursor: not-allowed;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.kk-chip {
|
|
850
|
+
display: inline-block;
|
|
851
|
+
margin: 0 0.25rem 0.25rem 0;
|
|
852
|
+
padding: 0.125rem 0.5rem;
|
|
853
|
+
font-size: 0.6875rem;
|
|
854
|
+
color: var(--color-spur-text);
|
|
855
|
+
background: var(--color-spur-surface-2);
|
|
856
|
+
border: 1px solid var(--color-spur-border);
|
|
857
|
+
border-radius: 999px;
|
|
858
|
+
}
|
package/dist/board/itc/index.js
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
|
|
4
4
|
// ../board/src/shared/api.ts
|
|
5
|
+
var MAX_OVERVIEW_RUNS = 25;
|
|
6
|
+
function storeItemsQueryString(query) {
|
|
7
|
+
const params = new URLSearchParams;
|
|
8
|
+
if (query.page !== undefined)
|
|
9
|
+
params.set("page", String(query.page));
|
|
10
|
+
if (query.source !== undefined)
|
|
11
|
+
params.set("source", query.source);
|
|
12
|
+
if (query.seen !== undefined)
|
|
13
|
+
params.set("seen", query.seen);
|
|
14
|
+
if (query.decision !== undefined && query.value !== undefined) {
|
|
15
|
+
params.set("decision", query.decision);
|
|
16
|
+
params.set("value", query.value);
|
|
17
|
+
}
|
|
18
|
+
if (query.selection !== undefined)
|
|
19
|
+
params.set("selection", query.selection);
|
|
20
|
+
return params.toString();
|
|
21
|
+
}
|
|
5
22
|
var DEFAULT_READER_ORIGIN = "http://127.0.0.1:4340";
|
|
6
23
|
function readerOriginFrom(search) {
|
|
7
24
|
const override = new URLSearchParams(search).get("kkApi");
|
|
@@ -63,6 +80,12 @@ function createBoardClient(options) {
|
|
|
63
80
|
params.set("cursor", cursor);
|
|
64
81
|
return getJson(`${board}/api/runs?${params.toString()}`);
|
|
65
82
|
},
|
|
83
|
+
storeOverview: (runIds) => {
|
|
84
|
+
const params = new URLSearchParams({ runs: runIds.slice(0, MAX_OVERVIEW_RUNS).join(",") });
|
|
85
|
+
return getJson(`${reader}/api/workflows/kk-collect/store/overview?${params.toString()}`);
|
|
86
|
+
},
|
|
87
|
+
storeRun: (runId) => getJson(`${reader}/api/workflows/kk-collect/runs/${encodeURIComponent(runId)}/store`),
|
|
88
|
+
storeItems: (runId, query = {}) => getJson(`${reader}/api/workflows/kk-collect/runs/${encodeURIComponent(runId)}/store/items?${storeItemsQueryString(query)}`),
|
|
66
89
|
runDetail: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}`),
|
|
67
90
|
progress: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}/progress`)
|
|
68
91
|
};
|
|
@@ -219,22 +242,23 @@ function freshnessLabel(state) {
|
|
|
219
242
|
|
|
220
243
|
// ../board/src/shared/run-selection.ts
|
|
221
244
|
var BOARD_TABS = ["summary", "results", "progress", "config"];
|
|
222
|
-
function
|
|
223
|
-
return value !== null && value !== undefined && BOARD_TABS.includes(value);
|
|
224
|
-
}
|
|
225
|
-
function parseDeepLink(search) {
|
|
245
|
+
function parseDeepLink(search, tabs = BOARD_TABS, aliases = {}) {
|
|
226
246
|
const params = new URLSearchParams(search.startsWith("?") ? search.slice(1) : search);
|
|
227
247
|
const diagnostics = [];
|
|
228
248
|
const rawTab = params.get("tab");
|
|
229
249
|
const rawRun = params.get("run");
|
|
250
|
+
const known = tabs;
|
|
230
251
|
let tab;
|
|
231
252
|
if (rawTab !== null) {
|
|
232
|
-
|
|
253
|
+
const aliased = Object.hasOwn(aliases, rawTab) ? aliases[rawTab] : undefined;
|
|
254
|
+
if (known.includes(rawTab)) {
|
|
233
255
|
tab = rawTab;
|
|
256
|
+
} else if (aliased !== undefined && known.includes(aliased)) {
|
|
257
|
+
tab = aliased;
|
|
234
258
|
} else {
|
|
235
259
|
diagnostics.push({
|
|
236
260
|
code: "board.deeplink.unknown-tab",
|
|
237
|
-
message: `Unknown tab '${rawTab}'; showing
|
|
261
|
+
message: `Unknown tab '${rawTab}'; showing the default tab.`
|
|
238
262
|
});
|
|
239
263
|
}
|
|
240
264
|
}
|
|
@@ -248,8 +272,8 @@ function parseDeepLink(search) {
|
|
|
248
272
|
}
|
|
249
273
|
return { ...runId === undefined ? {} : { runId }, ...tab === undefined ? {} : { tab }, diagnostics };
|
|
250
274
|
}
|
|
251
|
-
function resolveSelection(rows, link) {
|
|
252
|
-
const tab = link.tab ??
|
|
275
|
+
function resolveSelection(rows, link, defaultTab = "summary") {
|
|
276
|
+
const tab = link.tab ?? defaultTab;
|
|
253
277
|
const diagnostics = [...link.diagnostics];
|
|
254
278
|
if (link.runId !== undefined) {
|
|
255
279
|
if (rows.some((row) => row.id === link.runId)) {
|