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

Method commitUserTurn

agent/query_engine.go:366–388  ·  view source on GitHub ↗
(state *AgentState, normalizedPrompt string)

Source from the content-addressed store, hash-verified

364 }
365 path := skill.SkillFile
366 if path == "" {
367 path = skill.Directory
368 }
369 q.CoreEngine.skillPersistence.RecordInvocation("main", skill.CanonicalName, path, *execution.Prompt, turnCount)
370}
371
372func (e *CoreExecutionEngine) skillRegistryMessage(skill skills.SkillSpec, prompt string) map[string]any {
373 loader := skills.NewSkillLoader(e.Config)
374 executor := skills.NewSkillExecutor(loader, skills.NewPromptProcessor(e.Config))
375 return executor.BuildInlineSkillMessage(skill, prompt, true)
376}
377
378func (q *QueryEngine) commitUserTurn(state *AgentState, normalizedPrompt string) {
379 if !state.MemoryQueryTimeExplicit || state.MemoryQueryTime.IsZero() {
380 state.MemoryQueryTime = queryReferenceTimeFromMessages(state.Messages, normalizedPrompt)
381 if state.MemoryQueryTime.IsZero() {
382 state.MemoryQueryTime = time.Now().UTC()
383 }
384 }
385 state.MemoryQueryTimeExplicit = false
386 if stateHasConsecutiveUserPrompt(state, normalizedPrompt) {
387 state.LastQuery = normalizedPrompt
388 if q.CoreEngine != nil {
389 q.CoreEngine.LastState = state
390 }
391 return

Callers 1

SubmitMessageMethod · 0.95

Calls 1

Tested by

no test coverage detected