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

Method AddTool

agent/tools_executor.go:90–102  ·  view source on GitHub ↗
(tc coretools.ToolCall)

Source from the content-addressed store, hash-verified

88 }
89}
90
91func (e *StreamingToolExecutor) AddTool(tc coretools.ToolCall) bool {
92 e.mu.Lock()
93 slot := &ToolSlot{TC: tc, State: ToolStateQueued, abort: make(chan struct{}), done: make(chan struct{})}
94 e.slots[tc.ID] = slot
95 e.toolOrder = append(e.toolOrder, tc.ID)
96 canStart := e.canStartImmediatelyLocked(tc, false)
97 e.mu.Unlock()
98 if canStart {
99 e.launch(tc.ID)
100 return true
101 }
102 return false
103}
104
105func (e *StreamingToolExecutor) TryStartQueued(tcID string) bool {

Calls 2

launchMethod · 0.95