@@ -102,12 +102,9 @@ export class AgentServer {
102
102
103
103
// Serve client application
104
104
// First try to find it in the CLI package dist/client directory
105
- let clientPath = path . join ( __dirname , ". ./client" ) ;
105
+ const clientPath = path . join ( __dirname , "./client" ) ;
106
106
107
- // If not found, fall back to the old relative path for development
108
- if ( ! fs . existsSync ( clientPath ) ) {
109
- clientPath = path . join ( __dirname , "../../.." , "packages/client/dist" ) ;
110
- }
107
+ console . log ( "clientPath" , clientPath ) ;
111
108
112
109
if ( fs . existsSync ( clientPath ) ) {
113
110
logger . debug (
@@ -132,10 +129,10 @@ export class AgentServer {
132
129
this . app . use ( express . static ( clientPath , staticOptions ) ) ;
133
130
134
131
// Serve the same files at /client path for consistency
135
- this . app . use ( "/client " , express . static ( clientPath , staticOptions ) ) ;
132
+ this . app . use ( "/" , express . static ( clientPath , staticOptions ) ) ;
136
133
137
134
// Serve index.html for client root path
138
- this . app . get ( "/client " , ( _req , res ) => {
135
+ this . app . get ( "/" , ( _req , res ) => {
139
136
res . setHeader ( "Content-Type" , "text/html" ) ;
140
137
res . sendFile ( path . join ( clientPath , "index.html" ) ) ;
141
138
} ) ;
0 commit comments