Skip to content

web search done right

forgot to update js files when renaming type in api

Mikkel Denker5c6e552dcc71
diff --git a/core/src/schema.rs b/core/src/schema.rs
index 4f2c3229..7edcd657 100644
--- a/core/src/schema.rs
+++ b/core/src/schema.rs
@@ -568,6 +568,8 @@ impl Field {
Field::Text(TextField::BacklinkText)
| Field::Text(TextField::SchemaOrgJson)
| Field::Text(TextField::MicroformatTags)
+ | Field::Text(TextField::SafetyClassification)
+ | Field::Text(TextField::FlattenedSchemaOrgJson)
) && !self.is_fast()
}
diff --git a/frontend/public/js/chat.js b/frontend/public/js/chat.js
index b1ad281d..7c773e45 100644
--- a/frontend/public/js/chat.js
+++ b/frontend/public/js/chat.js
@@ -175,7 +175,7 @@ function streamMessage(data) {
return;
}
- if (data["@type"] == "speaking") {
+ if (data["type"] == "speaking") {
const status = document.querySelector("#active-status");
if (status) {
@@ -191,15 +191,15 @@ function streamMessage(data) {
const lastMessage = messages[messages.length - 1];
lastMessage.message = aliceStreamingMessage;
renderLastMessage();
- } else if (data["@type"] == "beginSearch") {
+ } else if (data["type"] == "beginSearch") {
const status = document.querySelector("#active-status");
status.querySelector("#info").innerHTML = `Looking up <span style="font-weight: bold;">${data["query"]}</span>`;
- } else if (data["@type"] == "searchResult") {
+ } else if (data["type"] == "searchResult") {
currentQueries.push({
query: data["query"],
results: data["result"]
});
- } else if (data["@type"] == "done") {
+ } else if (data["type"] == "done") {
prevState = data["state"];
endAliceStream();
}
diff --git a/frontend/public/js/explore.js b/frontend/public/js/explore.js
index ca37d73e..ae020f94 100644
--- a/frontend/public/js/explore.js
+++ b/frontend/public/js/explore.js
@@ -70,7 +70,7 @@ function addSiteIfKnown() {
fetch(KNOWS_SITE_API + "?site=" + site)
.then(response => response.json())
.then(data => {
- if (data["@type"] === "known") {
+ if (data["type"] === "known") {
addSite(data["site"]);
siteInput.value = "";
} else {