]> git.giacomolli.uk - onechat/blobdiff - turn.go
Name and order the view code
[onechat] / turn.go
diff --git a/turn.go b/turn.go
index 08a144e48ac7dafcda1588e4e4387946d36177ca..1593f434be72635911ef72958a43d960fc3fa7f1 100644 (file)
--- a/turn.go
+++ b/turn.go
@@ -17,7 +17,7 @@ var errTurnLogWrite = errors.New("log write failed")
 // newTurnLoop returns the loop of agent with its memory. Its calls go through
 // client, and notify gets each event. The clock gives the date of a turn.
 func newTurnLoop(agent *Agent, memory *Memory, client TurnClient, clock func() time.Time, notify func(Event)) (*TurnLoop, error) {
 // newTurnLoop returns the loop of agent with its memory. Its calls go through
 // client, and notify gets each event. The clock gives the date of a turn.
 func newTurnLoop(agent *Agent, memory *Memory, client TurnClient, clock func() time.Time, notify func(Event)) (*TurnLoop, error) {
-       layout, err := loadLayout(filepath.Join(agent.dir, layoutFileName))
+       layout, err := loadViewLayout(filepath.Join(agent.dir, viewLayoutFileName))
        if err != nil {
                return nil, err
        }
        if err != nil {
                return nil, err
        }
@@ -64,8 +64,8 @@ type Event struct {
 // of turnInput. The loop runs the tool calls of each response and sends their
 // results back, until a response has no tool call: the final answer.
 //
 // of turnInput. The loop runs the tool calls of each response and sends their
 // results back, until a response has no tool call: the final answer.
 //
-// The view goes out as the messages of a viewLayout, so the first request of
-// a turn reads the view of the turn before from the prompt cache.
+// The view goes out as the messages of a ViewLayout, so the first request of a
+// turn reads the view of the turn before from the prompt cache.
 //
 // Each later request of a turn begins with the whole input of the request
 // before it, then its output items, then the tool results. The output items
 //
 // Each later request of a turn begins with the whole input of the request
 // before it, then its output items, then the tool results. The output items
@@ -79,7 +79,7 @@ type TurnLoop struct {
        memory *Memory
        client TurnClient
        tools  *toolbox
        memory *Memory
        client TurnClient
        tools  *toolbox
-       layout *viewLayout
+       layout *ViewLayout
        clock  func() time.Time
        notify func(Event)
        wake   chan struct{}
        clock  func() time.Time
        notify func(Event)
        wake   chan struct{}