@zhn2605/topo 0.1.0 → 0.3.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 +101 -76
- package/dist/grammars/tree-sitter-cpp.wasm +0 -0
- package/dist/topo.js +1739 -415
- package/dist/web/assets/answer-3GChwEmV.js +2 -0
- package/dist/web/assets/{elk.bundled-DHL5Qd5-.js → elk.bundled-Bx4dyQBB.js} +1 -1
- package/dist/web/assets/index-CX9S_hg9.js +23 -0
- package/dist/web/assets/index-D-MaOEzL.css +1 -0
- package/dist/web/index.html +2 -2
- package/dist/web/snapshot.html +44 -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,n,r){let i=t(r);if(i)return{id:n,text:r,status:`done`,tools:[`find`,`ask_user`],...i,at:Date.now()};let a=e.head.edges.filter(e=>e.kind===`calls`),o=new Map(e.head.nodes.map(e=>[e.id,e])),s=[],c=e.entryPoints[0]?.nodeId??a[0]?.from;for(;c&&s.length<4&&!s.some(e=>e.nodeId===c);){let e=o.get(c)?.name;if(!e)break;s.push({nodeId:c,text:`${e} runs here.`});let t=c,n=a.filter(e=>e.from===t).sort((e,t)=>(e.line??0)-(t.line??0));c=(n.find(e=>a.some(t=>t.from===e.to))??n[0])?.to}let l=s.map((e,t)=>`${t+1}. ${o.get(e.nodeId)?.name} runs.`);return{id:n,text:r,status:`done`,tools:[`find`,`callees`,`callees`,`explain`],answer:s.length?[`This is mock data, so here is a made-up walk through the demo:`,...l].join(`
|
|
2
|
+
`):`This is mock data; there's no director to ask.`,...s.length&&{view:{type:`explain`,title:`Demo walkthrough`,steps:s,command:n}},at:Date.now()}}function t(e){if(!/^\S[^:\n]*: /.test(e)){if(/agent|territor/i.test(e))return{answer:`A couple of things first:`,ask:[{question:`How many agents should work on this?`,header:`Agents`,options:[{label:`One`,description:`one worker on the whole change`},{label:`Two`,description:`client and server split, run side by side`}]},{question:`Which areas should get a territory?`,header:`Territories`,multiSelect:!0,options:[{label:`Ui`},{label:`Combat`},{label:`Net`}]}]};if(/how long|how deep/i.test(e))return{answer:`How much detail do you want?`,ask:[{question:`How long should the walkthrough be?`,header:`Depth`,options:[{label:`Quick overview`,description:`about 5 steps`},{label:`Every step`,description:`about 20 steps`},{label:`Only the changed parts`}]}]}}}export{e as mockAnswer};
|