completion-kit 0.28.8 → 0.28.9
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: d8c0966124eec13a8ab4f91dae2c0f592ed5b2147efc6cfe41c43bd3bbc2b88c
|
|
4
|
+
data.tar.gz: e6d8c475875979668fe7856c6a035f0070c7e6f0485e3cbcc73c30740eb0feb6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 383719e92a5353355beb243b136911cbce1965a26a5e0f5830e7c61e7b68743ed2d24a65512aa8724deef0da1f44204c293437bfd67ab76e80c2f317ddc50d89
|
|
7
|
+
data.tar.gz: 970823682d45586018b0ee93b36b3b4abbb6af8f680ab6ab3502c5a751d74b55c6c1af95570c0869ee1a7a6032dfac75d5277de4136c4c7dc9638e922645b6a1
|
|
@@ -289,8 +289,16 @@ form.button_to {
|
|
|
289
289
|
.ck-pagination {
|
|
290
290
|
display: flex;
|
|
291
291
|
align-items: center;
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
justify-content: center;
|
|
293
|
+
gap: 1.25rem;
|
|
294
|
+
margin-top: 1.25rem;
|
|
295
|
+
padding-top: 1rem;
|
|
296
|
+
border-top: 1px solid var(--ck-line);
|
|
297
|
+
}
|
|
298
|
+
.ck-pagination .ck-meta-copy {
|
|
299
|
+
margin: 0;
|
|
300
|
+
min-width: 14rem;
|
|
301
|
+
text-align: center;
|
|
294
302
|
}
|
|
295
303
|
|
|
296
304
|
.ck-title,
|
|
@@ -11,6 +11,7 @@ module CompletionKit
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
RESPONSES_PER_PAGE = 100
|
|
14
|
+
RESPONSE_PREVIEW_CHARS = 700
|
|
14
15
|
|
|
15
16
|
def show
|
|
16
17
|
@responses_total = @run.responses.count
|
|
@@ -19,6 +20,7 @@ module CompletionKit
|
|
|
19
20
|
@responses_page = params[:page].to_s.to_i.clamp(1, @responses_total_pages)
|
|
20
21
|
@responses_offset = (@responses_page - 1) * RESPONSES_PER_PAGE
|
|
21
22
|
@responses = ordered_responses_relation(@run, params[:sort])
|
|
23
|
+
.with_body_preview(RESPONSE_PREVIEW_CHARS)
|
|
22
24
|
.includes(:reviews)
|
|
23
25
|
.limit(RESPONSES_PER_PAGE)
|
|
24
26
|
.offset(@responses_offset)
|
|
@@ -8,6 +8,11 @@ module CompletionKit
|
|
|
8
8
|
|
|
9
9
|
delegate :prompt, to: :run
|
|
10
10
|
|
|
11
|
+
scope :with_body_preview, ->(limit) {
|
|
12
|
+
other_columns = (column_names - ["response_text"]).map { |column| "#{table_name}.#{column}" }
|
|
13
|
+
select(*other_columns, "SUBSTR(#{table_name}.response_text, 1, #{limit.to_i}) AS response_text")
|
|
14
|
+
}
|
|
15
|
+
|
|
11
16
|
validates :response_text, presence: true, if: :requires_response_text?
|
|
12
17
|
|
|
13
18
|
before_validation :set_default_status, on: :create
|