X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/4a605fa39078354654ae648e489c117c7a445197..de170709599e849c6b409d247b800dc68b0c7ab7:/prompt_test.go diff --git a/prompt_test.go b/prompt_test.go index 4c88ad8..902cb86 100644 --- a/prompt_test.go +++ b/prompt_test.go @@ -47,8 +47,13 @@ func TestPromptWithoutInstructionsHasNoClause(t *testing.T) { } func TestAgentToolsAreStrictAndStable(t *testing.T) { - tools := agentTools() - require.Equal(t, []string{"zoom", "date"}, []string{tools[0].Name, tools[1].Name}) + tools := promptTools() + names := make([]string, len(tools)) + for n, tool := range tools { + names[n] = tool.Name + } + + require.Equal(t, []string{"zoom", "date", "shell", "read", "write", "edit"}, names) for _, tool := range tools { schema := tool.Parameters.(map[string]any) @@ -62,7 +67,7 @@ func TestAgentToolsAreStrictAndStable(t *testing.T) { require.NoError(t, err) for range 10 { - again, err := json.Marshal(agentTools()) + again, err := json.Marshal(promptTools()) require.NoError(t, err) require.Equal(t, first, again) }