MCPcopy
hub / github.com/wavetermdev/waveterm / SetIcon

Function SetIcon

pkg/wcore/workspace.go:417–430  ·  view source on GitHub ↗
(workspaceId string, icon string)

Source from the content-addressed store, hash-verified

415}
416
417func SetIcon(workspaceId string, icon string) error {
418 ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
419 defer cancel()
420 ws, e := wstore.DBGet[*waveobj.Workspace](ctx, workspaceId)
421 if e != nil {
422 return e
423 }
424 if ws == nil {
425 return fmt.Errorf("workspace not found: %q", workspaceId)
426 }
427 ws.Icon = icon
428 wstore.DBUpdate(ctx, ws)
429 return nil
430}
431
432func SetColor(workspaceId string, color string) error {
433 ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)

Callers

nothing calls this directly

Calls 2

DBGetFunction · 0.92
DBUpdateFunction · 0.92

Tested by

no test coverage detected