CodeBold
+ -
+
- Visit the preferences centre here > https://external.com +
diff --git a/app/controllers/api/v1/accounts/search_controller.rb b/app/controllers/api/v1/accounts/search_controller.rb
index 35979f70f..13e3a6a6c 100644
--- a/app/controllers/api/v1/accounts/search_controller.rb
+++ b/app/controllers/api/v1/accounts/search_controller.rb
@@ -15,6 +15,10 @@ class Api::V1::Accounts::SearchController < Api::V1::Accounts::BaseController
@result = search('Message')
end
+ def articles
+ @result = search('Article')
+ end
+
private
def search(search_type)
diff --git a/app/javascript/dashboard/api/captain/copilotMessages.js b/app/javascript/dashboard/api/captain/copilotMessages.js
new file mode 100644
index 000000000..49e05398a
--- /dev/null
+++ b/app/javascript/dashboard/api/captain/copilotMessages.js
@@ -0,0 +1,18 @@
+/* global axios */
+import ApiClient from '../ApiClient';
+
+class CopilotMessages extends ApiClient {
+ constructor() {
+ super('captain/copilot_threads', { accountScoped: true });
+ }
+
+ get(threadId) {
+ return axios.get(`${this.url}/${threadId}/copilot_messages`);
+ }
+
+ create({ threadId, ...rest }) {
+ return axios.post(`${this.url}/${threadId}/copilot_messages`, rest);
+ }
+}
+
+export default new CopilotMessages();
diff --git a/app/javascript/dashboard/api/captain/copilotThreads.js b/app/javascript/dashboard/api/captain/copilotThreads.js
new file mode 100644
index 000000000..7fdce3b91
--- /dev/null
+++ b/app/javascript/dashboard/api/captain/copilotThreads.js
@@ -0,0 +1,9 @@
+import ApiClient from '../ApiClient';
+
+class CopilotThreads extends ApiClient {
+ constructor() {
+ super('captain/copilot_threads', { accountScoped: true });
+ }
+}
+
+export default new CopilotThreads();
diff --git a/app/javascript/dashboard/api/search.js b/app/javascript/dashboard/api/search.js
index 7abb584c0..d533c2f28 100644
--- a/app/javascript/dashboard/api/search.js
+++ b/app/javascript/dashboard/api/search.js
@@ -40,6 +40,15 @@ class SearchAPI extends ApiClient {
},
});
}
+
+ articles({ q, page = 1 }) {
+ return axios.get(`${this.url}/articles`, {
+ params: {
+ q,
+ page: page,
+ },
+ });
+ }
}
export default new SearchAPI();
diff --git a/app/javascript/dashboard/components-next/message/bubbles/BaseAttachment.vue b/app/javascript/dashboard/components-next/message/bubbles/BaseAttachment.vue
index a4e4aa729..a573e7868 100644
--- a/app/javascript/dashboard/components-next/message/bubbles/BaseAttachment.vue
+++ b/app/javascript/dashboard/components-next/message/bubbles/BaseAttachment.vue
@@ -40,7 +40,7 @@ const senderName = computed(() => {
+ {{ truncatedContent }} +
+CodeBold
+