diff --git a/server/handlers.go b/server/handlers.go index a10c73b137e20f0c2ab6e6e96202d0c2cd9128fe..97ea0f565f5f40ed735423cd04e396480e4bb3da 100644 --- a/server/handlers.go +++ b/server/handlers.go @@ -332,10 +332,14 @@ func (s *Server) serveIndexWithInit(w http.ResponseWriter, r *http.Request, fs h } } - // Get hostname + // Get hostname (add .exe.xyz suffix if no dots, matching system_prompt.go) hostname := "localhost" if h, err := os.Hostname(); err == nil { - hostname = h + if !strings.Contains(h, ".") { + hostname = h + ".exe.xyz" + } else { + hostname = h + } } // Get default working directory