INNER CODE UNIT · JavaScript

sendMessage

autokitteh/autokitteh · internal/backend/webtools/web/webmessages/app.js:75

const sendMessage = async (e) => {
  e.preventDefault()

  if (window.location.protocol === 'file:') {
    console.log('Cannot send messages in file protocol')
    return
  }

  const body = chatInputBody.value

  const url = pathPrefixURL + chatInputPath.value

  try {
    const resp = await fetch(url, {
      method: 'POST',
      body: body,
    })

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…