]> git.giacomolli.uk - onechat/blobdiff - prompt_test.go
Name and order the memory core code
[onechat] / prompt_test.go
index 4c88ad8a80d2683573ccc877523488691f6de5ac..902cb8677e7d3617f901e4b716c8237a229b701a 100644 (file)
@@ -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)
        }