@@ -11,6 +11,7 @@ import (
1111 "log"
1212 "net/http"
1313 "os"
14+ "os/user"
1415 "strings"
1516 "sync"
1617 "time"
@@ -411,10 +412,11 @@ func RunAIChat(ctx context.Context, sseHandler *sse.SSEHandlerCh, backend UseCha
411412 }
412413 }
413414 if chatOpts .BuilderAppGenerator != nil {
414- appGoFile , appStaticFiles , appErr := chatOpts .BuilderAppGenerator ()
415+ appGoFile , appStaticFiles , platformInfo , appErr := chatOpts .BuilderAppGenerator ()
415416 if appErr == nil {
416417 chatOpts .AppGoFile = appGoFile
417418 chatOpts .AppStaticFiles = appStaticFiles
419+ chatOpts .PlatformInfo = platformInfo
418420 }
419421 }
420422 stopReason , rtnMessage , err := runAIChatStep (ctx , sseHandler , backend , chatOpts , cont )
@@ -689,7 +691,7 @@ func WaveAIPostMessageHandler(w http.ResponseWriter, r *http.Request) {
689691 }
690692
691693 if req .BuilderAppId != "" {
692- chatOpts .BuilderAppGenerator = func () (string , string , error ) {
694+ chatOpts .BuilderAppGenerator = func () (string , string , string , error ) {
693695 return generateBuilderAppData (req .BuilderAppId )
694696 }
695697 }
@@ -830,7 +832,7 @@ type StaticFileInfo struct {
830832 ModifiedTime string `json:"modified_time"`
831833}
832834
833- func generateBuilderAppData (appId string ) (string , string , error ) {
835+ func generateBuilderAppData (appId string ) (string , string , string , error ) {
834836 appGoFile := ""
835837 fileData , err := waveappstore .ReadAppFile (appId , "app.go" )
836838 if err == nil {
@@ -860,5 +862,12 @@ func generateBuilderAppData(appId string) (string, string, error) {
860862 }
861863 }
862864
863- return appGoFile , staticFilesJSON , nil
865+ platformInfo := wavebase .GetSystemSummary ()
866+ if currentUser , userErr := user .Current (); userErr == nil && currentUser .Username != "" {
867+ platformInfo = fmt .Sprintf ("Local Machine: %s, User: %s" , platformInfo , currentUser .Username )
868+ } else {
869+ platformInfo = fmt .Sprintf ("Local Machine: %s" , platformInfo )
870+ }
871+
872+ return appGoFile , staticFilesJSON , platformInfo , nil
864873}
0 commit comments