]> git.giacomolli.uk - onechat/blobdiff - build_run.go
Order daemon and storage declarations
[onechat] / build_run.go
index cc12cf26d2d66542bbab2216a96350079e32d422..707a928070cc0452940b4a7dd434120085779277 100644 (file)
@@ -33,6 +33,13 @@ type BuildRun struct {
        usagePath string
 }
 
+// DatedMessage is one message with an optional RFC 3339 date.
+type DatedMessage struct {
+       Kind string `json:"kind"`
+       Text string `json:"text"`
+       Date string `json:"date,omitempty"`
+}
+
 // Run appends the entries. It waits for the builds only before a user message,
 // as a turn does, so up to buildMax builds run at once in between, and it waits
 // for all builds at the end. It returns the number of messages appended and why
@@ -122,13 +129,6 @@ func (r *BuildRun) waitBuilds(ctx context.Context) error {
        return r.memory.Wait(ctx)
 }
 
-// DatedMessage is one message with an optional RFC 3339 date.
-type DatedMessage struct {
-       Kind string `json:"kind"`
-       Text string `json:"text"`
-       Date string `json:"date,omitempty"`
-}
-
 // buildReadUsage reads the records of usage.jsonl at path, in the order of the
 // start of their calls. The file has them in the order of the end of their
 // calls, which differs when calls run at once.