fix xterm.js versions and addon versions (#534)

* make xterm packages consistent

* add serializeAddon, fix varsUpdated
This commit is contained in:
Mike Sawka
2024-03-29 10:52:18 -07:00
committed by GitHub
parent 8a3d9628ba
commit 0024f0f3e8
4 changed files with 22 additions and 15 deletions
+1 -3
View File
@@ -5851,15 +5851,13 @@ func ClientSetCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (sc
}
if webglStr, found := pk.Kwargs["webgl"]; found {
webglVal := resolveBool(webglStr, false)
if webglVal {
varsUpdated = append(varsUpdated, "webgl")
}
clientOpts := clientData.ClientOpts
clientOpts.WebGL = webglVal
err = sstore.SetClientOpts(ctx, clientOpts)
if err != nil {
return nil, fmt.Errorf("error updating client webgl: %v", err)
}
varsUpdated = append(varsUpdated, "webgl")
}
if len(varsUpdated) == 0 {
return nil, fmt.Errorf("/client:set requires a value to set: %s", formatStrs([]string{"termfontsize", "termfontfamily", "openaiapitoken", "openaimodel", "openaibaseurl", "openaimaxtokens", "openaimaxchoices", "webgl"}, "or", false))