@@ -93,24 +93,12 @@ export const CodeFileCollection = ({ data, className = "", onHide, hideContent =
9393
9494 const generatedFilesAbsolutePath = absoluteOutputPath ;
9595 const generatedFilesRelativePath = useMemo ( ( ) => {
96- // This should reflect the CLI `--output-path` value (relative to where runbooks was launched),
97- // NOT an inferred suffix of the absolute path (which can be any directory) .
98- const raw = ( relativeOutputPath || '' ) . trim ( )
96+ // This reflects the CLI `--output-path` value (relative to where runbooks was launched).
97+ // The backend always provides this value .
98+ const raw = ( relativeOutputPath || '' ) . trim ( ) ;
9999
100- if ( ! raw ) return '/generated'
101-
102- // Normalize windows separators for display
103- const normalized = raw . replaceAll ( '\\' , '/' )
104-
105- // If user provided an absolute path, show it as-is.
106- if ( normalized . startsWith ( '/' ) ) return normalized
107- if ( / ^ [ a - z A - Z ] : \/ / . test ( normalized ) ) return normalized
108-
109- // Relative paths:
110- // - "." / "./foo" should stay as-is (clearly relative)
111- // - "generated" / "foo/bar" we render with a leading slash for readability in the sentence
112- if ( normalized === '.' || normalized . startsWith ( './' ) || normalized . startsWith ( '../' ) ) return normalized
113- return `/${ normalized } `
100+ // Normalize windows separators for display, but otherwise show the path as the user provided it.
101+ return raw . replaceAll ( '\\' , '/' ) ;
114102 } , [ relativeOutputPath ] )
115103
116104 const copyToClipboard = async ( text : string ) => {
0 commit comments