433433 .ack a : hover {
434434 text-decoration : underline;
435435 }
436+
437+ /* Local endpoint info */
438+ .local-endpoint-info {
439+ border : 1px solid var (--border );
440+ border-radius : 4px ;
441+ padding : 10px 14px ;
442+ font-size : 0.88em ;
443+ background : var (--input-bg );
444+ }
445+ .local-endpoint-stat {
446+ display : flex;
447+ align-items : baseline;
448+ gap : 6px ;
449+ margin-bottom : 6px ;
450+ }
451+ .local-endpoint-stat : last-child {
452+ margin-bottom : 0 ;
453+ }
454+ .local-endpoint-stat-label {
455+ color : var (--desc-fg );
456+ min-width : 70px ;
457+ flex-shrink : 0 ;
458+ }
459+ .local-endpoint-stat-value {
460+ font-family : var (--vscode-editor-font-family , monospace);
461+ font-weight : 600 ;
462+ }
463+ .local-endpoint-files {
464+ display : flex;
465+ flex-direction : column;
466+ gap : 2px ;
467+ margin-top : 2px ;
468+ }
469+ .local-endpoint-file {
470+ font-family : var (--vscode-editor-font-family , monospace);
471+ font-size : 0.95em ;
472+ color : var (--vscode-textLink-foreground );
473+ cursor : pointer;
474+ background : none;
475+ border : none;
476+ padding : 0 ;
477+ text-align : left;
478+ }
479+ .local-endpoint-file : hover {
480+ text-decoration : underline;
481+ }
436482 </ style >
437483 </ head >
438484 < body >
@@ -451,6 +497,11 @@ <h2>Configure Language Server</h2>
451497 </ button >
452498 </ p >
453499
500+ < div id ="local-endpoint-section " style ="display: none ">
501+ < h2 > Local Endpoint</ h2 >
502+ < div id ="local-endpoint-body "> </ div >
503+ </ div >
504+
454505 < h2 > Acknowledgements</ h2 >
455506 < p class ="ack ">
456507 Diagnostics, autocomplete, and formatting powered by the
@@ -471,6 +522,7 @@ <h2>Acknowledgements</h2>
471522 const vscode = acquireVsCodeApi ( ) ;
472523 const initialEndpointBackends = __ENDPOINT_BACKENDS__ ;
473524 let activeEndpointUrl = __ACTIVE_ENDPOINT__ ;
525+ let localEndpointInfo = __LOCAL_ENDPOINT_INFO__ ;
474526
475527 // ── SPARQL syntax highlighter ──────────────────────────────────────
476528
@@ -824,6 +876,61 @@ <h2>Acknowledgements</h2>
824876
825877 renderEndpoints ( endpointBackends ) ;
826878
879+ // ── Local endpoint info ────────────────────────────────────────────────
880+
881+ function renderLocalEndpoint ( info ) {
882+ const section = document . getElementById ( 'local-endpoint-section' ) ;
883+ const body = document . getElementById ( 'local-endpoint-body' ) ;
884+ if ( ! info || info . files . length === 0 ) {
885+ section . style . display = 'none' ;
886+ return ;
887+ }
888+ section . style . display = '' ;
889+ body . innerHTML = '' ;
890+
891+ const card = document . createElement ( 'div' ) ;
892+ card . className = 'local-endpoint-info' ;
893+
894+ // Triples row
895+ const triplesRow = document . createElement ( 'div' ) ;
896+ triplesRow . className = 'local-endpoint-stat' ;
897+ const triplesLabel = document . createElement ( 'span' ) ;
898+ triplesLabel . className = 'local-endpoint-stat-label' ;
899+ triplesLabel . textContent = 'Triples' ;
900+ const triplesValue = document . createElement ( 'span' ) ;
901+ triplesValue . className = 'local-endpoint-stat-value' ;
902+ triplesValue . textContent = info . triples . toLocaleString ( ) ;
903+ triplesRow . appendChild ( triplesLabel ) ;
904+ triplesRow . appendChild ( triplesValue ) ;
905+ card . appendChild ( triplesRow ) ;
906+
907+ // Files row
908+ const filesRow = document . createElement ( 'div' ) ;
909+ filesRow . className = 'local-endpoint-stat' ;
910+ const filesLabel = document . createElement ( 'span' ) ;
911+ filesLabel . className = 'local-endpoint-stat-label' ;
912+ filesLabel . textContent = 'Files' ;
913+ const filesList = document . createElement ( 'div' ) ;
914+ filesList . className = 'local-endpoint-files' ;
915+ for ( const file of info . files ) {
916+ const btn = document . createElement ( 'button' ) ;
917+ btn . className = 'local-endpoint-file' ;
918+ btn . textContent = file . label ;
919+ btn . title = file . label ;
920+ btn . addEventListener ( 'click' , ( ) => {
921+ vscode . postMessage ( { type : 'openLocalFile' , uri : file . uri } ) ;
922+ } ) ;
923+ filesList . appendChild ( btn ) ;
924+ }
925+ filesRow . appendChild ( filesLabel ) ;
926+ filesRow . appendChild ( filesList ) ;
927+ card . appendChild ( filesRow ) ;
928+
929+ body . appendChild ( card ) ;
930+ }
931+
932+ renderLocalEndpoint ( localEndpointInfo ) ;
933+
827934 document . getElementById ( 'open-settings-btn' ) . addEventListener ( 'click' , ( ) => {
828935 vscode . postMessage ( { type : 'openVscodeSettings' } ) ;
829936 } ) ;
@@ -839,6 +946,10 @@ <h2>Acknowledgements</h2>
839946 Object . assign ( endpointBackends , msg . endpointBackends ) ;
840947 renderEndpoints ( endpointBackends ) ;
841948 }
949+ if ( msg . localEndpointInfo !== undefined ) {
950+ localEndpointInfo = msg . localEndpointInfo ;
951+ renderLocalEndpoint ( localEndpointInfo ) ;
952+ }
842953 }
843954 } ) ;
844955 </ script >
0 commit comments