Skip to content

Commit

Permalink
Add info about the code interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed May 20, 2024
1 parent 06cdac3 commit ac196cc
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions public/chat/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -892,13 +892,21 @@ <h3 class="text-center">Welcome to BioImage.IO Chatbot</h3>
// check if the browser is not Chromium based then tell the user to use Chromium based browser
if (!window.showOpenFilePicker) {
const warning = document.createElement("div")
warning.innerHTML = `<br>
<div class="alert alert-warning" role="alert">
<strong>Warning!</strong> While the code interpreter works in non-Chromium based browsers, the ability to mount data folders to the chatbot is only supported in Chromium based browsers (e.g. Chrome, Edge, Brave, etc.). Please use a Chromium based browser for full functionality.
</div>`
warning.classList.add("alert")
warning.classList.add("alert-warning")
warning.role = "alert"
warning.innerHTML = `<strong>Warning!</strong> While the code interpreter works in non-Chromium based browsers, the ability to mount data folders to the chatbot is only supported in Chromium based browsers (e.g. Chrome, Edge, Brave, etc.). Please use a Chromium based browser for full functionality.`
// insert the warning after the chat-dialog-header
$('#chat1 .chat-dialog-header').after(warning)
}
else{
const info = document.createElement("div")
info.classList.add("alert")
info.classList.add("alert-info")
info.role = "alert"
info.innerHTML = `<strong>Info:</strong> The code interpreter runs entirely in-browser. Mounted data stays in-browser, won't be uploaded to any server. Code execution results, like print messages, are sent to the chat server.`
$('#chat1 .chat-dialog-header').after(info)
}
$('#console-btn').show()
const bioengineStartupScript = `
import sys
Expand Down

0 comments on commit ac196cc

Please sign in to comment.