MCPcopy Create free account
hub / github.com/astercloud/aster / NewCodeExecuteToolWithBridge

Function NewCodeExecuteToolWithBridge

pkg/tools/builtin/codeexecute.go:45–51  ·  view source on GitHub ↗

NewCodeExecuteToolWithBridge 创建带桥接器的代码执行工具

(toolBridge *bridge.ToolBridge)

Source from the content-addressed store, hash-verified

43
44// NewCodeExecuteToolWithBridge 创建带桥接器的代码执行工具
45func NewCodeExecuteToolWithBridge(toolBridge *bridge.ToolBridge) *CodeExecuteTool {
46 return &CodeExecuteTool{
47 runtimeManager: bridge.NewRuntimeManager(nil),
48 toolBridge: toolBridge,
49 bridgeURL: "http://localhost:8080", // 默认桥接 URL
50 }
51}
52
53// SetBridgeURL 设置 HTTP 桥接服务器地址
54func (t *CodeExecuteTool) SetBridgeURL(url string) {

Callers 2

mainFunction · 0.92
mainFunction · 0.92

Calls 1

NewRuntimeManagerFunction · 0.92

Tested by

no test coverage detected