MCPcopy
hub / github.com/szczyglis-dev/py-gpt / get

Function get

src/pygpt_net/data/js/app.min.js:878–878  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

876this.events.cleanup();this.highlighter.cleanup();this.math.cleanup();this.streamQ.clear();this.dom.cleanup();}}
877if(typeof RafManager!=='undefined'&&RafManager.prototype&&typeof RafManager.prototype.cancel==='function'){RafManager.prototype.cancel=function(key){const t=this.tasks.get(key);if(!t)return;this.tasks.delete(key);if(t.group){const set=this.groups.get(t.group);if(set){set.delete(key);if(set.size===0)this.groups.delete(t.group);}}};}
878window.__collapsed_idx=window.__collapsed_idx||[];const runtime=new Runtime();document.addEventListener('DOMContentLoaded',()=>runtime.init());Object.defineProperty(window,'SE',{get(){return Utils.SE;}});window.beginStream=(chunk)=>runtime.api_beginStream(chunk);window.endStream=()=>runtime.api_endStream();window.applyStream=(name,chunk)=>runtime.api_applyStream(name,chunk);window.appendStream=(name,chunk)=>runtime.api_appendStream(name,chunk);window.appendStreamTyped=(type,name,chunk)=>runtime.api_onChunk(name,chunk,type);window.nextStream=()=>runtime.api_nextStream();window.clearStream=()=>runtime.api_clearStream();window.begin=()=>runtime.api_begin();window.end=()=>runtime.api_end();window.appendNode=(payload)=>runtime.api_appendNode(payload);window.replaceNodes=(payload)=>runtime.api_replaceNodes(payload);window.appendToInput=(html)=>runtime.api_appendToInput(html);window.clearNodes=()=>runtime.api_clearNodes();window.clearInput=()=>runtime.api_clearInput();window.clearOutput=()=>runtime.api_clearOutput();window.clearLive=()=>runtime.api_clearLive();window.appendToolOutput=(c)=>runtime.api_appendToolOutput(c);window.updateToolOutput=(c)=>runtime.api_updateToolOutput(c);window.clearToolOutput=()=>runtime.api_clearToolOutput();window.beginToolOutput=()=>runtime.api_beginToolOutput();window.endToolOutput=()=>runtime.api_endToolOutput();window.enableToolOutput=()=>runtime.api_enableToolOutput();window.disableToolOutput=()=>runtime.api_disableToolOutput();window.toggleToolOutput=(id)=>runtime.api_toggleToolOutput(id);window.appendExtra=(id,c)=>runtime.api_appendExtra(id,c);window.removeNode=(id)=>runtime.api_removeNode(id);window.removeNodesFromId=(id)=>runtime.api_removeNodesFromId(id);window.replaceLive=(c)=>runtime.api_replaceLive(c);window.updateFooter=(c)=>runtime.api_updateFooter(c);window.enableEditIcons=()=>runtime.api_enableEditIcons();window.disableEditIcons=()=>runtime.api_disableEditIcons();window.enableTimestamp=()=>runtime.api_enableTimestamp();window.disableTimestamp=()=>runtime.api_disableTimestamp();window.enableBlocks=()=>runtime.api_enableBlocks();window.disableBlocks=()=>runtime.api_disableBlocks();window.updateCSS=(s)=>runtime.api_updateCSS(s);window.getScrollPosition=()=>runtime.api_getScrollPosition();window.setScrollPosition=(pos)=>runtime.api_setScrollPosition(pos);window.showLoading=()=>runtime.api_showLoading();window.hideLoading=()=>runtime.api_hideLoading();window.restoreCollapsedCode=(root)=>runtime.api_restoreCollapsedCode(root);window.scrollToTopUser=()=>runtime.api_scrollToTopUser();window.scrollToBottomUser=()=>runtime.api_scrollToBottomUser();window.showTips=()=>runtime.api_showTips();window.hideTips=()=>runtime.api_hideTips();window.getCustomMarkupRules=()=>runtime.api_getCustomMarkupRules();window.setCustomMarkupRules=(rules)=>runtime.api_setCustomMarkupRules(rules);window.__pygpt_cleanup=()=>runtime.cleanup();RafManager.prototype.stats=function(){const byGroup=new Map();for(const[key,t]of this.tasks){const g=t.group||'default';byGroup.set(g,(byGroup.get(g)||0)+1);}
879return{tasks:this.tasks.size,groups:Array.from(byGroup,([group,count])=>({group,count})).sort((a,b)=>b.count-a.count)};};RafManager.prototype.dumpHotGroups=function(label=''){const s=this.stats();console.log('[RAF]',label,'tasks=',s.tasks,'byGroup=',s.groups.slice(0,8));};RafManager.prototype.findDomTasks=function(){const out=[];for(const[key,t]of this.tasks){let el=null;if(key&&key.nodeType===1)el=key;else if(key&&key.el&&key.el.nodeType===1)el=key.el;if(el)out.push({group:t.group,tag:el.tagName,connected:el.isConnected});}
880return out;};function gaugeSE(se){const ropeLen=(se.streamBuf.length+se._sbLen);const ac=se.activeCode;const domFrozen=ac?.frozenEl?.textContent?.length||0;const domTail=ac?.tailEl?.textContent?.length||0;const domLen=domFrozen+domTail;return{ropeLen,domLen,totalChars:ropeLen+domLen,ratioRopeToDom:(domLen?(ropeLen/domLen).toFixed(2):'n/a'),fenceOpen:se.fenceOpen,codeOpen:se.codeStream?.open};};

Callers 1

_apply_mapMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected