completion-kit 0.5.12 → 0.5.13
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0ec878fca14222f69bc34d85967b065b298ea669be11f60c49b52af13aefdfe5
|
|
4
|
+
data.tar.gz: 8211fc882175c1e69c52f2cba5a5e14668af4ddfc5784362252e8c051a59bee1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2afc081fde8f6722aadee50f973bc1512be15e5cbd19913881f0f38f06df37fee4f1cdbda54cfcb230892e73df7b27f6fdf537ea71df7da49ddfba39d2c9f644
|
|
7
|
+
data.tar.gz: 02cfae669de0b9a1f7a10bbedd7eecda8d708802ff85c1d8c6a50368fb49385e43f19b388f2ea45313b90e14a3d53464688b897ad23378964cfb55103bd3a8c2
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
html {
|
|
42
|
+
color-scheme: dark;
|
|
42
43
|
font-size: 18px;
|
|
43
44
|
line-height: 1.5;
|
|
44
45
|
scrollbar-gutter: stable;
|
|
@@ -1284,6 +1285,24 @@ tr:hover .ck-chip--publish {
|
|
|
1284
1285
|
line-height: 1.75;
|
|
1285
1286
|
}
|
|
1286
1287
|
|
|
1288
|
+
/* Scrollable code-block wrapper — caps height for big payloads. Inner
|
|
1289
|
+
<pre> drops its own border/radius so the wrapper owns the edge. We
|
|
1290
|
+
leave the scrollbar unstyled so it matches the browser/page scrollbar. */
|
|
1291
|
+
.ck-code-scroll-wrap {
|
|
1292
|
+
margin-top: 0.5rem;
|
|
1293
|
+
max-height: 28rem;
|
|
1294
|
+
overflow: auto;
|
|
1295
|
+
border: 1px solid var(--ck-line);
|
|
1296
|
+
border-radius: var(--ck-radius);
|
|
1297
|
+
background: var(--ck-bg-strong);
|
|
1298
|
+
}
|
|
1299
|
+
.ck-code-scroll-wrap > .ck-code {
|
|
1300
|
+
margin-top: 0;
|
|
1301
|
+
border: 0;
|
|
1302
|
+
border-radius: 0;
|
|
1303
|
+
background: transparent;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1287
1306
|
.ck-note-box {
|
|
1288
1307
|
background: var(--ck-surface-soft);
|
|
1289
1308
|
border: 1px solid var(--ck-line);
|
|
@@ -1873,22 +1892,7 @@ tr:hover .ck-chip--publish {
|
|
|
1873
1892
|
background: var(--ck-bg-strong);
|
|
1874
1893
|
overflow: auto;
|
|
1875
1894
|
max-height: 60vh;
|
|
1876
|
-
scrollbar-width: thin;
|
|
1877
|
-
scrollbar-color: var(--ck-line-strong) var(--ck-bg);
|
|
1878
1895
|
}
|
|
1879
|
-
.ck-csv-table-wrap::-webkit-scrollbar { width: 12px; height: 12px; background: var(--ck-bg); }
|
|
1880
|
-
.ck-csv-table-wrap::-webkit-scrollbar-track {
|
|
1881
|
-
background: var(--ck-bg);
|
|
1882
|
-
border-left: 1px solid var(--ck-line);
|
|
1883
|
-
border-top: 1px solid var(--ck-line);
|
|
1884
|
-
}
|
|
1885
|
-
.ck-csv-table-wrap::-webkit-scrollbar-thumb {
|
|
1886
|
-
background: var(--ck-line-strong);
|
|
1887
|
-
border-radius: 6px;
|
|
1888
|
-
border: 3px solid var(--ck-bg);
|
|
1889
|
-
}
|
|
1890
|
-
.ck-csv-table-wrap::-webkit-scrollbar-thumb:hover { background: var(--ck-muted); }
|
|
1891
|
-
.ck-csv-table-wrap::-webkit-scrollbar-corner { background: var(--ck-bg); }
|
|
1892
1896
|
|
|
1893
1897
|
.ck-modal__body .ck-csv-table-wrap {
|
|
1894
1898
|
margin-top: 0;
|
|
@@ -3197,6 +3201,7 @@ a.ck-metric-group-pill {
|
|
|
3197
3201
|
white-space: nowrap;
|
|
3198
3202
|
}
|
|
3199
3203
|
|
|
3204
|
+
|
|
3200
3205
|
.ck-runs-table th {
|
|
3201
3206
|
vertical-align: middle;
|
|
3202
3207
|
white-space: nowrap;
|
|
@@ -3208,21 +3213,44 @@ a.ck-metric-group-pill {
|
|
|
3208
3213
|
padding-bottom: 0.7rem;
|
|
3209
3214
|
}
|
|
3210
3215
|
|
|
3216
|
+
.ck-runs-table th:first-child,
|
|
3217
|
+
.ck-runs-table td:first-child {
|
|
3218
|
+
width: 1%;
|
|
3219
|
+
}
|
|
3220
|
+
|
|
3211
3221
|
.ck-runs-table th:nth-child(n+2),
|
|
3212
3222
|
.ck-runs-table td:nth-child(n+2) {
|
|
3213
3223
|
width: 1%;
|
|
3214
3224
|
white-space: nowrap;
|
|
3215
3225
|
}
|
|
3216
3226
|
|
|
3227
|
+
.ck-runs-table th:last-child,
|
|
3228
|
+
.ck-runs-table td:last-child {
|
|
3229
|
+
width: auto;
|
|
3230
|
+
}
|
|
3231
|
+
|
|
3217
3232
|
.ck-runs-table__identity {
|
|
3218
3233
|
display: flex;
|
|
3219
3234
|
flex-direction: column;
|
|
3220
3235
|
gap: 0.25rem;
|
|
3221
3236
|
min-width: 0;
|
|
3237
|
+
width: 27rem;
|
|
3238
|
+
max-width: 100%;
|
|
3222
3239
|
}
|
|
3223
3240
|
|
|
3224
3241
|
.ck-runs-table .ck-run-name {
|
|
3225
3242
|
line-height: 1.2;
|
|
3243
|
+
display: flex;
|
|
3244
|
+
align-items: center;
|
|
3245
|
+
gap: 0.5rem;
|
|
3246
|
+
min-width: 0;
|
|
3247
|
+
}
|
|
3248
|
+
|
|
3249
|
+
.ck-runs-table .ck-run-name strong {
|
|
3250
|
+
overflow: hidden;
|
|
3251
|
+
text-overflow: ellipsis;
|
|
3252
|
+
white-space: nowrap;
|
|
3253
|
+
min-width: 0;
|
|
3226
3254
|
}
|
|
3227
3255
|
|
|
3228
3256
|
.ck-runs-table__config {
|
|
@@ -179,6 +179,18 @@ module CompletionKit
|
|
|
179
179
|
["tag", "tag-#{tag.color}", ("tag-outline" if outline)].compact.join(" ")
|
|
180
180
|
end
|
|
181
181
|
|
|
182
|
+
def ck_format_maybe_json(text)
|
|
183
|
+
s = text.to_s
|
|
184
|
+
return s if s.strip.empty?
|
|
185
|
+
first = s.strip[0]
|
|
186
|
+
return s unless first == "{" || first == "["
|
|
187
|
+
begin
|
|
188
|
+
JSON.pretty_generate(JSON.parse(s))
|
|
189
|
+
rescue JSON::ParserError
|
|
190
|
+
s
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
|
|
182
194
|
def tag_filter_url(base_path, selected, toggling)
|
|
183
195
|
remaining = selected.reject { |t| t.id == toggling.id }
|
|
184
196
|
next_set = selected.include?(toggling) ? remaining : remaining + [toggling]
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
|
|
68
68
|
<section>
|
|
69
69
|
<p class="ck-kicker">Input</p>
|
|
70
|
-
<
|
|
70
|
+
<div class="ck-code-scroll-wrap"><pre class="ck-code"><%= ck_format_maybe_json(@response.input_data) %></pre></div>
|
|
71
71
|
</section>
|
|
72
72
|
|
|
73
73
|
<section class="ck-card--spaced">
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
<span class="ck-chip ck-chip--soft" style="text-transform: none;"><%= @run.prompt.llm_model %></span>
|
|
78
78
|
<% end %>
|
|
79
79
|
</div>
|
|
80
|
-
<pre class="ck-code"><%= @response.response_text %></pre>
|
|
80
|
+
<div class="ck-code-scroll-wrap"><pre class="ck-code"><%= ck_format_maybe_json(@response.response_text) %></pre></div>
|
|
81
81
|
</section>
|
|
82
82
|
|
|
83
83
|
<% if @response.expected_output.present? %>
|
|
84
84
|
<section class="ck-card--spaced">
|
|
85
85
|
<p class="ck-kicker">Expected</p>
|
|
86
|
-
<pre class="ck-code"><%= @response.expected_output %></pre>
|
|
86
|
+
<div class="ck-code-scroll-wrap"><pre class="ck-code"><%= ck_format_maybe_json(@response.expected_output) %></pre></div>
|
|
87
87
|
</section>
|
|
88
88
|
<% end %>
|
|
89
89
|
|