improve reasoning toggle tests and refactor model capability checks
This commit is contained in:
+3
-2
@@ -1829,17 +1829,18 @@ async function sendMessage() {
|
||||
const loadingBody = loadingMsg.querySelector(".msg-content");
|
||||
const loadingShell = loadingMsg.querySelector(".loading-shell");
|
||||
const loadingLabel = loadingMsg.querySelector(".loading-copy strong");
|
||||
loadingLabel.textContent = webSearch ? "Searching the web..." : "Generating response...";
|
||||
loadingLabel.textContent = "Preparing response...";
|
||||
try {
|
||||
let streamError = null;
|
||||
await stream("/chat/stream", {message, model: modelSelect.value, chatId: activeChatId, webSearch, reasoning}, {
|
||||
onStatus: ({status, sourceCount}) => {
|
||||
onStatus: ({status, sourceCount, searchState}) => {
|
||||
if (status === "accepted") {
|
||||
webSearchToggle.reset();
|
||||
reasoningToggle.reset();
|
||||
return;
|
||||
}
|
||||
loadingLabel.textContent = status === "searching" ? "Searching the web..."
|
||||
: searchState === "no_relevant_results" ? "No sufficiently relevant results. Generating response..."
|
||||
: sourceCount === 0 ? "No web results found. Generating response..." : "Generating response...";
|
||||
},
|
||||
onThinking: ({fullThinking}) => {
|
||||
|
||||
Reference in New Issue
Block a user