File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,22 @@ export function renderNodeList(nodes) {
6161 </div>
6262 ` ;
6363 container . innerHTML = '' ;
64- filtered . forEach ( node => {
64+ filtered . forEach ( ( node , idx ) => {
6565 const row = document . createElement ( 'div' ) ;
6666 row . className = 'node-list-item' + ( selectedProgramId === node . id ? ' selected' : '' ) + ( highlightIds . has ( node . id ) ? ' highlighted' : '' ) ;
6767 row . setAttribute ( 'data-node-id' , node . id ) ;
6868 row . tabIndex = 0 ;
69+
70+ const numDiv = document . createElement ( 'div' ) ;
71+ numDiv . textContent = `#${ idx + 1 } ` ;
72+ numDiv . style . fontSize = '2.2em' ;
73+ numDiv . style . fontWeight = 'bold' ;
74+ numDiv . style . color = '#444' ;
75+ numDiv . style . flex = '0 0 70px' ;
76+ numDiv . style . display = 'flex' ;
77+ numDiv . style . alignItems = 'center' ;
78+ numDiv . style . justifyContent = 'center' ;
79+ row . appendChild ( numDiv ) ;
6980 let selectedMetricRow = '' ;
7081 if ( node . metrics && metric in node . metrics ) {
7182 let val = ( typeof node . metrics [ metric ] === 'number' && isFinite ( node . metrics [ metric ] ) ) ? node . metrics [ metric ] . toFixed ( 4 ) : node . metrics [ metric ] ;
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ export function showSidebarContent(d, fromHover = false) {
3636 const children = allNodeData . filter ( n => n . parent_id === d . id ) ;
3737 if ( children . length > 0 ) tabNames . push ( 'Children' ) ;
3838
39- // --- CLONES TAB LOGIC ---
39+ // Handle nodes with "-copyN" IDs
4040 function getBaseId ( id ) {
4141 return id . includes ( '-copy' ) ? id . split ( '-copy' ) [ 0 ] : id ;
4242 }
@@ -52,10 +52,9 @@ export function showSidebarContent(d, fromHover = false) {
5252 return `<pre class="sidebar-code-pre">${ d . code } </pre>` ;
5353 }
5454 if ( tabName === 'Prompts' ) {
55- // --- Prompt select logic ---
55+ // Prompt select logic
5656 let promptOptions = [ ] ;
5757 let promptMap = { } ;
58- // Prompts
5958 if ( d . prompts && typeof d . prompts === 'object' ) {
6059 for ( const [ k , v ] of Object . entries ( d . prompts ) ) {
6160 if ( v && typeof v === 'object' && ! Array . isArray ( v ) ) {
You can’t perform that action at this time.
0 commit comments