]> git.giacomolli.uk - onechat/blobdiff - view_layout.go
Order functions by their first use
[onechat] / view_layout.go
index a2d4825a7d57b82897e798ec64a9e4913579509f..560abb21042ad854cb2e61fcbff4d0703b8ce624 100644 (file)
@@ -22,10 +22,10 @@ const viewLayoutFileName = "layout.json"
 // layout read the view of the turn before from the prompt cache in each of 10
 // turns, and with the view in one message it missed once in 5.
 //
 // layout read the view of the turn before from the prompt cache in each of 10
 // turns, and with the view in one message it missed once in 5.
 //
-// The first message starts with "<chat>\n". The closing tag goes into the
-// state message after the view, so that no view message changes when lines
-// come. The layout keeps the line count and a hash of the text of each message
-// in layout.json, so it outlives a restart.
+// The first message starts with "<chat>\n". The closing tag goes into the state
+// message after the view, so that no view message changes when lines come. The
+// layout keeps the line count and a hash of the text of each message in
+// layout.json, so it outlives a restart.
 type ViewLayout struct {
        path     string
        Messages []ViewLayoutMessage `json:"messages"`
 type ViewLayout struct {
        path     string
        Messages []ViewLayoutMessage `json:"messages"`
@@ -63,8 +63,8 @@ func loadViewLayout(path string) (*ViewLayout, error) {
 }
 
 // Split returns the view messages for lines and saves the layout. It keeps the
 }
 
 // Split returns the view messages for lines and saves the layout. It keeps the
-// earlier messages up to the first one whose text differs, and puts the rest
-// of the lines into one new message.
+// earlier messages up to the first one whose text differs, and puts the rest of
+// the lines into one new message.
 func (l *ViewLayout) Split(lines []string) ([]string, error) {
        var (
                texts []string
 func (l *ViewLayout) Split(lines []string) ([]string, error) {
        var (
                texts []string