Documentation
¶
Index ¶
- Variables
- func DefaultKeyMap() keyMaps
- func GetConfigSummaryKeymap() configSummaryKeyMap
- func GetContentKeymap() contentKeyMap
- func GetContextKeymap() contextKeyMap
- func GetGlobalKeymap() globalKeyMap
- func GetListKeymap() listKeyMap
- func GetMessageKeymap() messageKeyMap
- func GetPromptKeymap() promptKeyMap
- func GetReviewKeymap() reviewKeyMap
- func GetReviewStackKeymap() reviewStackKeyMap
- func GetSourceListKeymap() sourceListKeyMap
- func GetStateKeymap() stateKeyMap
- func InsertTitleWithOffset(rendered, title string) string
- func LoadTmpFile(filePath string) string
- func MakeBottomLine(globalHelp string, panelHelp string) string
- func NewItemListPanel() itemListPanel
- func NewPanels() panels
- func NewUi(conf config.Config, client openai.Client) model
- func SaveTmpFile(filePath string, text string)
- func SendErrorMessage(desc string, err error) tea.Msg
- type AiContextMethod
- type FocusState
- type ReviewStackOperation
- type ReviewState
- type ZoomState
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigSummaryKeyMap = configSummaryKeyMap{ FocusSourceListPanel: key.NewBinding( key.WithKeys("h"), key.WithHelp("h", "focus source list"), ), FocusReviewProgressPanel: key.NewBinding( key.WithKeys("l"), key.WithHelp("l", "focus progress"), ), }
View Source
var ContentKeyMap = contentKeyMap{ ItemContentCursorDown: key.NewBinding( key.WithKeys("j", "down"), key.WithHelp("j/↓", "down"), ), ItemContentCursorUp: key.NewBinding( key.WithKeys("k", "up"), key.WithHelp("k/↑", "up"), ), ItemContentHalfViewDown: key.NewBinding( key.WithKeys("ctrl+d"), key.WithHelp("ctrl+d", "half down"), ), ItemContentHalfViewUp: key.NewBinding( key.WithKeys("ctrl+u"), key.WithHelp("ctrl+u", "half up"), ), ReviewStack: key.NewBinding( key.WithKeys("r"), key.WithHelp("r", "review"), ), FocusInstantPrompt: key.NewBinding( key.WithKeys("i"), key.WithHelp("i", "focus prompt"), ), FocusReviewPanel: key.NewBinding( key.WithKeys("tab"), key.WithHelp("tab", "focus review"), ), FocusListPanel: key.NewBinding( key.WithKeys("esc"), key.WithHelp("esc", "focus list"), ), }
View Source
var ContextKeyMap = contextKeyMap{ FocusItemListPanel: key.NewBinding( key.WithKeys("h"), key.WithHelp("h", "focus stack"), ), FocusSourceListPanel: key.NewBinding( key.WithKeys("l"), key.WithHelp("l", "focus source list"), ), RemoveContext: key.NewBinding( key.WithKeys("d"), key.WithHelp("d", "remove context"), ), CursorDown: key.NewBinding( key.WithKeys("J"), key.WithHelp("shift+j", "down"), ), CursorUp: key.NewBinding( key.WithKeys("K"), key.WithHelp("shift+k", "down"), ), }
View Source
var GlobalKeyMap = globalKeyMap{ Quit: key.NewBinding( key.WithKeys("ctrl+c"), key.WithHelp("ctrl+c", "quit"), ), ZoomPanel: key.NewBinding( key.WithKeys("+"), key.WithHelp("+", "zoom"), ), }
View Source
var ListKeyMap = listKeyMap{ ListCursorDown: key.NewBinding( key.WithKeys("j", "down"), key.WithHelp("j/↓", "down"), ), ListCursorUp: key.NewBinding( key.WithKeys("k", "up"), key.WithHelp("k/↑", "up"), ), FocusStatePanel: key.NewBinding( key.WithKeys("h"), key.WithHelp("h", "focus state"), ), FocusContextListPanel: key.NewBinding( key.WithKeys("l"), key.WithHelp("l", "focus context"), ), StartFilter: key.NewBinding( key.WithKeys("/"), key.WithHelp("/", "filter"), ), ReviewStack: key.NewBinding( key.WithKeys("r"), key.WithHelp("r", "review"), ), ReloadItems: key.NewBinding( key.WithKeys("ctrl+r"), key.WithHelp("ctrl+r", "reload"), ), FocusContentPanel: key.NewBinding( key.WithKeys("enter"), key.WithHelp("enter", "focus content"), ), ReviewContentCursorDown: key.NewBinding( key.WithKeys("J"), key.WithHelp("J", "down review"), ), ReviewContentCursorUp: key.NewBinding( key.WithKeys("K"), key.WithHelp("K", "up review"), ), ReviewContentHalfViewDown: key.NewBinding( key.WithKeys("ctrl+d"), key.WithHelp("ctrl+d", "half down review"), ), ReviewContentHalfViewUp: key.NewBinding( key.WithKeys("ctrl+u"), key.WithHelp("ctrl+u", "half up review"), ), OpenReview: key.NewBinding( key.WithKeys("o"), key.WithHelp("o", "open review"), ), FocusInstantPrompt: key.NewBinding( key.WithKeys("i"), key.WithHelp("i", "focus prompt"), ), ToggleAiContext: key.NewBinding( key.WithKeys("a"), key.WithHelp("a", "add context"), ), DeleteReviewResult: key.NewBinding( key.WithKeys("d"), key.WithHelp("d", "delete review"), ), ToggleViewStyle: key.NewBinding( key.WithKeys("t"), key.WithHelp("t", "toggle view style"), ), }
View Source
var MessageKeyMap = messageKeyMap{ Quit: key.NewBinding( key.WithKeys("q"), key.WithHelp("q", "quit"), ), Return: key.NewBinding( key.WithKeys("enter"), key.WithHelp("enter", "return"), ), }
View Source
var PromptKeyMap = promptKeyMap{ Blur: key.NewBinding( key.WithKeys("esc"), key.WithHelp("esc", "blur"), ), InstantPromptHistoryPrev: key.NewBinding( key.WithKeys("ctrl+p"), key.WithHelp("ctrl+p", "history prev"), ), InstantPromptHistoryNext: key.NewBinding( key.WithKeys("ctrl+n"), key.WithHelp("ctrl+n", "history next"), ), ReviewStack: key.NewBinding( key.WithKeys("ctrl+s"), key.WithHelp("ctrl+s", "review"), ), OpenEditor: key.NewBinding( key.WithKeys("ctrl+e"), key.WithHelp("ctrl+e", "edit with editor"), ), }
View Source
var ReviewKeyMap = reviewKeyMap{ ReviewContentCursorDown: key.NewBinding( key.WithKeys("j", "down"), key.WithHelp("j/↓", "down"), ), ReviewContentCursorUp: key.NewBinding( key.WithKeys("k", "up"), key.WithHelp("k/↑", "up"), ), ReviewContentHalfViewDown: key.NewBinding( key.WithKeys("ctrl+d"), key.WithHelp("ctrl+d", "half down"), ), ReviewContentHalfViewUp: key.NewBinding( key.WithKeys("ctrl+u"), key.WithHelp("ctrl+u", "half up"), ), ReviewStack: key.NewBinding( key.WithKeys("r"), key.WithHelp("r", "review"), ), FocusInstantPrompt: key.NewBinding( key.WithKeys("i"), key.WithHelp("i", "focus prompt"), ), FocusContentPanel: key.NewBinding( key.WithKeys("tab"), key.WithHelp("tab", "focus content"), ), FocusListPanel: key.NewBinding( key.WithKeys("esc"), key.WithHelp("esc", "focus list"), ), }
View Source
var ReviewStackKeyMap = reviewStackKeyMap{ FocusConfigSummaryPanel: key.NewBinding( key.WithKeys("h"), key.WithHelp("h", "focus config"), ), FocusStateSummaryPanel: key.NewBinding( key.WithKeys("l"), key.WithHelp("l", "focus state"), ), }
View Source
var SourceListKeyMap = sourceListKeyMap{ FocusContextPanel: key.NewBinding( key.WithKeys("h"), key.WithHelp("h", "focus context"), ), FocusConfigPanel: key.NewBinding( key.WithKeys("l"), key.WithHelp("l", "focus config"), ), ToggleSourceEnabled: key.NewBinding( key.WithKeys(" "), key.WithHelp("space", "toggle source enabled"), ), }
View Source
var StateKeyMap = stateKeyMap{ FocusItemListPanel: key.NewBinding( key.WithKeys("l"), key.WithHelp("l", "focus list"), ), FocusReviewProgressPanel: key.NewBinding( key.WithKeys("h"), key.WithHelp("h", "focus config"), ), }
Functions ¶
func DefaultKeyMap ¶ added in v0.2.0
func DefaultKeyMap() keyMaps
func GetConfigSummaryKeymap ¶
func GetConfigSummaryKeymap() configSummaryKeyMap
func GetContentKeymap ¶
func GetContentKeymap() contentKeyMap
func GetContextKeymap ¶ added in v0.2.0
func GetContextKeymap() contextKeyMap
func GetGlobalKeymap ¶
func GetGlobalKeymap() globalKeyMap
func GetListKeymap ¶
func GetListKeymap() listKeyMap
func GetMessageKeymap ¶ added in v0.2.0
func GetMessageKeymap() messageKeyMap
func GetPromptKeymap ¶
func GetPromptKeymap() promptKeyMap
func GetReviewKeymap ¶
func GetReviewKeymap() reviewKeyMap
func GetReviewStackKeymap ¶ added in v0.2.0
func GetReviewStackKeymap() reviewStackKeyMap
func GetSourceListKeymap ¶ added in v0.2.0
func GetSourceListKeymap() sourceListKeyMap
func GetStateKeymap ¶ added in v0.2.0
func GetStateKeymap() stateKeyMap
func LoadTmpFile ¶ added in v0.2.0
func MakeBottomLine ¶
func NewItemListPanel ¶ added in v0.2.1
func NewItemListPanel() itemListPanel
Types ¶
type AiContextMethod ¶ added in v0.2.0
type AiContextMethod int
const ( AddContext AiContextMethod = iota RemoveContext )
type FocusState ¶
type FocusState int
const ( ItemListPanelFocus FocusState = iota ContentPanelFocus ReviewPanelFocus ReviewStackProgressPanelFocus InstantPromptPanelFocus ConfigSummaryPanelFocus StatePanelFocus ContextPanelFocus SourceListPanelFocus MessagePanelFocus Other )
type ReviewStackOperation ¶
type ReviewStackOperation int
const ( Add ReviewStackOperation = iota Remove )
Click to show internal directories.
Click to hide internal directories.