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

Function UpdateTabName

pkg/wstore/wstore.go:43–55  ·  view source on GitHub ↗
(ctx context.Context, tabId, name string)

Source from the content-addressed store, hash-verified

41}
42
43func UpdateTabName(ctx context.Context, tabId, name string) error {
44 return WithTx(ctx, func(tx *TxWrap) error {
45 tab, _ := DBGet[*waveobj.Tab](tx.Context(), tabId)
46 if tab == nil {
47 return fmt.Errorf("tab not found: %q", tabId)
48 }
49 if tabId != "" {
50 tab.Name = name
51 DBUpdate(tx.Context(), tab)
52 }
53 return nil
54 })
55}
56
57func UpdateObjectMeta(ctx context.Context, oref waveobj.ORef, meta waveobj.MetaMapType, mergeSpecial bool) error {
58 return WithTx(ctx, func(tx *TxWrap) error {

Callers 1

UpdateTabNameCommandMethod · 0.92

Calls 4

DBGetFunction · 0.85
DBUpdateFunction · 0.85
WithTxFunction · 0.70
ContextMethod · 0.45

Tested by

no test coverage detected