MCPcopy Index your code
hub / github.com/docker/docker-agent / updateChatCmd

Method updateChatCmd

pkg/tui/dispatch.go:28–32  ·  view source on GitHub ↗

The Bubble Tea Update contract returns a tea.Model interface, which forces us to type-assert the result back to the concrete sub-model type before reassigning it. The helpers below centralise that boilerplate. Two flavours are provided: - updateXCmd: forwards a message to a sub-model and returns t

(msg tea.Msg)

Source from the content-addressed store, hash-verified

26
27// updateChatCmd forwards a message to the chat page and returns its cmd.
28func (m *appModel) updateChatCmd(msg tea.Msg) tea.Cmd {
29 updated, cmd := m.chatPage.Update(msg)
30 m.chatPage = updated.(chat.Page)
31 return cmd
32}
33
34// updateEditorCmd forwards a message to the editor and returns its cmd.
35func (m *appModel) updateEditorCmd(msg tea.Msg) tea.Cmd {

Callers 6

handleSwitchAgentMethod · 0.95
handleToggleSplitDiffMethod · 0.95
applyThemeChangedMethod · 0.95
updateMethod · 0.95
forwardChatMethod · 0.95

Calls 1

UpdateMethod · 0.65

Tested by

no test coverage detected