diff --git a/cmd/wsh/cmd/wshcmd-version.go b/cmd/wsh/cmd/wshcmd-version.go index cf4debf1a..2f7506ec2 100644 --- a/cmd/wsh/cmd/wshcmd-version.go +++ b/cmd/wsh/cmd/wshcmd-version.go @@ -54,6 +54,7 @@ func runVersionCmd(cmd *cobra.Command, args []string) error { if versionJSON { info := map[string]interface{}{ "version": resp.Version, + "clientid": resp.ClientId, "buildtime": resp.BuildTime, "configdir": resp.ConfigDir, "datadir": resp.DataDir, @@ -69,6 +70,7 @@ func runVersionCmd(cmd *cobra.Command, args []string) error { // Default verbose text output fmt.Printf("v%s (%s)\n", resp.Version, resp.BuildTime) + fmt.Printf("clientid: %s\n", resp.ClientId) fmt.Printf("configdir: %s\n", resp.ConfigDir) fmt.Printf("datadir: %s\n", resp.DataDir) fmt.Printf("update-channel: %s\n", updateChannel) diff --git a/frontend/types/gotypes.d.ts b/frontend/types/gotypes.d.ts index a83e91f31..f034520f1 100644 --- a/frontend/types/gotypes.d.ts +++ b/frontend/types/gotypes.d.ts @@ -869,6 +869,7 @@ declare global { // wshrpc.WaveInfoData type WaveInfoData = { version: string; + clientid: string; buildtime: string; configdir: string; datadir: string; diff --git a/pkg/wshrpc/wshrpctypes.go b/pkg/wshrpc/wshrpctypes.go index 29894ded8..593ff6ae5 100644 --- a/pkg/wshrpc/wshrpctypes.go +++ b/pkg/wshrpc/wshrpctypes.go @@ -448,6 +448,7 @@ type VDomUrlRequestResponse struct { type WaveInfoData struct { Version string `json:"version"` + ClientId string `json:"clientid"` BuildTime string `json:"buildtime"` ConfigDir string `json:"configdir"` DataDir string `json:"datadir"` diff --git a/pkg/wshrpc/wshserver/wshserver.go b/pkg/wshrpc/wshserver/wshserver.go index 28c270d9f..b4b3bdebe 100644 --- a/pkg/wshrpc/wshserver/wshserver.go +++ b/pkg/wshrpc/wshserver/wshserver.go @@ -618,8 +618,13 @@ func (ws *WshServer) BlockInfoCommand(ctx context.Context, blockId string) (*wsh } func (ws *WshServer) WaveInfoCommand(ctx context.Context) (*wshrpc.WaveInfoData, error) { + client, err := wstore.DBGetSingleton[*waveobj.Client](ctx) + if err != nil { + return nil, fmt.Errorf("error getting client: %w", err) + } return &wshrpc.WaveInfoData{ Version: wavebase.WaveVersion, + ClientId: client.OID, BuildTime: wavebase.BuildTime, ConfigDir: wavebase.GetWaveConfigDir(), DataDir: wavebase.GetWaveDataDir(),