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

Method queryLoop

agent/loop.go:439–719  ·  view source on GitHub ↗
(ctx context.Context, state *AgentState, out chan<- StreamEvent)

Source from the content-addressed store, hash-verified

437 }
438 e.skillRecoveryReady[agentScope] = true
439}
440
441func (e *CoreExecutionEngine) ResolvePermission(decision string, toolName string) {
442 e.mu.Lock()
443 ch := e.permissionFuture
444 e.mu.Unlock()
445 if ch == nil {
446 return
447 }
448 if decision == "" {
449 decision = PermissionDeny
450 }
451 select {
452 case ch <- permissionDecision{decision: decision, toolName: toolName}:
453 default:
454 }
455}
456
457func (e *CoreExecutionEngine) ResolveSkillPermission(granted bool) {
458 e.mu.Lock()
459 ch := e.skillPermissionCh
460 e.mu.Unlock()
461 if ch == nil {
462 return
463 }
464 select {
465 case ch <- granted:
466 default:
467 }
468}
469
470func (e *CoreExecutionEngine) SkillNames(cwd string) []string {
471 if e == nil || e.skillRegistry == nil {
472 return nil
473 }
474 if strings.TrimSpace(cwd) == "" {
475 cwd = e.Config.CWD
476 }
477 visible := e.skillRegistry.ListVisible(cwd)
478 names := make([]string, 0, len(visible))
479 for _, skill := range visible {
480 names = append(names, skill.CanonicalName)
481 }
482 sort.Strings(names)
483 return names
484}
485
486func (e *CoreExecutionEngine) ResolveMCPTrust(granted bool) {
487 e.mu.Lock()
488 ch := e.mcpTrustCh
489 e.mu.Unlock()
490 if ch == nil {
491 return
492 }
493 select {
494 case ch <- granted:
495 default:
496 }

Callers 1

QueryLoopMethod · 0.95

Calls 15

clearAbortMethod · 0.95
ensureMCPToolsMethod · 0.95
maybePromptMCPTrustMethod · 0.95
prefetchMemoryRecallMethod · 0.95
isAbortedMethod · 0.95
stripSkillMessagesMethod · 0.95
maybeCompressContextMethod · 0.95
BuildClientMethod · 0.95
BuildMessagesMethod · 0.95

Tested by

no test coverage detected