internal/mcp: rename NewXXX->NewServerXXX
The NewTool and NewPrompt constructors were unidiomatic, because they returned a ServerTool and ServerPrompt, respectively, rather than a Tool and Prompt. Rename to be consistent with the constructed object name. Change-Id: Ife3f16f783368401f792660c4272e1bb5ae61638 Reviewed-on: https://go-review.googlesource.com/c/tools/+/682375 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
This commit is contained in:
parent
d2f2f87bbe
commit
9453d6bf6c
1 changed files with 76 additions and 74 deletions
|
|
@ -27,9 +27,9 @@ func SayHi(ctx context.Context, cc *ServerSession, params *CallToolParamsFor[Say
|
|||
}
|
||||
|
||||
func TestFeatureSetOrder(t *testing.T) {
|
||||
toolA := NewTool("apple", "apple tool", SayHi).Tool
|
||||
toolB := NewTool("banana", "banana tool", SayHi).Tool
|
||||
toolC := NewTool("cherry", "cherry tool", SayHi).Tool
|
||||
toolA := NewServerTool("apple", "apple tool", SayHi).Tool
|
||||
toolB := NewServerTool("banana", "banana tool", SayHi).Tool
|
||||
toolC := NewServerTool("cherry", "cherry tool", SayHi).Tool
|
||||
|
||||
testCases := []struct {
|
||||
tools []*Tool
|
||||
|
|
@ -52,9 +52,9 @@ func TestFeatureSetOrder(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFeatureSetAbove(t *testing.T) {
|
||||
toolA := NewTool("apple", "apple tool", SayHi).Tool
|
||||
toolB := NewTool("banana", "banana tool", SayHi).Tool
|
||||
toolC := NewTool("cherry", "cherry tool", SayHi).Tool
|
||||
toolA := NewServerTool("apple", "apple tool", SayHi).Tool
|
||||
toolB := NewServerTool("banana", "banana tool", SayHi).Tool
|
||||
toolC := NewServerTool("cherry", "cherry tool", SayHi).Tool
|
||||
|
||||
testCases := []struct {
|
||||
tools []*Tool
|
||||
|
|
|
|||
Loading…
Reference in a new issue