completion-kit 0.26.0 → 0.26.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0e0435edbf9ccffb90715ab2d16fca2d158ad8e81767d550c3290c61a18de5ef
|
|
4
|
+
data.tar.gz: 365c545d14c7e9795f822cbda48d88327d70ea2b825276a4cb3b5e57b3ca2f6d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 046de8a9141dcd65497cde60b4fe5fae8cae31c7813f1c973469e4294a531292414d035979e1594e56829a0c3e81fd13eacd6d59221da9b8009a0f29574f38ba
|
|
7
|
+
data.tar.gz: 913f8ccbf9a907c958a29bd8e6af9c272d3fb55e4b1dd526c51dc4fc310fa20a06901818665adc09fa2ce440f141feb0d751f84b3a2bcaf2938c6183ff78cd9c
|
|
@@ -21,7 +21,8 @@ module CompletionKit
|
|
|
21
21
|
if error.is_a?(CompletionKit::ModelDiscoveryService::DiscoveryError)
|
|
22
22
|
Rails.error.report(error, handled: true, context: { job: self.class.name, provider_credential_id: arguments.first })
|
|
23
23
|
end
|
|
24
|
-
credential = ProviderCredential.
|
|
24
|
+
credential = ProviderCredential.find_by(id: arguments.first)
|
|
25
|
+
next unless credential
|
|
25
26
|
credential.update_columns(discovery_status: "failed", discovery_error: error.message.to_s.truncate(500))
|
|
26
27
|
credential.reload
|
|
27
28
|
credential.broadcast_discovery_progress
|
|
@@ -34,21 +34,7 @@
|
|
|
34
34
|
<%= ck_field_error(form, :api_version) %>
|
|
35
35
|
</div>
|
|
36
36
|
|
|
37
|
-
<% if provider_credential.persisted? && provider_credential.in_use? %>
|
|
38
|
-
<p class="ck-field-hint"><%= provider_credential.in_use_message %></p>
|
|
39
|
-
<% end %>
|
|
40
|
-
|
|
41
37
|
<div class="ck-actions">
|
|
42
|
-
<% if provider_credential.persisted? && !provider_credential.in_use? %>
|
|
43
|
-
<%= button_to provider_credential_path(provider_credential), method: :delete,
|
|
44
|
-
form_class: "inline-block",
|
|
45
|
-
class: "ck-icon-btn",
|
|
46
|
-
title: "Delete provider",
|
|
47
|
-
"aria-label": "Delete provider",
|
|
48
|
-
data: { turbo_confirm: "Delete the #{provider_credential.display_provider} provider and its discovered models? This can't be undone." } do %>
|
|
49
|
-
<%= heroicon_tag "trash", variant: :outline, size: 16, "aria-hidden": "true" %>
|
|
50
|
-
<% end %>
|
|
51
|
-
<% end %>
|
|
52
38
|
<%= link_to "Cancel", provider_credentials_path, class: ck_button_classes(:light, variant: :outline), tabindex: "0" %>
|
|
53
39
|
<%= form.submit(provider_credential.persisted? ? "Save provider" : "Create provider", class: ck_button_classes(:dark)) %>
|
|
54
40
|
</div>
|
|
@@ -56,6 +42,23 @@
|
|
|
56
42
|
</div>
|
|
57
43
|
<% end %>
|
|
58
44
|
|
|
45
|
+
<% if provider_credential.persisted? %>
|
|
46
|
+
<% if provider_credential.in_use? %>
|
|
47
|
+
<p class="ck-field-hint"><%= provider_credential.in_use_message %></p>
|
|
48
|
+
<% else %>
|
|
49
|
+
<div class="ck-actions">
|
|
50
|
+
<%= button_to provider_credential_path(provider_credential), method: :delete,
|
|
51
|
+
form_class: "inline-block",
|
|
52
|
+
class: "ck-icon-btn",
|
|
53
|
+
title: "Delete provider",
|
|
54
|
+
"aria-label": "Delete provider",
|
|
55
|
+
data: { turbo_confirm: "Delete the #{provider_credential.display_provider} provider and its discovered models? This can't be undone." } do %>
|
|
56
|
+
<%= heroicon_tag "trash", variant: :outline, size: 16, "aria-hidden": "true" %>
|
|
57
|
+
<% end %>
|
|
58
|
+
</div>
|
|
59
|
+
<% end %>
|
|
60
|
+
<% end %>
|
|
61
|
+
|
|
59
62
|
<% if provider_credential.persisted? %>
|
|
60
63
|
<%= turbo_stream_from "completion_kit_provider_#{provider_credential.id}" %>
|
|
61
64
|
<div data-ck-statuses-url="<%= statuses_provider_credentials_path %>">
|