v0.8.1 1f54f61

wire.go RawHistoryFolder

1// Package daemon holds vev's server-side session multiplexer use case.
2package daemon
3
4import (
5	"github.com/bnema/vev/internal/domain"
6	"github.com/bnema/vev/internal/protocol"
7)
8
9func serverWelcome(s *session, resumeToken uint64) (protocol.Welcome, error) {
10	s.mu.Lock()
11	var identity *protocol.CommittedRouteIdentity
12	if s.incarnation != (domain.SessionLifecycleID{}) {
13		identity = &protocol.CommittedRouteIdentity{
14			Target:    protocol.ExactSessionTarget{LifecycleID: s.incarnation, SessionName: s.name},
15			Ephemeral: s.ephemeral,
16		}
17	}
18	message := protocol.Welcome{
19		SessionID:         string(s.id),
20		SessionName:       s.name,
21		Ephemeral:         s.ephemeral,
22		Capabilities:      protocol.CapabilityResume,
23		CommittedIdentity: identity,
24	}
25	s.mu.Unlock()
26	message.ResumeToken = resumeToken
27	if identity != nil {
28		if err := identity.Validate(); err != nil {
29			return protocol.Welcome{}, err
30		}
31	}
32	return message, nil
33}
34
35func serverError(code uint16, text string) protocol.ErrorMsg {
36	return protocol.ErrorMsg{Code: code, Text: text}
37}
38
39func serverDetached(reason uint8) protocol.Detached { return protocol.Detached{Reason: reason} }
40func serverPong() protocol.Pong                     { return protocol.Pong{} }
41func serverSessions(infos []protocol.SessionInfo) protocol.Sessions {
42	return protocol.Sessions{Sessions: infos}
43}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close