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

Method buildExecutionContext

agent/subagent.go:511–527  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

509 messages = append(messages, map[string]any{"role": "user", "content": []map[string]any{{"type": "text", "text": prompt}}})
510 return messages
511}
512
513func (s *SubAgent) longTermAgentMemoryBehavior() string {
514 agentType := strings.TrimSpace(s.AgentType)
515 if agentType == "" {
516 agentType = strings.TrimSpace(s.Definition.Name)
517 }
518 if agentType == "" {
519 agentType = "subagent"
520 }
521 return fmt.Sprintf("## Role Long-Term Memory\n\nAgent-type memory: `%s`.\n\nThis sub-agent may receive long-term memories for user, project, and agent_type scopes. Treat recalled memories as durable hints and verify current project files before relying on code or path claims. Do not write memory files directly; durable memories are extracted by LuminaCode's structured memory runtime.", agentType)
522}
523
524func (s *SubAgent) sessionIDForMemoryUse() string {
525 if value, _ := s.ExtraContext["_session_id"].(string); value != "" {
526 return value
527 }
528 if value, _ := s.ExtraContext["session_id"].(string); value != "" {
529 return value
530 }

Callers 1

ExecuteOneRequestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected