MCPcopy
hub / github.com/docker/docker-agent / handleSetSessionTitle

Method handleSetSessionTitle

pkg/tui/handlers.go:172–180  ·  view source on GitHub ↗
(title string)

Source from the content-addressed store, hash-verified

170}
171
172func (m *appModel) handleSetSessionTitle(title string) (tea.Model, tea.Cmd) {
173 if err := m.application.UpdateSessionTitle(m.ctx(), title); err != nil {
174 if errors.Is(err, app.ErrTitleGenerating) {
175 return m, notification.WarningCmd("Title is being generated, please wait")
176 }
177 return m, notification.ErrorCmd(fmt.Sprintf("Failed to set session title: %v", err))
178 }
179 return m, notification.SuccessCmd("Title set to: " + title)
180}
181
182func (m *appModel) handleRegenerateTitle() (tea.Model, tea.Cmd) {
183 sess := m.application.Session()

Callers 1

updateMethod · 0.95

Calls 4

WarningCmdFunction · 0.92
ErrorCmdFunction · 0.92
SuccessCmdFunction · 0.92
UpdateSessionTitleMethod · 0.65

Tested by

no test coverage detected