feat: chat with mcp tools

This commit is contained in:
lilong.129
2025-05-16 16:18:56 +08:00
parent a58ccffb28
commit a4cff1c98a
13 changed files with 544 additions and 124 deletions

View File

@@ -1,7 +1,6 @@
package hrp
import (
"context"
"crypto/tls"
_ "embed"
"fmt"
@@ -324,11 +323,6 @@ func NewCaseRunner(testcase TestCase, hrpRunner *HRPRunner) (*CaseRunner, error)
log.Error().Err(err).Msg("init MCP hub failed")
return nil, err
}
err = mcpHost.InitServers(context.Background())
if err != nil {
log.Error().Err(err).Msg("init MCP servers failed")
return nil, err
}
caseRunner.parser.MCPHost = mcpHost
log.Info().Str("mcpConfigPath", config.MCPConfigPath).Msg("mcp server loaded")
}