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

Method getCleanupInfo

pkg/tools/builtin/killshell.go:294–310  ·  view source on GitHub ↗

getCleanupInfo 获取清理信息

(task *TaskInfo)

Source from the content-addressed store, hash-verified

292
293// getCleanupInfo 获取清理信息
294func (t *KillShellTool) getCleanupInfo(task *TaskInfo) map[string]any {
295 if task == nil || task.Options == nil {
296 return map[string]any{
297 "files_cleared": 0,
298 "cleanup_method": "not_available",
299 }
300 }
301
302 return map[string]any{
303 "output_file": fmt.Sprintf("%s/%s.stdout", task.Options.OutputDir, task.ID),
304 "error_file": fmt.Sprintf("%s/%s.stderr", task.Options.OutputDir, task.ID),
305 "task_file": fmt.Sprintf("%s/%s.json", "/tmp/agentsdk_tasks", task.ID),
306 "files_cleared": 3,
307 "cleanup_method": "file_truncate_and_remove",
308 "cleanup_timestamp": time.Now().Unix(),
309 }
310}
311
312func (t *KillShellTool) Prompt() string {
313 return `终止后台运行的shell进程。

Callers 1

ExecuteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected