@kingsoftcloud/agentkit-harness-ui 0.0.0-stage → 0.0.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/LICENSE +201 -0
- package/NOTICE +116 -0
- package/README.md +292 -2
- package/markdown/build/build-markdown.cjs +66 -0
- package/markdown/dist/THIRD_PARTY_LICENSES.txt +2993 -0
- package/markdown/dist/markdown.css +1 -0
- package/markdown/dist/markdown.mjs +325 -0
- package/markdown/source/markdown-factory.mjs +613 -0
- package/markdown/source/markdown.css +288 -0
- package/markdown/source/table-factory.mjs +1588 -0
- package/markdown/source/table.css +487 -0
- package/package.json +96 -4
- package/src/activity-groups.mjs +74 -0
- package/src/browser-response-groups.mjs +57 -0
- package/src/command-output.mjs +57 -0
- package/src/components.mjs +9 -0
- package/src/context-markers.mjs +19 -0
- package/src/context-status.mjs +34 -0
- package/src/diff.mjs +240 -0
- package/src/explore-tool-call.mjs +139 -0
- package/src/file-preview.mjs +50 -0
- package/src/host/native-a2a.mjs +90 -0
- package/src/host/native-child-file-pane.mjs +49 -0
- package/src/host/native-child-pane.mjs +94 -0
- package/src/host/native-command-pane.mjs +64 -0
- package/src/host/native-run-panel.mjs +202 -0
- package/src/host/session-task-events.mjs +247 -0
- package/src/host/state/native-a2a.mjs +122 -0
- package/src/host/state/native-child-observation.mjs +35 -0
- package/src/host/state/native-children.mjs +93 -0
- package/src/host/state/native-outcome.mjs +35 -0
- package/src/host/state/native-recovery.mjs +187 -0
- package/src/host/state/native-runtime-route.mjs +26 -0
- package/src/host/state/native-session-stop.mjs +40 -0
- package/src/host/state/native-status-panel.mjs +23 -0
- package/src/host/state/native-task-read-model.mjs +89 -0
- package/src/host/state/task-links.mjs +40 -0
- package/src/host/task-timeline.mjs +185 -0
- package/src/index.mjs +52 -0
- package/src/input-preview.mjs +44 -0
- package/src/inspector.mjs +40 -0
- package/src/project.mjs +132 -0
- package/src/protocol.mjs +362 -0
- package/src/react-binding.mjs +486 -0
- package/src/reducer.mjs +355 -0
- package/src/renderers.mjs +644 -0
- package/src/status-panel.mjs +1156 -0
- package/src/styles.mjs +278 -0
- package/src/summary-playback.mjs +39 -0
- package/src/summary.mjs +160 -0
- package/src/terminal.mjs +157 -0
- package/src/tool-detail.mjs +208 -0
- package/src/tool-error.mjs +33 -0
- package/src/tool-identity.mjs +40 -0
- package/src/view.mjs +364 -0
- package/src/work-segments.mjs +41 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/* @kingsoftcloud/agentkit-harness-ui/markdown — layer stylesheet.
|
|
2
|
+
*
|
|
3
|
+
* Bundled (build-markdown.cjs) on top of streamdown/styles.css. Streamdown's
|
|
4
|
+
* default components emit semantic tags (h1, table, tr, …) plus Tailwind
|
|
5
|
+
* utility classes and `data-streamdown="…"` attributes. The harness-ui host
|
|
6
|
+
* does not ship Tailwind, so those utilities are inert; this stylesheet
|
|
7
|
+
* restyles the rendered Markdown with stable, theme-aware rules keyed on the
|
|
8
|
+
* `.ks-markdown` wrapper. Code blocks are rendered by the layer's own stable
|
|
9
|
+
* CodeBlock (ks-md-* classes), not Streamdown's default code renderer. No
|
|
10
|
+
* Tailwind dependency is introduced. */
|
|
11
|
+
|
|
12
|
+
@import "streamdown/styles.css";
|
|
13
|
+
@import "./table.css";
|
|
14
|
+
|
|
15
|
+
.ks-markdown {
|
|
16
|
+
--ks-fg: #1f2328;
|
|
17
|
+
--ks-fg-muted: #59636e;
|
|
18
|
+
--ks-bg: #ffffff;
|
|
19
|
+
--ks-bg-soft: #f6f8fa;
|
|
20
|
+
--ks-border: #d0d7de;
|
|
21
|
+
--ks-inline-bg: rgba(175, 184, 193, 0.2);
|
|
22
|
+
--ks-link: #0969da;
|
|
23
|
+
--ks-code-bg: #f6f8fa;
|
|
24
|
+
--ks-code-header-bg: #f6f8fa;
|
|
25
|
+
--ks-code-border: #d0d7de;
|
|
26
|
+
--ks-th-bg: #f6f8fa;
|
|
27
|
+
--ks-quote-fg: #59636e;
|
|
28
|
+
--ks-quote-bar: #d0d7de;
|
|
29
|
+
--ks-copied: #1a7f37;
|
|
30
|
+
color: var(--ks-fg);
|
|
31
|
+
background: transparent;
|
|
32
|
+
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
|
|
33
|
+
"Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
|
34
|
+
font-size: var(--ui-font-size, 14px);
|
|
35
|
+
white-space: normal;
|
|
36
|
+
line-height: 1.7;
|
|
37
|
+
overflow-wrap: anywhere;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ks-markdown *,
|
|
42
|
+
.ks-markdown *::before,
|
|
43
|
+
.ks-markdown *::after {
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ks-markdown.ks-theme-dark {
|
|
48
|
+
--ks-fg: #e6edf3;
|
|
49
|
+
--ks-fg-muted: #9198a1;
|
|
50
|
+
--ks-bg: #0d1117;
|
|
51
|
+
--ks-bg-soft: #161b22;
|
|
52
|
+
--ks-border: #30363d;
|
|
53
|
+
--ks-inline-bg: rgba(110, 118, 129, 0.4);
|
|
54
|
+
--ks-link: #4493f8;
|
|
55
|
+
--ks-code-bg: #161b22;
|
|
56
|
+
--ks-code-header-bg: #161b22;
|
|
57
|
+
--ks-code-border: #30363d;
|
|
58
|
+
--ks-th-bg: #161b22;
|
|
59
|
+
--ks-quote-fg: #9198a1;
|
|
60
|
+
--ks-quote-bar: #30363d;
|
|
61
|
+
--ks-copied: #4ac26b;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@media (prefers-color-scheme: dark) {
|
|
65
|
+
.ks-markdown:not(.ks-theme-light) {
|
|
66
|
+
--ks-fg: #e6edf3;
|
|
67
|
+
--ks-fg-muted: #9198a1;
|
|
68
|
+
--ks-bg: #0d1117;
|
|
69
|
+
--ks-bg-soft: #161b22;
|
|
70
|
+
--ks-border: #30363d;
|
|
71
|
+
--ks-inline-bg: rgba(110, 118, 129, 0.4);
|
|
72
|
+
--ks-link: #4493f8;
|
|
73
|
+
--ks-code-bg: #161b22;
|
|
74
|
+
--ks-code-header-bg: #161b22;
|
|
75
|
+
--ks-code-border: #30363d;
|
|
76
|
+
--ks-th-bg: #161b22;
|
|
77
|
+
--ks-quote-fg: #9198a1;
|
|
78
|
+
--ks-quote-bar: #30363d;
|
|
79
|
+
--ks-copied: #4ac26b;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ks-markdown > :first-child,
|
|
84
|
+
.ks-markdown .ks-markdown-body > :first-child {
|
|
85
|
+
margin-top: 0;
|
|
86
|
+
}
|
|
87
|
+
.ks-markdown > :last-child,
|
|
88
|
+
.ks-markdown .ks-markdown-body > :last-child {
|
|
89
|
+
margin-bottom: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ks-markdown p {
|
|
93
|
+
margin: 0 0 12px;
|
|
94
|
+
}
|
|
95
|
+
.ks-markdown h1 {
|
|
96
|
+
margin: 24px 0 16px;
|
|
97
|
+
font-size: 1.5em;
|
|
98
|
+
font-weight: 600;
|
|
99
|
+
line-height: 1.3;
|
|
100
|
+
}
|
|
101
|
+
.ks-markdown h2 {
|
|
102
|
+
margin: 24px 0 16px;
|
|
103
|
+
font-size: 1.3em;
|
|
104
|
+
font-weight: 600;
|
|
105
|
+
line-height: 1.3;
|
|
106
|
+
}
|
|
107
|
+
.ks-markdown h3 {
|
|
108
|
+
margin: 24px 0 12px;
|
|
109
|
+
font-size: 1.15em;
|
|
110
|
+
font-weight: 600;
|
|
111
|
+
line-height: 1.3;
|
|
112
|
+
}
|
|
113
|
+
.ks-markdown h4,
|
|
114
|
+
.ks-markdown h5,
|
|
115
|
+
.ks-markdown h6 {
|
|
116
|
+
margin: 20px 0 10px;
|
|
117
|
+
font-size: 1em;
|
|
118
|
+
font-weight: 600;
|
|
119
|
+
line-height: 1.3;
|
|
120
|
+
}
|
|
121
|
+
.ks-markdown ul,
|
|
122
|
+
.ks-markdown ol {
|
|
123
|
+
margin: 0 0 12px;
|
|
124
|
+
padding-left: 1.6em;
|
|
125
|
+
}
|
|
126
|
+
.ks-markdown li {
|
|
127
|
+
margin: 2px 0;
|
|
128
|
+
}
|
|
129
|
+
.ks-markdown blockquote {
|
|
130
|
+
margin: 0 0 12px;
|
|
131
|
+
padding: 0 0 0 14px;
|
|
132
|
+
color: var(--ks-quote-fg);
|
|
133
|
+
border-left: 3px solid var(--ks-quote-bar);
|
|
134
|
+
}
|
|
135
|
+
.ks-markdown blockquote > :first-child {
|
|
136
|
+
margin-top: 0;
|
|
137
|
+
}
|
|
138
|
+
.ks-markdown blockquote > :last-child {
|
|
139
|
+
margin-bottom: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Inline code (our `code` override, non-block branch). */
|
|
143
|
+
.ks-md-inline-code {
|
|
144
|
+
margin: 0 1px;
|
|
145
|
+
padding: 0.1em 0.4em;
|
|
146
|
+
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
|
|
147
|
+
monospace;
|
|
148
|
+
font-size: 0.875em;
|
|
149
|
+
background: var(--ks-inline-bg);
|
|
150
|
+
border-radius: 6px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Links. External/file links become buttons (ks-md-link); untrusted targets
|
|
154
|
+
* render as a non-clickable muted span. */
|
|
155
|
+
.ks-md-link,
|
|
156
|
+
.ks-md-link-muted {
|
|
157
|
+
color: var(--ks-link);
|
|
158
|
+
text-decoration: none;
|
|
159
|
+
}
|
|
160
|
+
.ks-md-link {
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
background: transparent;
|
|
163
|
+
border: 0;
|
|
164
|
+
padding: 0;
|
|
165
|
+
font: inherit;
|
|
166
|
+
}
|
|
167
|
+
.ks-md-link:hover,
|
|
168
|
+
.ks-md-link-muted:hover {
|
|
169
|
+
text-decoration: underline;
|
|
170
|
+
}
|
|
171
|
+
.ks-md-link-muted {
|
|
172
|
+
cursor: default;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.ks-markdown img {
|
|
176
|
+
max-width: 100%;
|
|
177
|
+
height: auto;
|
|
178
|
+
border-radius: 6px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* GFM tables are rendered by the layer's own Markdown table component
|
|
182
|
+
* (table-factory.mjs → table.css, ks-md-table-* classes), not Streamdown's
|
|
183
|
+
* default table renderer. The old element-level table rules are removed so
|
|
184
|
+
* they cannot override the component's scoped layout (e.g. display:block /
|
|
185
|
+
* overflow:auto on the <table> itself would fight the scroll viewport). */
|
|
186
|
+
|
|
187
|
+
/* Stable CodeBlock (rendered by the layer, not Streamdown's default). */
|
|
188
|
+
.ks-md-code {
|
|
189
|
+
margin: 12px 0;
|
|
190
|
+
border: 1px solid var(--ks-code-border);
|
|
191
|
+
border-radius: 8px;
|
|
192
|
+
background: var(--ks-code-bg);
|
|
193
|
+
overflow: hidden;
|
|
194
|
+
}
|
|
195
|
+
.ks-md-code-header {
|
|
196
|
+
display: flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
justify-content: space-between;
|
|
199
|
+
gap: 8px;
|
|
200
|
+
padding: 6px 12px;
|
|
201
|
+
background: var(--ks-code-header-bg);
|
|
202
|
+
border-bottom: 1px solid var(--ks-code-border);
|
|
203
|
+
font-size: 0.8125em;
|
|
204
|
+
color: var(--ks-fg-muted);
|
|
205
|
+
}
|
|
206
|
+
.ks-md-code-lang {
|
|
207
|
+
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
208
|
+
text-transform: lowercase;
|
|
209
|
+
}
|
|
210
|
+
.ks-md-code-actions {
|
|
211
|
+
display: inline-flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
gap: 6px;
|
|
214
|
+
}
|
|
215
|
+
.ks-md-copy,
|
|
216
|
+
.ks-md-wrap {
|
|
217
|
+
appearance: none;
|
|
218
|
+
background: transparent;
|
|
219
|
+
border: 1px solid var(--ks-border);
|
|
220
|
+
border-radius: 6px;
|
|
221
|
+
padding: 2px 8px;
|
|
222
|
+
font-size: inherit;
|
|
223
|
+
font-family: inherit;
|
|
224
|
+
color: var(--ks-fg-muted);
|
|
225
|
+
cursor: pointer;
|
|
226
|
+
line-height: 1.4;
|
|
227
|
+
}
|
|
228
|
+
.ks-md-copy:hover,
|
|
229
|
+
.ks-md-wrap:hover {
|
|
230
|
+
background: var(--ks-bg-soft);
|
|
231
|
+
color: var(--ks-fg);
|
|
232
|
+
}
|
|
233
|
+
.ks-md-copy[data-copied="true"] {
|
|
234
|
+
color: var(--ks-copied);
|
|
235
|
+
border-color: var(--ks-copied);
|
|
236
|
+
}
|
|
237
|
+
.ks-md-wrap[data-wrapped="true"] {
|
|
238
|
+
background: var(--ks-bg-soft);
|
|
239
|
+
color: var(--ks-fg);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.ks-md-pre {
|
|
243
|
+
margin: 0;
|
|
244
|
+
padding: 12px 14px;
|
|
245
|
+
background: var(--sdm-bg, var(--ks-code-bg));
|
|
246
|
+
color: var(--sdm-fg, var(--ks-fg));
|
|
247
|
+
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
|
|
248
|
+
monospace;
|
|
249
|
+
font-size: 0.875em;
|
|
250
|
+
line-height: 1.5;
|
|
251
|
+
overflow-x: auto;
|
|
252
|
+
}
|
|
253
|
+
.ks-md-pre code {
|
|
254
|
+
font-family: inherit;
|
|
255
|
+
background: transparent;
|
|
256
|
+
padding: 0;
|
|
257
|
+
white-space: pre;
|
|
258
|
+
}
|
|
259
|
+
.ks-md-pre-wrap {
|
|
260
|
+
white-space: pre-wrap;
|
|
261
|
+
word-break: break-word;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/* shiki dual-theme tokens. Light uses --sdm-c; dark uses --shiki-dark. The
|
|
265
|
+
* token span style carries --sdm-c (from htmlStyle.color) and --shiki-dark
|
|
266
|
+
* (from htmlStyle["--shiki-dark"]); bg via --sdm-tbg / --shiki-dark-bg. */
|
|
267
|
+
.ks-md-token {
|
|
268
|
+
color: var(--sdm-c, inherit);
|
|
269
|
+
background: var(--sdm-tbg, transparent);
|
|
270
|
+
}
|
|
271
|
+
.ks-markdown.ks-theme-dark .ks-md-pre {
|
|
272
|
+
background: var(--shiki-dark-bg, var(--sdm-bg, var(--ks-code-bg)));
|
|
273
|
+
color: var(--shiki-dark, var(--sdm-fg, var(--ks-fg)));
|
|
274
|
+
}
|
|
275
|
+
.ks-markdown.ks-theme-dark .ks-md-token {
|
|
276
|
+
color: var(--shiki-dark, var(--sdm-c, inherit));
|
|
277
|
+
background: var(--shiki-dark-bg, var(--sdm-tbg, transparent));
|
|
278
|
+
}
|
|
279
|
+
@media (prefers-color-scheme: dark) {
|
|
280
|
+
.ks-markdown:not(.ks-theme-light) .ks-md-pre {
|
|
281
|
+
background: var(--shiki-dark-bg, var(--sdm-bg, var(--ks-code-bg)));
|
|
282
|
+
color: var(--shiki-dark, var(--sdm-fg, var(--ks-fg)));
|
|
283
|
+
}
|
|
284
|
+
.ks-markdown:not(.ks-theme-light) .ks-md-token {
|
|
285
|
+
color: var(--shiki-dark, var(--sdm-c, inherit));
|
|
286
|
+
background: var(--shiki-dark-bg, var(--sdm-tbg, transparent));
|
|
287
|
+
}
|
|
288
|
+
}
|