mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-10 11:24:59 +01:00
fix: keybind docs out of sync
This commit is contained in:
@@ -138,15 +138,14 @@ const (
|
||||
MessagesPageDownCommand CommandName = "messages_page_down"
|
||||
MessagesHalfPageUpCommand CommandName = "messages_half_page_up"
|
||||
MessagesHalfPageDownCommand CommandName = "messages_half_page_down"
|
||||
MessagesPreviousCommand CommandName = "messages_previous"
|
||||
MessagesNextCommand CommandName = "messages_next"
|
||||
MessagesFirstCommand CommandName = "messages_first"
|
||||
MessagesLastCommand CommandName = "messages_last"
|
||||
MessagesLayoutToggleCommand CommandName = "messages_layout_toggle"
|
||||
MessagesCopyCommand CommandName = "messages_copy"
|
||||
MessagesUndoCommand CommandName = "messages_undo"
|
||||
MessagesRedoCommand CommandName = "messages_redo"
|
||||
AppExitCommand CommandName = "app_exit"
|
||||
|
||||
MessagesFirstCommand CommandName = "messages_first"
|
||||
MessagesLastCommand CommandName = "messages_last"
|
||||
|
||||
MessagesCopyCommand CommandName = "messages_copy"
|
||||
MessagesUndoCommand CommandName = "messages_undo"
|
||||
MessagesRedoCommand CommandName = "messages_redo"
|
||||
AppExitCommand CommandName = "app_exit"
|
||||
)
|
||||
|
||||
func (k Command) Matches(msg tea.KeyPressMsg, leader bool) bool {
|
||||
@@ -348,16 +347,7 @@ func LoadFromConfig(config *opencode.Config) CommandRegistry {
|
||||
Description: "half page down",
|
||||
Keybindings: parseBindings("ctrl+alt+d"),
|
||||
},
|
||||
{
|
||||
Name: MessagesPreviousCommand,
|
||||
Description: "previous message",
|
||||
Keybindings: parseBindings("ctrl+up"),
|
||||
},
|
||||
{
|
||||
Name: MessagesNextCommand,
|
||||
Description: "next message",
|
||||
Keybindings: parseBindings("ctrl+down"),
|
||||
},
|
||||
|
||||
{
|
||||
Name: MessagesFirstCommand,
|
||||
Description: "first message",
|
||||
@@ -368,11 +358,7 @@ func LoadFromConfig(config *opencode.Config) CommandRegistry {
|
||||
Description: "last message",
|
||||
Keybindings: parseBindings("ctrl+alt+g"),
|
||||
},
|
||||
{
|
||||
Name: MessagesLayoutToggleCommand,
|
||||
Description: "toggle layout",
|
||||
Keybindings: parseBindings("<leader>p"),
|
||||
},
|
||||
|
||||
{
|
||||
Name: MessagesCopyCommand,
|
||||
Description: "copy message",
|
||||
|
||||
@@ -99,7 +99,6 @@ func (m Model) View() string {
|
||||
if m.isDiff == nil || *m.isDiff == false {
|
||||
diffToggle = ""
|
||||
}
|
||||
layoutToggle := m.app.Key(commands.MessagesLayoutToggleCommand)
|
||||
|
||||
background := t.Background()
|
||||
footer := layout.Render(
|
||||
@@ -114,9 +113,7 @@ func (m Model) View() string {
|
||||
layout.FlexItem{
|
||||
View: close,
|
||||
},
|
||||
layout.FlexItem{
|
||||
View: layoutToggle,
|
||||
},
|
||||
|
||||
layout.FlexItem{
|
||||
View: diffToggle,
|
||||
},
|
||||
|
||||
@@ -1277,10 +1277,7 @@ func (a Model) executeCommand(command commands.Command) (tea.Model, tea.Cmd) {
|
||||
a.messages = updated.(chat.MessagesComponent)
|
||||
cmds = append(cmds, cmd)
|
||||
}
|
||||
case commands.MessagesLayoutToggleCommand:
|
||||
a.messagesRight = !a.messagesRight
|
||||
a.app.State.MessagesRight = a.messagesRight
|
||||
cmds = append(cmds, a.app.SaveState())
|
||||
|
||||
case commands.MessagesCopyCommand:
|
||||
updated, cmd := a.messages.CopyLastMessage()
|
||||
a.messages = updated.(chat.MessagesComponent)
|
||||
|
||||
Reference in New Issue
Block a user