Skip to content

Commit

Permalink
unpaginate summart retrieval (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielchalef authored Sep 18, 2023
1 parent cc6f6a8 commit 91925fc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/server/webhandlers/session_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,16 @@ func (m *SessionDetails) Get(ctx context.Context, appState *models.AppState) err
return nil
}

// pageSize needs to be >= MessageList page size so that we get all summaries related to the messages
// TODO: this may break under some circumstances. fix it.
// GetSummaryList returns a list of summaries for the given session. It can be
// paginated, but we are not using pagination to ensure that we retrieve all summaries for
// the messages we're displaying.
// Hacky solution: set the page offset to 0 and the limit to a large number
summaries, err := m.MemoryStore.GetSummaryList(
ctx,
appState,
m.SessionID,
m.CurrentPage,
m.PageSize,
0,
9999,
)
if err != nil {
return err
Expand Down

0 comments on commit 91925fc

Please sign in to comment.