on 94de6bc help sign in
59 lines 804 B history raw
1package event
3import (
4 "time"
5)
7var appStartTime time.Time
9func AppInitialized() {
10 appStartTime = time.Now()
11 send("app initialized")
14func AppExited() {
15 duration := time.Since(appStartTime).Truncate(time.Second)
16 send(
17 "app exited",
18 "app duration pretty", duration.String(),
19 "app duration in seconds", int64(duration.Seconds()),
20 )
21 Flush()
24func SessionCreated() {
25 send("session created")
28func SessionDeleted() {
29 send("session deleted")
32func SessionSwitched() {
33 send("session switched")
36func FilePickerOpened() {
37 send("filepicker opened")
40func PromptSent(props ...any) {
41 send(
42 "prompt sent",
43 props...,
44 )
47func PromptResponded(props ...any) {
48 send(
49 "prompt responded",
50 props...,
51 )
54func TokensUsed(props ...any) {
55 send(
56 "tokens used",
57 props...,
58 )