Documentation
¶
Index ¶
- Constants
- type Model
- func (m *Model) Close()
- func (m *Model) CloseOnSuccessIfNeeded()
- func (m *Model) GetMaxHeight() int
- func (m *Model) GetWidth() int
- func (m *Model) HandleSPFActionResults(success bool, msg string)
- func (m *Model) HandleShellCommandResults(retCode int, _ string)
- func (m *Model) HandleUpdate(msg tea.Msg, cwdLocation string) (common.ModelAction, tea.Cmd)
- func (m *Model) IsOpen() bool
- func (m *Model) IsShellMode() bool
- func (m *Model) LastActionSucceeded() bool
- func (m *Model) Open(shellMode bool)
- func (m *Model) OpenSPFWithPrefill(prefill string)
- func (m *Model) Render() string
- func (m *Model) SetMaxHeight(maxHeight int)
- func (m *Model) SetWidth(width int)
Constants ¶
View Source
const ( OpenCommand = "open" SplitCommand = "split" CdCommand = "cd" ContentSearchCommand = "content" PromptMinWidth = 10 PromptMinHeight = 3 )
These could as well be property of prompt Model vs being global consts But its fine
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
No need to name it as PromptModel. It will me imported as prompt.Model
func DefaultModel ¶
func GenerateModel ¶
func (*Model) CloseOnSuccessIfNeeded ¶
func (m *Model) CloseOnSuccessIfNeeded()
func (*Model) GetMaxHeight ¶
func (*Model) HandleSPFActionResults ¶
After action is performed, model will update the prompt.Model with results In case of NoAction, this method should not be called.
func (*Model) HandleShellCommandResults ¶
After action is performed, model will update the Model with results
func (*Model) HandleUpdate ¶
func (*Model) IsShellMode ¶
func (*Model) LastActionSucceeded ¶
func (*Model) OpenSPFWithPrefill ¶
func (*Model) SetMaxHeight ¶
Click to show internal directories.
Click to hide internal directories.