diff --git a/src/khoj/interface/web/chat.html b/src/khoj/interface/web/chat.html
index 12338096..bb5d355a 100644
--- a/src/khoj/interface/web/chat.html
+++ b/src/khoj/interface/web/chat.html
@@ -87,7 +87,14 @@
.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");
+ renderMessage("Hi 👋🏾, to get started
1. Get your OpenAI API key
2. Save it in the Khoj chat settings
3. Click Configure on the Khoj settings page", "khoj");
+
+ // Disable chat input field and update placeholder text
+ document.getElementById("chat-input").setAttribute("disabled", "disabled");
+ document.getElementById("chat-input").setAttribute("placeholder", "Configure Khoj to enable chat");
+ } else {
+ // Set welcome message on load
+ renderMessage("Hey 👋🏾, what's up?", "khoj");
}
return data.response;
})
@@ -101,9 +108,6 @@
return;
});
- // Set welcome message on load
- renderMessage("Hey, what's up?", "khoj");
-
// Fill query field with value passed in URL query parameters, if any.
var query_via_url = new URLSearchParams(window.location.search).get("q");
if (query_via_url) {
diff --git a/src/khoj/interface/web/index.html b/src/khoj/interface/web/index.html
index 949ab783..15deba05 100644
--- a/src/khoj/interface/web/index.html
+++ b/src/khoj/interface/web/index.html
@@ -161,6 +161,14 @@
fetch("/api/config/types")
.then(response => response.json())
.then(enabled_types => {
+ // Show warning if no content types are enabled
+ if (enabled_types.detail) {
+ document.getElementById("results").innerHTML = "