File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,9 +28,8 @@ export default function DocsError({
2828 Something went wrong
2929 </ h2 >
3030 < p className = "text-sm text-[var(--text-muted)] mb-4" >
31- We hit an error rendering this page. Please refresh, and if it
32- keeps happening, report it with the ID below so we can track it
33- down.
31+ We hit an error rendering this page. Please refresh, and if it keeps
32+ happening, report it with the ID below so we can track it down.
3433 </ p >
3534 { error . digest && (
3635 < p className = "text-xs text-[var(--text-faint)] mb-4 font-mono" >
Original file line number Diff line number Diff line change @@ -28,9 +28,8 @@ export default function AgUiError({
2828 Something went wrong
2929 </ h2 >
3030 < p className = "text-sm text-[var(--text-muted)] mb-4" >
31- We hit an error rendering this page. Please refresh, and if it
32- keeps happening, report it with the ID below so we can track it
33- down.
31+ We hit an error rendering this page. Please refresh, and if it keeps
32+ happening, report it with the ID below so we can track it down.
3433 </ p >
3534 { error . digest && (
3635 < p className = "text-xs text-[var(--text-faint)] mb-4 font-mono" >
Original file line number Diff line number Diff line change @@ -381,7 +381,10 @@ export default async function AgUiDocPage({
381381 notFound ( ) ;
382382 }
383383
384- const source = safeReadFileSync ( CONTENT_DIR , path . relative ( CONTENT_DIR , filePath ) ) ;
384+ const source = safeReadFileSync (
385+ CONTENT_DIR ,
386+ path . relative ( CONTENT_DIR , filePath ) ,
387+ ) ;
385388 if ( source === null ) {
386389 console . error ( `[ag-ui] Failed to read ${ filePath } ` ) ;
387390 notFound ( ) ;
Original file line number Diff line number Diff line change @@ -44,10 +44,7 @@ export default async function ReferenceSlugPage({
4444 // slugPath is user-supplied (URL segments). Route the filesystem read
4545 // through safeReadFileSync so crafted paths like `..%2F..%2Fsecrets`
4646 // can't escape REFERENCE_CONTENT_DIR.
47- const raw = safeReadFileSync (
48- REFERENCE_CONTENT_DIR ,
49- `${ slugPath } .mdx` ,
50- ) ;
47+ const raw = safeReadFileSync ( REFERENCE_CONTENT_DIR , `${ slugPath } .mdx` ) ;
5148 if ( raw === null ) {
5249 notFound ( ) ;
5350 }
Original file line number Diff line number Diff line change @@ -48,10 +48,7 @@ export function SearchModal({ onClose }: { onClose: () => void }) {
4848 } , [ selectedIndex ] ) ;
4949
5050 useEffect ( ( ) => {
51- const focusId = window . setTimeout (
52- ( ) => inputRef . current ?. focus ( ) ,
53- 50 ,
54- ) ;
51+ const focusId = window . setTimeout ( ( ) => inputRef . current ?. focus ( ) , 50 ) ;
5552 let cancelled = false ;
5653 import ( "@/data/registry.json" )
5754 . then ( ( mod ) => {
Original file line number Diff line number Diff line change @@ -516,11 +516,7 @@ export function inlineSnippets(
516516 // Previously a permission error / missing file mid-render
517517 // crashed the entire docs page. Log and leave the original
518518 // <Component /> reference in the rendered output.
519- console . error (
520- "[docs-render] failed to read snippet" ,
521- snippetPath ,
522- err ,
523- ) ;
519+ console . error ( "[docs-render] failed to read snippet" , snippetPath , err ) ;
524520 return match ;
525521 }
526522 snippetContent = snippetContent . replace ( / ^ - - - [ \s \S ] * ?- - - \r ? \n ? / , "" ) ;
Original file line number Diff line number Diff line change @@ -128,5 +128,7 @@ export function loadAllReferenceItems(): ReferenceItem[] {
128128 * are statically generated too.
129129 */
130130export function referenceStaticParams ( ) : { slug : string [ ] } [ ] {
131- return loadAllReferenceItems ( ) . map ( ( item ) => ( { slug : item . slug . split ( "/" ) } ) ) ;
131+ return loadAllReferenceItems ( ) . map ( ( item ) => ( {
132+ slug : item . slug . split ( "/" ) ,
133+ } ) ) ;
132134}
You can’t perform that action at this time.
0 commit comments