diff --git a/src/khoj/interface/web/chat.html b/src/khoj/interface/web/chat.html index e998836e..56cc99d8 100644 --- a/src/khoj/interface/web/chat.html +++ b/src/khoj/interface/web/chat.html @@ -84,12 +84,21 @@ window.onload = function () { fetch('/api/chat?client=web') .then(response => response.json()) - .then(data => data.response) - .then(chat_logs => { + .then(data => { + if (data.detail) { + // If the server returns a 500 error with detail, render it as a message. + renderMessage(data.detail + " You can configure Khoj chat in your settings.", "khoj"); + } + return data.response; + }) + .then(response => { // Render conversation history, if any - chat_logs.forEach(chat_log => { + response.forEach(chat_log => { renderMessageWithReference(chat_log.message, chat_log.by, chat_log.context, new Date(chat_log.created)); }); + }) + .catch(err => { + return; }); // Set welcome message on load @@ -235,6 +244,12 @@ font-size: medium; } + a.inline-chat-link { + color: #475569; + text-decoration: none; + border-bottom: 1px dotted #475569; + } + @media (pointer: coarse), (hover: none) { abbr[title] { position: relative; diff --git a/src/khoj/interface/web/content_type_github_input.html b/src/khoj/interface/web/content_type_github_input.html index fc1c4fce..f22f00cf 100644 --- a/src/khoj/interface/web/content_type_github_input.html +++ b/src/khoj/interface/web/content_type_github_input.html @@ -16,31 +16,25 @@ - - - - - - - - - - - - - - - - - - - - - - - - +

Repositories

+
+ {% for repo in current_config['repos'] %} +
+ + + + + + + +
+ {% endfor %} +
+

You probably don't need to edit these.

@@ -68,16 +62,86 @@ +