MCPcopy Index your code
hub / github.com/dataease/SQLBot / init

Function init

frontend/public/assistant.js:618–634  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

616 return src.substring(0, src.indexOf('/assistant.js'))
617 }
618 function init() {
619 const sqlbotScripts = document.querySelectorAll(`script[id^="${script_id_prefix}"]`)
620 const scriptsArray = Array.from(sqlbotScripts)
621 const src_list = scriptsArray.map((script) => script.src)
622 src_list.forEach((src) => {
623 const id = getParam(src, 'id')
624 window.sqlbot_assistant_handler[id] = window.sqlbot_assistant_handler[id] || {}
625 window.sqlbot_assistant_handler[id]['id'] = id
626 const propName = script_id_prefix + id + '-state'
627 if (window[propName]) {
628 return true
629 }
630 window[propName] = true
631 loadScript(src, id)
632 expposeGlobalMethods(id)
633 })
634 }
635
636 function showMsg(title, content) {
637 // 检查并创建容器(如果不存在)

Callers

nothing calls this directly

Calls 6

getParamFunction · 0.85
expposeGlobalMethodsFunction · 0.85
loadScriptFunction · 0.70
fromMethod · 0.45
mapMethod · 0.45
forEachMethod · 0.45

Tested by

no test coverage detected