Add ability to make LLM agent forget the conversation history

This is extremely useful for testing.

In order to do this I needed to actually deploy the migration to a bob
fork so I could start to add support for behaviors I really want.
Specifically the ability to search for ids in a slice.
This commit is contained in:
Eli Ribble 2026-01-27 18:44:02 +00:00
parent b8e7b9b7fd
commit a68b8781e7
No known key found for this signature in database
302 changed files with 1428 additions and 1256 deletions

View file

@ -1,4 +1,4 @@
// Code generated by BobGen psql v0.42.1. DO NOT EDIT.
// Code generated by BobGen psql v0.42.5. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package sql
@ -10,18 +10,18 @@ import (
"iter"
"time"
"github.com/Gleipnir-Technology/bob"
"github.com/Gleipnir-Technology/bob/dialect/psql"
"github.com/Gleipnir-Technology/bob/dialect/psql/dialect"
"github.com/Gleipnir-Technology/bob/orm"
enums "github.com/Gleipnir-Technology/nidus-sync/db/enums"
"github.com/stephenafamo/bob"
"github.com/stephenafamo/bob/dialect/psql"
"github.com/stephenafamo/bob/dialect/psql/dialect"
"github.com/stephenafamo/bob/orm"
"github.com/stephenafamo/scan"
)
//go:embed texts_by_senders.bob.sql
var formattedQueries_texts_by_senders string
var textsBySendersSQL = formattedQueries_texts_by_senders[152:393]
var textsBySendersSQL = formattedQueries_texts_by_senders[152:416]
type TextsBySendersQuery = orm.ModQuery[*dialect.SelectQuery, textsBySenders, TextsBySendersRow, []TextsBySendersRow, textsBySendersTransformer]
@ -48,8 +48,9 @@ func TextsBySenders(Destination string, Source string) *TextsBySendersQuery {
row.ScheduleScanByIndex(2, &t.Created)
row.ScheduleScanByIndex(3, &t.Source)
row.ScheduleScanByIndex(4, &t.Destination)
row.ScheduleScanByIndex(5, &t.IsWelcome)
row.ScheduleScanByIndex(6, &t.Origin)
row.ScheduleScanByIndex(5, &t.IsVisibleToLLM)
row.ScheduleScanByIndex(6, &t.IsWelcome)
row.ScheduleScanByIndex(7, &t.Origin)
return &t, nil
}, func(v any) (TextsBySendersRow, error) {
return *(v.(*TextsBySendersRow)), nil
@ -57,22 +58,23 @@ func TextsBySenders(Destination string, Source string) *TextsBySendersQuery {
},
},
Mod: bob.ModFunc[*dialect.SelectQuery](func(q *dialect.SelectQuery) {
q.AppendSelect(expressionTypArgs.subExpr(12, 97))
q.SetTable(expressionTypArgs.subExpr(108, 122))
q.AppendWhere(expressionTypArgs.subExpr(135, 214))
q.CombinedOrder.AppendOrder(expressionTypArgs.subExpr(230, 241))
q.AppendSelect(expressionTypArgs.subExpr(12, 120))
q.SetTable(expressionTypArgs.subExpr(131, 145))
q.AppendWhere(expressionTypArgs.subExpr(158, 237))
q.CombinedOrder.AppendOrder(expressionTypArgs.subExpr(253, 264))
}),
}
}
type TextsBySendersRow = struct {
ID int32 `db:"id"`
Content string `db:"content"`
Created time.Time `db:"created"`
Source string `db:"source"`
Destination string `db:"destination"`
IsWelcome bool `db:"is_welcome"`
Origin enums.CommsTextorigin `db:"origin"`
ID int32 `db:"id"`
Content string `db:"content"`
Created time.Time `db:"created"`
Source string `db:"source"`
Destination string `db:"destination"`
IsVisibleToLLM bool `db:"is_visible_to_llm"`
IsWelcome bool `db:"is_welcome"`
Origin enums.CommsTextorigin `db:"origin"`
}
type textsBySendersTransformer = bob.SliceTransformer[TextsBySendersRow, []TextsBySendersRow]
@ -86,8 +88,8 @@ func (o textsBySenders) args() iter.Seq[orm.ArgWithPosition] {
return func(yield func(arg orm.ArgWithPosition) bool) {
if !yield(orm.ArgWithPosition{
Name: "destination",
Start: 144,
Stop: 146,
Start: 167,
Stop: 169,
Expression: o.Destination,
}) {
return
@ -95,8 +97,8 @@ func (o textsBySenders) args() iter.Seq[orm.ArgWithPosition] {
if !yield(orm.ArgWithPosition{
Name: "source",
Start: 165,
Stop: 167,
Start: 188,
Stop: 190,
Expression: o.Source,
}) {
return
@ -104,8 +106,8 @@ func (o textsBySenders) args() iter.Seq[orm.ArgWithPosition] {
if !yield(orm.ArgWithPosition{
Name: "source",
Start: 191,
Stop: 193,
Start: 214,
Stop: 216,
Expression: o.Source,
}) {
return
@ -113,8 +115,8 @@ func (o textsBySenders) args() iter.Seq[orm.ArgWithPosition] {
if !yield(orm.ArgWithPosition{
Name: "destination",
Start: 212,
Stop: 214,
Start: 235,
Stop: 237,
Expression: o.Destination,
}) {
return