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

Method buildCommandMessage

pkg/commands/executor.go:101–115  ·  view source on GitHub ↗

buildCommandMessage 构建命令消息

(cmd *CommandDefinition, prompt string)

Source from the content-addressed store, hash-verified

99
100// buildCommandMessage 构建命令消息
101func (e *Executor) buildCommandMessage(cmd *CommandDefinition, prompt string) string {
102 var builder strings.Builder
103
104 // 添加命令标识
105 builder.WriteString(fmt.Sprintf("## Executing Command: /%s\n\n", cmd.Name))
106
107 if cmd.Description != "" {
108 builder.WriteString(fmt.Sprintf("**Description**: %s\n\n", cmd.Description))
109 }
110
111 // 添加提示词内容
112 builder.WriteString(prompt)
113
114 return builder.String()
115}
116
117// CheckCapabilities 检查模型能力
118func (e *Executor) CheckCapabilities(cmd *CommandDefinition) error {

Callers 1

ExecuteMethod · 0.95

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected