Scope durable assistant memory to principal
CI / test (push) Successful in 1m3s
CI / test (pull_request) Successful in 1m1s

This commit is contained in:
m
2026-08-25 02:56:00 +03:00
parent 98f1454b3c
commit dfecab7c34
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -102,8 +102,8 @@ func (r *InteractionRepository) Utterances(ctx context.Context, id interaction.C
// RecentUtterancesForPrincipal provides durable conversational context when a
// client starts a fresh conversation instead of carrying the previous ID.
func (r *InteractionRepository) RecentUtterancesForPrincipal(ctx context.Context, actorID identity.ActorID, principalID identity.PrincipalID, limit int) ([]interaction.HumanUtterance, error) {
rows, err := r.pool.Query(ctx, `SELECT utterance_id,conversation_id,actor_id,principal_id,channel,received_at_unix_millis,correlation_id,content,content_ref,speech_act,interpretation_state,corrects_utterance_id FROM interaction.utterances WHERE actor_id=$1 AND principal_id=$2 ORDER BY received_at_unix_millis DESC, utterance_id DESC LIMIT $3`, actorID, principalID, limit)
func (r *InteractionRepository) RecentUtterancesForPrincipal(ctx context.Context, principalID identity.PrincipalID, limit int) ([]interaction.HumanUtterance, error) {
rows, err := r.pool.Query(ctx, `SELECT utterance_id,conversation_id,actor_id,principal_id,channel,received_at_unix_millis,correlation_id,content,content_ref,speech_act,interpretation_state,corrects_utterance_id FROM interaction.utterances WHERE principal_id=$1 ORDER BY received_at_unix_millis DESC, utterance_id DESC LIMIT $2`, principalID, limit)
if err != nil {
return nil, err
}