@zhn2605/topo 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -76
- package/dist/grammars/tree-sitter-cpp.wasm +0 -0
- package/dist/topo.js +1061 -289
- package/dist/web/assets/answer-CbyA0kan.js +2 -0
- package/dist/web/assets/{elk.bundled-DHL5Qd5-.js → elk.bundled-BUXl0iSx.js} +1 -1
- package/dist/web/assets/index-51XzhJVO.css +1 -0
- package/dist/web/assets/index-IpMwIh-N.js +22 -0
- package/dist/web/index.html +2 -2
- package/dist/web/snapshot.html +43 -37
- package/package.json +2 -2
- package/dist/web/assets/index-Bx25CC1b.js +0 -17
- package/dist/web/assets/index-CJ5z47qU.css +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e,t,n){let r=e.head.edges.filter(e=>e.kind===`calls`),i=new Map(e.head.nodes.map(e=>[e.id,e])),a=[],o=e.entryPoints[0]?.nodeId??r[0]?.from;for(;o&&a.length<4&&!a.some(e=>e.nodeId===o);){let e=i.get(o)?.name;if(!e)break;a.push({nodeId:o,text:`${e} runs here.`});let t=o;o=r.filter(e=>e.from===t).sort((e,t)=>(e.line??0)-(t.line??0))[0]?.to}let s=a.map((e,t)=>`${t+1}. ${i.get(e.nodeId)?.name} runs.`);return{id:t,text:n,status:`done`,tools:[`find`,`callees`,`callees`,`explain`],answer:a.length?[`This is mock data, so here is a made-up walk through the demo:`,...s].join(`
|
|
2
|
+
`):`This is mock data; there's no director to ask.`,...a.length&&{view:{type:`explain`,title:`Demo walkthrough`,steps:a,command:t}},at:Date.now()}}export{e as mockAnswer};
|