v0.0.21 4dde650

events.go RawHistoryFolder

1package core
2
3import (
4	"encoding/json"
5
6	"github.com/patriceckhart/zot/internal/provider"
7)
8
9// AgentEvent is the superset of events emitted by an Agent run.
10// Consumers discriminate via a type switch. Each concrete type has a
11// Type() method for JSON serialization.
12type AgentEvent interface {
13	Type() string
14}
15
16type EvTurnStart struct {
17	Step int
18}
19
20func (EvTurnStart) Type() string { return "turn_start" }
21
22type EvUserMessage struct {
23	Message provider.Message
24}
25
26func (EvUserMessage) Type() string { return "user_message" }
27
28type EvAssistantStart struct{}
29
30func (EvAssistantStart) Type() string { return "assistant_start" }
31
32type EvTextDelta struct {
33	Delta string
34}
35
36func (EvTextDelta) Type() string { return "text_delta" }
37
38type EvToolCall struct {
39	ID   string
40	Name string
41	Args json.RawMessage
42}
43
44func (EvToolCall) Type() string { return "tool_call" }
45
46type EvToolProgress struct {
47	ID   string
48	Text string
49}
50
51func (EvToolProgress) Type() string { return "tool_progress" }
52
53type EvToolResult struct {
54	ID     string
55	Result ToolResult
56}
57
58func (EvToolResult) Type() string { return "tool_result" }
59
60type EvUsage struct {
61	Usage      provider.Usage
62	Cumulative provider.Usage
63}
64
65func (EvUsage) Type() string { return "usage" }
66
67type EvAssistantMessage struct {
68	Message provider.Message
69}
70
71func (EvAssistantMessage) Type() string { return "assistant_message" }
72
73type EvTurnEnd struct {
74	Stop provider.StopReason
75	Err  error
76}
77
78func (EvTurnEnd) Type() string { return "turn_end" }
79
80type EvDone struct{}
81
82func (EvDone) Type() string { return "done" }
83
84type EvError struct {
85	Err error
86}
87
88func (EvError) Type() string { return "error" }

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 1

Tags 476

↑↓ moveenter openesc close