]> git.giacomolli.uk - onechat/blobdiff - whatsapp_import.go
Resume queued appends at their saved log ID
[onechat] / whatsapp_import.go
index 81eb808816935547fbab2778d4099a19d2f6fa44..e1cbd029522810c832a35ff81e676d8fdd05a7bb 100644 (file)
@@ -142,7 +142,7 @@ func whatsappImport(ctx context.Context, args []string, out io.Writer) (err erro
        }
 
        client := newModelClient(address, auth, agent.CacheKey(), usagePath)
        }
 
        client := newModelClient(address, auth, agent.CacheKey(), usagePath)
-       backup, err := rebuild(ctx, agent, plan.added, client, newCompactor(client, agent.Prompt, config.Compactor), out)
+       backup, err := rebuild(ctx, agent, plan.added, client, newCompactor(client, agent.Prompt, config.Compactor, agent.Tools()), out)
        if err != nil {
                return fmt.Errorf("rebuild imported memory: %w", err)
        }
        if err != nil {
                return fmt.Errorf("rebuild imported memory: %w", err)
        }
@@ -211,7 +211,7 @@ func (p WhatsAppImportPlan) Write(out io.Writer) error {
                "owner: " + owner,
                fmt.Sprintf("bytes: %d (new batch text)", p.bytes),
                fmt.Sprintf("messages: %d (merged log)", p.messages),
                "owner: " + owner,
                fmt.Sprintf("bytes: %d (new batch text)", p.bytes),
                fmt.Sprintf("messages: %d (merged log)", p.messages),
-               fmt.Sprintf("estimated calls: %.0f (about 1.3 per message, limit %d)", estimate, buildCallLimit),
+               fmt.Sprintf("estimated calls: %.0f (about 1.3 per message, limit %d)", estimate, rebuildCallLimit),
        }
 
        _, err = io.WriteString(out, strings.Join(lines, "\n")+"\n")
        }
 
        _, err = io.WriteString(out, strings.Join(lines, "\n")+"\n")