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

Method Dispose

pkg/sandbox/cloud/volcengine.go:160–171  ·  view source on GitHub ↗

Dispose 清理资源

()

Source from the content-addressed store, hash-verified

158
159// Dispose 清理资源
160func (vs *VolcengineSandbox) Dispose() error {
161 if vs.sessionID == "" {
162 return nil
163 }
164
165 // 终止沙箱会话
166 _, err := vs.mcpClient.CallTool(context.Background(), "computer_terminate", map[string]any{
167 "session_id": vs.sessionID,
168 })
169
170 return err
171}
172
173// initSession 初始化沙箱会话
174func (vs *VolcengineSandbox) initSession(ctx context.Context) error {

Callers 1

testVolcengineFunction · 0.95

Calls 1

CallToolMethod · 0.45

Tested by

no test coverage detected