File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
server/templates/components Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1616 placeholder =" https://github.com/..."
1717 value =" {{ repo_url if repo_url else '' }}"
1818 required
19- class =" border-[3px] w-full relative z-20 border-gray-900 placeholder-gray-600 text-lg font-medium focus:outline-none py-3.5 px-6 rounded" >
19+ class =" border-[3px] w-full relative z-20 border-gray-900 placeholder-gray-600 text-lg font-medium focus:outline-none py-3.5 px-6 rounded bg-[#E8F0FE] " >
2020 </div >
2121 <!-- Ingest button -->
2222 <div class =" relative w-auto flex-shrink-0 h-full group" >
Original file line number Diff line number Diff line change @@ -190,9 +190,22 @@ function handleSubmit(event, showLoading = false) {
190190 // Set plain text content for summary, tree, and content
191191 document . getElementById ( 'result-summary' ) . value = data . summary || '' ;
192192 document . getElementById ( 'directory-structure-content' ) . value = data . tree || '' ;
193- document . getElementById ( 'directory-structure-pre' ) . textContent = data . tree || '' ;
194193 document . getElementById ( 'result-content' ) . value = data . content || '' ;
195194
195+ // Populate directory structure lines as clickable <pre> elements
196+ const dirPre = document . getElementById ( 'directory-structure-pre' ) ;
197+ if ( dirPre && data . tree ) {
198+ dirPre . innerHTML = '' ;
199+ data . tree . split ( '\n' ) . forEach ( line => {
200+ const pre = document . createElement ( 'pre' ) ;
201+ pre . setAttribute ( 'name' , 'tree-line' ) ;
202+ pre . className = 'cursor-pointer hover:line-through hover:text-gray-500' ;
203+ pre . textContent = line ;
204+ pre . onclick = function ( ) { toggleFile ( this ) ; } ;
205+ dirPre . appendChild ( pre ) ;
206+ } ) ;
207+ }
208+
196209 // Scroll to results
197210 resultsSection . scrollIntoView ( { behavior : 'smooth' , block : 'start' } ) ;
198211 } )
You can’t perform that action at this time.
0 commit comments