8 "charm.land/bubbles/v2/key"
9 tea "charm.land/bubbletea/v2"
10 "github.com/atotto/clipboard"
11 "github.com/charmbracelet/crush/internal/agent"
12 "github.com/charmbracelet/crush/internal/agent/tools"
13 "github.com/charmbracelet/crush/internal/app"
14 "github.com/charmbracelet/crush/internal/message"
15 "github.com/charmbracelet/crush/internal/permission"
16 "github.com/charmbracelet/crush/internal/pubsub"
17 "github.com/charmbracelet/crush/internal/session"
18 "github.com/charmbracelet/crush/internal/tui/components/chat/messages"
19 "github.com/charmbracelet/crush/internal/tui/components/core/layout"
20 "github.com/charmbracelet/crush/internal/tui/exp/list"
21 "github.com/charmbracelet/crush/internal/tui/styles"
22 "github.com/charmbracelet/crush/internal/tui/util"
27 Attachments []message.Attachment
30type SessionSelectedMsg = session.Session
32type SessionClearedMsg struct{}
34type SelectionCopyMsg struct {
44// MessageListCmp represents a component that displays a list of chat messages
45// with support for real-time updates and session management.
46type MessageListCmp interface {
52 SetSession(session.Session) tea.Cmd
54 GetSelectedText() string
55 CopySelectedText(bool) tea.Cmd
58// messageListCmp implements MessageListCmp, providing a virtualized list
59// of chat messages with support for tool calls, real-time updates, and
61type messageListCmp struct {
64 session session.Session
65 listCmp list.List[list.Item]
66 previousSelected string // Last selected item index for restoring focus
68 lastUserMessageTime int64
69 defaultListKeyMap list.KeyMap
71 // Click tracking for double/triple click detection
72 lastClickTime time.Time
79// New creates a new message list component with custom keybindings
80// and reverse ordering (newest messages at bottom).
81func New(app *app.App) MessageListCmp {
82 defaultListKeyMap := list.DefaultKeyMap()
86 list.WithDirectionBackward(),
87 list.WithFocus(false),
88 list.WithKeyMap(defaultListKeyMap),
89 list.WithEnableMouse(),
91 return &messageListCmp{
95 defaultListKeyMap: defaultListKeyMap,
99// Init initializes the component.
100func (m *messageListCmp) Init() tea.Cmd {
101 return m.listCmp.Init()
104// Update handles incoming messages and updates the component state.
105func (m *messageListCmp) Update(msg tea.Msg) (util.Model, tea.Cmd) {
107 if m.session.ID != "" && m.app.AgentCoordinator != nil {
108 queueSize := m.app.AgentCoordinator.QueuedPrompts(m.session.ID)
109 if queueSize != m.promptQueue {
110 m.promptQueue = queueSize
111 cmds = append(cmds, m.SetSize(m.width, m.height))
114 switch msg := msg.(type) {
115 case tea.KeyPressMsg:
116 if m.listCmp.IsFocused() && m.listCmp.HasSelection() {
118 case key.Matches(msg, messages.CopyKey):
119 cmds = append(cmds, m.CopySelectedText(true))
120 return m, tea.Batch(cmds...)
121 case key.Matches(msg, messages.ClearSelectionKey):
122 cmds = append(cmds, m.SelectionClear())
123 return m, tea.Batch(cmds...)
126 case tea.MouseClickMsg:
127 x := msg.X - 1 // Adjust for padding
128 y := msg.Y - 1 // Adjust for padding
129 if x < 0 || y < 0 || x >= m.width-2 || y >= m.height-1 {
130 return m, nil // Ignore clicks outside the component
132 if msg.Button == tea.MouseLeft {
133 cmds = append(cmds, m.handleMouseClick(x, y))
134 return m, tea.Batch(cmds...)
136 return m, tea.Batch(cmds...)
137 case tea.MouseMotionMsg:
138 x := msg.X - 1 // Adjust for padding
139 y := msg.Y - 1 // Adjust for padding
140 if x < 0 || y < 0 || x >= m.width-2 || y >= m.height-1 {
142 cmds = append(cmds, m.listCmp.MoveUp(1))
143 return m, tea.Batch(cmds...)
146 cmds = append(cmds, m.listCmp.MoveDown(1))
147 return m, tea.Batch(cmds...)
149 return m, nil // Ignore clicks outside the component
151 if msg.Button == tea.MouseLeft {
152 m.listCmp.EndSelection(x, y)
154 return m, tea.Batch(cmds...)
155 case tea.MouseReleaseMsg:
156 x := msg.X - 1 // Adjust for padding
157 y := msg.Y - 1 // Adjust for padding
158 if msg.Button == tea.MouseLeft {
159 clickCount := m.clickCount
160 if x < 0 || y < 0 || x >= m.width-2 || y >= m.height-1 {
161 tick := tea.Tick(doubleClickThreshold, func(time.Time) tea.Msg {
162 return SelectionCopyMsg{
163 clickCount: clickCount,
168 cmds = append(cmds, tick)
169 return m, tea.Batch(cmds...)
171 tick := tea.Tick(doubleClickThreshold, func(time.Time) tea.Msg {
172 return SelectionCopyMsg{
173 clickCount: clickCount,
179 cmds = append(cmds, tick)
180 return m, tea.Batch(cmds...)
183 case SelectionCopyMsg:
184 if msg.clickCount == m.clickCount && time.Since(m.lastClickTime) >= doubleClickThreshold {
185 // If the click count matches and within threshold, copy selected text
186 if msg.endSelection {
187 m.listCmp.EndSelection(msg.x, msg.y)
189 m.listCmp.SelectionStop()
190 cmds = append(cmds, m.CopySelectedText(true))
191 return m, tea.Batch(cmds...)
193 case pubsub.Event[permission.PermissionNotification]:
194 cmds = append(cmds, m.handlePermissionRequest(msg.Payload))
195 return m, tea.Batch(cmds...)
196 case SessionSelectedMsg:
197 if msg.ID != m.session.ID {
198 cmds = append(cmds, m.SetSession(msg))
200 return m, tea.Batch(cmds...)
201 case SessionClearedMsg:
202 m.session = session.Session{}
203 cmds = append(cmds, m.listCmp.SetItems([]list.Item{}))
204 return m, tea.Batch(cmds...)
206 case pubsub.Event[message.Message]:
207 cmds = append(cmds, m.handleMessageEvent(msg))
208 return m, tea.Batch(cmds...)
210 case tea.MouseWheelMsg:
211 u, cmd := m.listCmp.Update(msg)
212 m.listCmp = u.(list.List[list.Item])
213 cmds = append(cmds, cmd)
214 return m, tea.Batch(cmds...)
217 u, cmd := m.listCmp.Update(msg)
218 m.listCmp = u.(list.List[list.Item])
219 cmds = append(cmds, cmd)
220 return m, tea.Batch(cmds...)
223// View renders the message list or an initial screen if empty.
224func (m *messageListCmp) View() string {
225 t := styles.CurrentTheme()
227 if m.promptQueue > 0 {
228 height -= 4 // pill height and padding
239 if m.app.AgentCoordinator != nil && m.promptQueue > 0 {
240 queuePill := queuePill(m.promptQueue, t)
241 view = append(view, t.S().Base.PaddingLeft(4).PaddingTop(1).Render(queuePill))
243 return strings.Join(view, "\n")
246func (m *messageListCmp) handlePermissionRequest(permission permission.PermissionNotification) tea.Cmd {
247 items := m.listCmp.Items()
248 if toolCallIndex := m.findToolCallByID(items, permission.ToolCallID); toolCallIndex != NotFound {
249 toolCall := items[toolCallIndex].(messages.ToolCallCmp)
250 toolCall.SetPermissionRequested()
251 if permission.Granted {
252 toolCall.SetPermissionGranted()
254 m.listCmp.UpdateItem(toolCall.ID(), toolCall)
259// handleChildSession handles messages from child sessions (agent tools).
260func (m *messageListCmp) handleChildSession(event pubsub.Event[message.Message]) tea.Cmd {
262 if len(event.Payload.ToolCalls()) == 0 && len(event.Payload.ToolResults()) == 0 {
266 // Check if this is an agent tool session and parse it
267 childSessionID := event.Payload.SessionID
268 parentMessageID, toolCallID, ok := m.app.Sessions.ParseAgentToolSessionID(childSessionID)
272 items := m.listCmp.Items()
273 toolCallInx := NotFound
274 var toolCall messages.ToolCallCmp
275 for i := len(items) - 1; i >= 0; i-- {
276 if msg, ok := items[i].(messages.ToolCallCmp); ok {
277 if msg.ParentMessageID() == parentMessageID && msg.GetToolCall().ID == toolCallID {
283 if toolCallInx == NotFound {
286 nestedToolCalls := toolCall.GetNestedToolCalls()
287 for _, tc := range event.Payload.ToolCalls() {
289 for existingInx, existingTC := range nestedToolCalls {
290 if existingTC.GetToolCall().ID == tc.ID {
291 nestedToolCalls[existingInx].SetToolCall(tc)
297 nestedCall := messages.NewToolCallCmp(
301 messages.WithToolCallNested(true),
303 cmds = append(cmds, nestedCall.Init())
304 nestedToolCalls = append(
310 for _, tr := range event.Payload.ToolResults() {
311 for nestedInx, nestedTC := range nestedToolCalls {
312 if nestedTC.GetToolCall().ID == tr.ToolCallID {
313 nestedToolCalls[nestedInx].SetToolResult(tr)
319 toolCall.SetNestedToolCalls(nestedToolCalls)
320 m.listCmp.UpdateItem(
324 return tea.Batch(cmds...)
327// handleMessageEvent processes different types of message events (created/updated).
328func (m *messageListCmp) handleMessageEvent(event pubsub.Event[message.Message]) tea.Cmd {
330 case pubsub.CreatedEvent:
331 if event.Payload.SessionID != m.session.ID {
332 return m.handleChildSession(event)
334 if m.messageExists(event.Payload.ID) {
337 return m.handleNewMessage(event.Payload)
338 case pubsub.DeletedEvent:
339 if event.Payload.SessionID != m.session.ID {
342 return m.handleDeleteMessage(event.Payload)
343 case pubsub.UpdatedEvent:
344 if event.Payload.SessionID != m.session.ID {
345 return m.handleChildSession(event)
347 switch event.Payload.Role {
348 case message.Assistant:
349 return m.handleUpdateAssistantMessage(event.Payload)
351 return m.handleToolMessage(event.Payload)
357// messageExists checks if a message with the given ID already exists in the list.
358func (m *messageListCmp) messageExists(messageID string) bool {
359 items := m.listCmp.Items()
360 // Search backwards as new messages are more likely to be at the end
361 for i := len(items) - 1; i >= 0; i-- {
362 if msg, ok := items[i].(messages.MessageCmp); ok && msg.GetMessage().ID == messageID {
369// handleDeleteMessage removes a message from the list.
370func (m *messageListCmp) handleDeleteMessage(msg message.Message) tea.Cmd {
371 items := m.listCmp.Items()
372 for i := len(items) - 1; i >= 0; i-- {
373 if msgCmp, ok := items[i].(messages.MessageCmp); ok && msgCmp.GetMessage().ID == msg.ID {
374 m.listCmp.DeleteItem(items[i].ID())
381// handleNewMessage routes new messages to appropriate handlers based on role.
382func (m *messageListCmp) handleNewMessage(msg message.Message) tea.Cmd {
385 return m.handleNewUserMessage(msg)
386 case message.Assistant:
387 return m.handleNewAssistantMessage(msg)
389 return m.handleToolMessage(msg)
394// handleNewUserMessage adds a new user message to the list and updates the timestamp.
395func (m *messageListCmp) handleNewUserMessage(msg message.Message) tea.Cmd {
396 m.lastUserMessageTime = msg.CreatedAt
397 return m.listCmp.AppendItem(messages.NewMessageCmp(msg))
400// handleToolMessage updates existing tool calls with their results.
401func (m *messageListCmp) handleToolMessage(msg message.Message) tea.Cmd {
402 items := m.listCmp.Items()
403 for _, tr := range msg.ToolResults() {
404 if toolCallIndex := m.findToolCallByID(items, tr.ToolCallID); toolCallIndex != NotFound {
405 toolCall := items[toolCallIndex].(messages.ToolCallCmp)
406 toolCall.SetToolResult(tr)
407 m.listCmp.UpdateItem(toolCall.ID(), toolCall)
413// findToolCallByID searches for a tool call with the specified ID.
414// Returns the index if found, NotFound otherwise.
415func (m *messageListCmp) findToolCallByID(items []list.Item, toolCallID string) int {
416 // Search backwards as tool calls are more likely to be recent
417 for i := len(items) - 1; i >= 0; i-- {
418 if toolCall, ok := items[i].(messages.ToolCallCmp); ok && toolCall.GetToolCall().ID == toolCallID {
425// handleUpdateAssistantMessage processes updates to assistant messages,
426// managing both message content and associated tool calls.
427func (m *messageListCmp) handleUpdateAssistantMessage(msg message.Message) tea.Cmd {
429 items := m.listCmp.Items()
431 // Find existing assistant message and tool calls for this message
432 assistantIndex, existingToolCalls := m.findAssistantMessageAndToolCalls(items, msg.ID)
434 // Handle assistant message content
435 if cmd := m.updateAssistantMessageContent(msg, assistantIndex); cmd != nil {
436 cmds = append(cmds, cmd)
440 if cmd := m.updateToolCalls(msg, existingToolCalls); cmd != nil {
441 cmds = append(cmds, cmd)
444 return tea.Batch(cmds...)
447// findAssistantMessageAndToolCalls locates the assistant message and its tool calls.
448func (m *messageListCmp) findAssistantMessageAndToolCalls(items []list.Item, messageID string) (int, map[int]messages.ToolCallCmp) {
449 assistantIndex := NotFound
450 toolCalls := make(map[int]messages.ToolCallCmp)
452 // Search backwards as messages are more likely to be at the end
453 for i := len(items) - 1; i >= 0; i-- {
455 if asMsg, ok := item.(messages.MessageCmp); ok {
456 if asMsg.GetMessage().ID == messageID {
459 } else if tc, ok := item.(messages.ToolCallCmp); ok {
460 if tc.ParentMessageID() == messageID {
466 return assistantIndex, toolCalls
469// updateAssistantMessageContent updates or removes the assistant message based on content.
470func (m *messageListCmp) updateAssistantMessageContent(msg message.Message, assistantIndex int) tea.Cmd {
471 if assistantIndex == NotFound {
475 shouldShowMessage := m.shouldShowAssistantMessage(msg)
476 hasToolCallsOnly := len(msg.ToolCalls()) > 0 && msg.Content().Text == ""
479 if shouldShowMessage {
480 items := m.listCmp.Items()
481 uiMsg := items[assistantIndex].(messages.MessageCmp)
482 uiMsg.SetMessage(msg)
483 m.listCmp.UpdateItem(
484 items[assistantIndex].ID(),
487 if msg.FinishPart() != nil && msg.FinishPart().Reason == message.FinishReasonEndTurn {
488 m.listCmp.AppendItem(
489 messages.NewAssistantSection(
491 time.Unix(m.lastUserMessageTime, 0),
495 } else if hasToolCallsOnly {
496 items := m.listCmp.Items()
497 m.listCmp.DeleteItem(items[assistantIndex].ID())
503// shouldShowAssistantMessage determines if an assistant message should be displayed.
504func (m *messageListCmp) shouldShowAssistantMessage(msg message.Message) bool {
505 return len(msg.ToolCalls()) == 0 || msg.Content().Text != "" || msg.ReasoningContent().Thinking != "" || msg.IsThinking()
508// updateToolCalls handles updates to tool calls, updating existing ones and adding new ones.
509func (m *messageListCmp) updateToolCalls(msg message.Message, existingToolCalls map[int]messages.ToolCallCmp) tea.Cmd {
512 for _, tc := range msg.ToolCalls() {
513 if cmd := m.updateOrAddToolCall(msg, tc, existingToolCalls); cmd != nil {
514 cmds = append(cmds, cmd)
518 return tea.Batch(cmds...)
521// updateOrAddToolCall updates an existing tool call or adds a new one.
522func (m *messageListCmp) updateOrAddToolCall(msg message.Message, tc message.ToolCall, existingToolCalls map[int]messages.ToolCallCmp) tea.Cmd {
523 // Try to find existing tool call
524 for _, existingTC := range existingToolCalls {
525 if tc.ID == existingTC.GetToolCall().ID {
526 existingTC.SetToolCall(tc)
527 if msg.FinishPart() != nil && msg.FinishPart().Reason == message.FinishReasonCanceled {
528 existingTC.SetCancelled()
530 m.listCmp.UpdateItem(tc.ID, existingTC)
535 // Add new tool call if not found
536 return m.listCmp.AppendItem(messages.NewToolCallCmp(msg.ID, tc, m.app.Permissions))
539// handleNewAssistantMessage processes new assistant messages and their tool calls.
540func (m *messageListCmp) handleNewAssistantMessage(msg message.Message) tea.Cmd {
543 // Add assistant message if it should be displayed
544 if m.shouldShowAssistantMessage(msg) {
545 cmd := m.listCmp.AppendItem(
546 messages.NewMessageCmp(
550 cmds = append(cmds, cmd)
554 for _, tc := range msg.ToolCalls() {
555 cmd := m.listCmp.AppendItem(messages.NewToolCallCmp(msg.ID, tc, m.app.Permissions))
556 cmds = append(cmds, cmd)
559 return tea.Batch(cmds...)
562// SetSession loads and displays messages for a new session.
563func (m *messageListCmp) SetSession(session session.Session) tea.Cmd {
564 if m.session.ID == session.ID {
569 sessionMessages, err := m.app.Messages.List(context.Background(), session.ID)
571 return util.ReportError(err)
574 if len(sessionMessages) == 0 {
575 return m.listCmp.SetItems([]list.Item{})
578 // Initialize with first message timestamp
579 m.lastUserMessageTime = sessionMessages[0].CreatedAt
581 // Build tool result map for efficient lookup
582 toolResultMap := m.buildToolResultMap(sessionMessages)
584 // Convert messages to UI components
585 uiMessages := m.convertMessagesToUI(sessionMessages, toolResultMap)
587 return m.listCmp.SetItems(uiMessages)
590// buildToolResultMap creates a map of tool call ID to tool result for efficient lookup.
591func (m *messageListCmp) buildToolResultMap(messages []message.Message) map[string]message.ToolResult {
592 toolResultMap := make(map[string]message.ToolResult)
593 for _, msg := range messages {
594 for _, tr := range msg.ToolResults() {
595 toolResultMap[tr.ToolCallID] = tr
601// convertMessagesToUI converts database messages to UI components.
602func (m *messageListCmp) convertMessagesToUI(sessionMessages []message.Message, toolResultMap map[string]message.ToolResult) []list.Item {
603 uiMessages := make([]list.Item, 0)
605 for _, msg := range sessionMessages {
608 m.lastUserMessageTime = msg.CreatedAt
609 uiMessages = append(uiMessages, messages.NewMessageCmp(msg))
610 case message.Assistant:
611 uiMessages = append(uiMessages, m.convertAssistantMessage(msg, toolResultMap)...)
612 if msg.FinishPart() != nil && msg.FinishPart().Reason == message.FinishReasonEndTurn {
613 uiMessages = append(uiMessages, messages.NewAssistantSection(msg, time.Unix(m.lastUserMessageTime, 0)))
621// convertAssistantMessage converts an assistant message and its tool calls to UI components.
622func (m *messageListCmp) convertAssistantMessage(msg message.Message, toolResultMap map[string]message.ToolResult) []list.Item {
623 var uiMessages []list.Item
625 // Add assistant message if it should be displayed
626 if m.shouldShowAssistantMessage(msg) {
629 messages.NewMessageCmp(
635 // Add tool calls with their results and status
636 for _, tc := range msg.ToolCalls() {
637 options := m.buildToolCallOptions(tc, msg, toolResultMap)
638 uiMessages = append(uiMessages, messages.NewToolCallCmp(msg.ID, tc, m.app.Permissions, options...))
639 // If this tool call is the agent tool or agentic fetch, fetch nested tool calls
640 if tc.Name == agent.AgentToolName || tc.Name == tools.AgenticFetchToolName {
641 agentToolSessionID := m.app.Sessions.CreateAgentToolSessionID(msg.ID, tc.ID)
642 nestedMessages, _ := m.app.Messages.List(context.Background(), agentToolSessionID)
643 nestedToolResultMap := m.buildToolResultMap(nestedMessages)
644 nestedUIMessages := m.convertMessagesToUI(nestedMessages, nestedToolResultMap)
645 nestedToolCalls := make([]messages.ToolCallCmp, 0, len(nestedUIMessages))
646 for _, nestedMsg := range nestedUIMessages {
647 if toolCall, ok := nestedMsg.(messages.ToolCallCmp); ok {
648 toolCall.SetIsNested(true)
649 nestedToolCalls = append(nestedToolCalls, toolCall)
652 uiMessages[len(uiMessages)-1].(messages.ToolCallCmp).SetNestedToolCalls(nestedToolCalls)
659// buildToolCallOptions creates options for tool call components based on results and status.
660func (m *messageListCmp) buildToolCallOptions(tc message.ToolCall, msg message.Message, toolResultMap map[string]message.ToolResult) []messages.ToolCallOption {
661 var options []messages.ToolCallOption
663 // Add tool result if available
664 if tr, ok := toolResultMap[tc.ID]; ok {
665 options = append(options, messages.WithToolCallResult(tr))
668 // Add cancelled status if applicable
669 if msg.FinishPart() != nil && msg.FinishPart().Reason == message.FinishReasonCanceled {
670 options = append(options, messages.WithToolCallCancelled())
676// GetSize returns the current width and height of the component.
677func (m *messageListCmp) GetSize() (int, int) {
678 return m.width, m.height
681// SetSize updates the component dimensions and propagates to the list component.
682func (m *messageListCmp) SetSize(width int, height int) tea.Cmd {
685 if m.promptQueue > 0 {
686 queueHeight := 3 + 1 // 1 for padding top
687 lHight := max(0, height-(1+queueHeight))
688 return m.listCmp.SetSize(width-2, lHight)
690 return m.listCmp.SetSize(width-2, max(0, height-1)) // for padding
693// Blur implements MessageListCmp.
694func (m *messageListCmp) Blur() tea.Cmd {
695 return m.listCmp.Blur()
698// Focus implements MessageListCmp.
699func (m *messageListCmp) Focus() tea.Cmd {
700 return m.listCmp.Focus()
703// IsFocused implements MessageListCmp.
704func (m *messageListCmp) IsFocused() bool {
705 return m.listCmp.IsFocused()
708func (m *messageListCmp) Bindings() []key.Binding {
709 return m.defaultListKeyMap.KeyBindings()
712func (m *messageListCmp) GoToBottom() tea.Cmd {
713 return m.listCmp.GoToBottom()
717 doubleClickThreshold = 500 * time.Millisecond
718 clickTolerance = 2 // pixels
721// handleMouseClick handles mouse click events and detects double/triple clicks.
722func (m *messageListCmp) handleMouseClick(x, y int) tea.Cmd {
725 // Check if this is a potential multi-click
726 if now.Sub(m.lastClickTime) <= doubleClickThreshold &&
727 abs(x-m.lastClickX) <= clickTolerance &&
728 abs(y-m.lastClickY) <= clickTolerance {
734 m.lastClickTime = now
738 switch m.clickCount {
740 // Single click - start selection
741 m.listCmp.StartSelection(x, y)
743 // Double click - select word
744 m.listCmp.SelectWord(x, y)
746 // Triple click - select paragraph
747 m.listCmp.SelectParagraph(x, y)
748 m.clickCount = 0 // Reset after triple click
754// SelectionClear clears the current selection in the list component.
755func (m *messageListCmp) SelectionClear() tea.Cmd {
756 m.listCmp.SelectionClear()
757 m.previousSelected = ""
758 m.lastClickX, m.lastClickY = 0, 0
759 m.lastClickTime = time.Time{}
764// HasSelection checks if there is a selection in the list component.
765func (m *messageListCmp) HasSelection() bool {
766 return m.listCmp.HasSelection()
769// GetSelectedText returns the currently selected text from the list component.
770func (m *messageListCmp) GetSelectedText() string {
771 return m.listCmp.GetSelectedText(3) // 3 padding for the left border/padding
774// CopySelectedText copies the currently selected text to the clipboard. When
775// clear is true, it clears the selection after copying.
776func (m *messageListCmp) CopySelectedText(clear bool) tea.Cmd {
777 if !m.listCmp.HasSelection() {
781 selectedText := m.GetSelectedText()
782 if selectedText == "" {
783 return util.ReportInfo("No text selected")
787 defer func() { m.SelectionClear() }()
791 // We use both OSC 52 and native clipboard for compatibility with different
792 // terminal emulators and environments.
793 tea.SetClipboard(selectedText),
795 _ = clipboard.WriteAll(selectedText)
798 util.ReportInfo("Selected text copied to clipboard"),
802// abs returns the absolute value of an integer.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list