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

Method buildOrRefreshSystemPrompt

agent/query_engine.go:213–228  ·  view source on GitHub ↗
(state *AgentState)

Source from the content-addressed store, hash-verified

211 state.Messages = append(state.Messages, q.CoreEngine.skillRegistryMessage(*skill, *execution.Prompt))
212 }
213 q.recordSkillInvocation(*skill, execution, state.TurnCount)
214 }
215 q.commitUserTurn(state, normalizedPrompt)
216 for event := range q.CoreEngine.QueryLoop(ctx, state) {
217 sendStream(ctx, out, event)
218 }
219 }()
220 return out
221}
222
223func (q *QueryEngine) buildOrRefreshSystemPrompt(state *AgentState) {
224 if state == nil {
225 return
226 }
227 cfg := q.Config
228 cfg.CWD = skills.ResolveSkillContextCWD(q.Config.CWD, nil)
229 memorySection := ""
230 if q.Config.LongTermMemoryEnabled {
231 memorySection = agentContext.BuildMemorySection(&q.Config)

Callers 1

SubmitMessageMethod · 0.95

Calls 5

ResolveSkillContextCWDFunction · 0.92
BuildMemorySectionFunction · 0.92
BuildSystemPromptFunction · 0.70

Tested by

no test coverage detected