MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / addModalToMap

Method addModalToMap

tsunami/engine/clientimpl.go:422–432  ·  view source on GitHub ↗

addModalToMap adds a modal to the map and returns the result channel

(config rpctypes.ModalConfig)

Source from the content-addressed store, hash-verified

420
421// addModalToMap adds a modal to the map and returns the result channel
422func (c *ClientImpl) addModalToMap(config rpctypes.ModalConfig) chan bool {
423 c.OpenModalsLock.Lock()
424 defer c.OpenModalsLock.Unlock()
425
426 resultChan := make(chan bool, 1)
427 c.OpenModals[config.ModalId] = &ModalState{
428 Config: config,
429 ResultChan: resultChan,
430 }
431 return resultChan
432}
433
434// ShowModal displays a modal and returns a channel that will receive the result
435func (c *ClientImpl) ShowModal(config rpctypes.ModalConfig) chan bool {

Callers 1

ShowModalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected