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

Function UpdateWorkspaceTabIds

pkg/wcore/workspace.go:376–384  ·  view source on GitHub ↗
(ctx context.Context, workspaceId string, tabIds []string)

Source from the content-addressed store, hash-verified

374}
375
376func UpdateWorkspaceTabIds(ctx context.Context, workspaceId string, tabIds []string) error {
377 ws, _ := wstore.DBGet[*waveobj.Workspace](ctx, workspaceId)
378 if ws == nil {
379 return fmt.Errorf("workspace not found: %q", workspaceId)
380 }
381 ws.TabIds = tabIds
382 wstore.DBUpdate(ctx, ws)
383 return nil
384}
385
386func ListWorkspaces(ctx context.Context) (waveobj.WorkspaceList, error) {
387 workspaces, err := wstore.DBGetAllObjsByType[*waveobj.Workspace](ctx, waveobj.OType_Workspace)

Callers 1

Calls 2

DBGetFunction · 0.92
DBUpdateFunction · 0.92

Tested by

no test coverage detected