]> git.giacomolli.uk - onechat/blobdiff - memory.go
Carry new images through model request chains
[onechat] / memory.go
index a240b6c16d1d898e3051f3e0a0c7a19434061b3e..602b86cddf5b813027c554a23f65621298f46fc3 100644 (file)
--- a/memory.go
+++ b/memory.go
@@ -607,6 +607,7 @@ func (m *Memory) task(key NodeKey) (Task, error) {
                }
 
                task.Input = []string{leafSource(message)}
                }
 
                task.Input = []string{leafSource(message)}
+               task.Images = imageFiles(message.Text)
 
                return task, nil
        }
 
                return task, nil
        }
@@ -781,12 +782,14 @@ func (m *Memory) buildBuiltByModel(key NodeKey) (bool, error) {
 
 // Task is the build of the node (Level, Index). Context is the compaction view
 // for the build. Input holds the source "kind: text" of a leaf, or the two
 
 // Task is the build of the node (Level, Index). Context is the compaction view
 // for the build. Input holds the source "kind: text" of a leaf, or the two
-// child lines of a merge with their newlines as spaces.
+// child lines of a merge with their newlines as spaces. Images holds the leaf
+// image filenames and is empty for merges.
 type Task struct {
        Level   int
        Index   int
        Context string
        Input   []string
 type Task struct {
        Level   int
        Index   int
        Context string
        Input   []string
+       Images  []string
 }
 
 // MemoryViewFile is the content of view.json.
 }
 
 // MemoryViewFile is the content of view.json.