completion-kit 0.28.15 → 0.28.16
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: 73425cba956dc09f3a16e93b78cd3d64ca5f840ccf0c9dbd86bdf99adfafe1a3
|
|
4
|
+
data.tar.gz: 480da4d4bb8491e780bbe81f97031259f50148efbbd29c8e1ae1ae1d0878fca8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e26ab2bc7b435f18d89d6a68799c4b7f24ae8d8733e7db89ed309bf79ae4785b2e82d31ab94fc8b838c7a257e62909c5b4ab7ed303d10019c423577fdb4f8d58
|
|
7
|
+
data.tar.gz: 82a4cffb2ebf3205cba3b09756c6d3e753ab28777f578be0e08cc092e00fa661ec7109ce567e451e2945e8b651a86c593e556afd219f328051dfddbf2894915d
|
|
@@ -4554,6 +4554,12 @@ table.ck-runs-table {
|
|
|
4554
4554
|
border-radius: 0 var(--ck-radius) var(--ck-radius) 0;
|
|
4555
4555
|
}
|
|
4556
4556
|
|
|
4557
|
+
.ck-suggest-caveat {
|
|
4558
|
+
margin: 0 0 0.6rem;
|
|
4559
|
+
color: var(--ck-warning);
|
|
4560
|
+
font-size: 0.85rem;
|
|
4561
|
+
}
|
|
4562
|
+
|
|
4557
4563
|
.ck-suggest-reasoning .ck-kicker {
|
|
4558
4564
|
margin-bottom: 0.5rem;
|
|
4559
4565
|
}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
module CompletionKit
|
|
2
2
|
module ApplicationHelper
|
|
3
|
+
def ck_markdown(text)
|
|
4
|
+
return "".html_safe if text.blank?
|
|
5
|
+
|
|
6
|
+
inline = text.to_s
|
|
7
|
+
.gsub(/\*\*(.+?)\*\*/, '<strong>\1</strong>')
|
|
8
|
+
.gsub(/`([^`]+)`/, '<code>\1</code>')
|
|
9
|
+
simple_format(inline)
|
|
10
|
+
end
|
|
11
|
+
|
|
3
12
|
def ck_runs_display_footer(runs)
|
|
4
13
|
partial = CompletionKit.config.runs_display_footer_partial
|
|
5
14
|
return unless partial
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
<% end %>
|
|
17
17
|
|
|
18
18
|
<div class="ck-suggest-reasoning">
|
|
19
|
-
<p class="ck-kicker">
|
|
20
|
-
<div class="ck-suggest-reasoning__body"><%=
|
|
19
|
+
<p class="ck-kicker">Reasons for suggested changes</p>
|
|
20
|
+
<div class="ck-suggest-reasoning__body"><%= ck_markdown(suggestion.reasoning) %></div>
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
23
|
<div class="ck-suggest-diff">
|
|
@@ -41,6 +41,14 @@
|
|
|
41
41
|
<pre class="ck-code ck-code--dark"><%= suggestion.suggested_template %></pre>
|
|
42
42
|
</div>
|
|
43
43
|
|
|
44
|
+
<% unless suggestion.applied_at? %>
|
|
45
|
+
<% if !suggestion.validated? %>
|
|
46
|
+
<p class="ck-suggest-caveat">Couldn't be re-scored against this run's responses, so applying it is unvalidated.</p>
|
|
47
|
+
<% elsif suggestion.net_negative? %>
|
|
48
|
+
<% vs = suggestion.validation_summary %>
|
|
49
|
+
<p class="ck-suggest-caveat">Scored <%= vs["after_avg"] %> on the held-out responses, below your original's <%= vs["before_avg"] %>.</p>
|
|
50
|
+
<% end %>
|
|
51
|
+
<% end %>
|
|
44
52
|
<div class="ck-actions">
|
|
45
53
|
<% if suggestion.applied_at? %>
|
|
46
54
|
<span class="ck-chip" style="background: var(--ck-success-soft); color: var(--ck-success);">Applied</span>
|