MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / waitForSessionCommits

Function waitForSessionCommits

test/session_memory_commit_test.go:209–224  ·  view source on GitHub ↗
(t *testing.T, cfg config.Config, sessionID string, want int)

Source from the content-addressed store, hash-verified

207}
208
209func sessionMemoryTestConfig(t *testing.T) config.Config {
210 t.Helper()
211 dir := t.TempDir()
212 cfg := config.NewConfigForCWD(dir)
213 cfg.SessionDir = filepath.Join(dir, "sessions")
214 cfg.SessionMemoryEnabled = true
215 cfg.SessionMemorySummaryModel = "fake-model"
216 cfg.SessionMemorySummaryMaxTokens = 128
217 cfg.SessionHistoryGetMessageLimit = 20
218 cfg.SessionMemoryMaxCommits = 200
219 cfg.SessionMemoryMaxMessages = 4000
220 return cfg
221}
222
223func sessionMemoryMessages(turns int) []map[string]any {
224 var messages []map[string]any
225 for i := 1; i <= turns; i++ {
226 messages = append(messages, map[string]any{
227 "role": "user",

Calls 5

OpenFunction · 0.92
fakeSummaryFunction · 0.85
AddMethod · 0.80
ListCommitsMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected