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

Function WithReadOnly

pkg/tui/components/editor/editor.go:176–181  ·  view source on GitHub ↗

WithReadOnly disables the editor so no new messages can be composed.

()

Source from the content-addressed store, hash-verified

174
175// WithReadOnly disables the editor so no new messages can be composed.
176func WithReadOnly() Option {
177 return func(e *editor) {
178 e.textarea.Placeholder = "Session is read-only"
179 e.textarea.KeyMap.InsertNewline.SetEnabled(false)
180 }
181}
182
183// defaultPlaceholder is shown in an empty editor unless WithPlaceholder
184// overrides it.

Callers 1

editorOptsMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected