X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/4343ca5fb6cc86eb887951f4fe16063bab29a238..7b8d8e8f4b57bd51fd6d0f0d926b821f06b0e1f0:/prompt_test.go diff --git a/prompt_test.go b/prompt_test.go index e9e87f3..888057f 100644 --- a/prompt_test.go +++ b/prompt_test.go @@ -129,7 +129,7 @@ func TestProbePromptKeepsTheInstructionsPathStable(t *testing.T) { func TestAgentToolsAreStrictAndStable(t *testing.T) { tools := promptTools() - require.Equal(t, []string{"zoom", "date", "shell", "read", "write", "edit", "spawn", "agent_create", "tell", "whatsapp_find", "whatsapp_send", "route", "unroute", "routes", "schedule_set", "schedule_list", "schedule_remove"}, promptToolNames(tools)) + require.Equal(t, []string{"zoom", "date", "shell", "read", "write", "edit", "spawn", "agent_create", "tell", "image_show", "whatsapp_find", "whatsapp_send", "route", "unroute", "routes", "schedule_set", "schedule_list", "schedule_remove"}, promptToolNames(tools)) require.Equal(t, []string{"zoom", "date", "shell", "read", "write", "edit"}, promptToolNames(promptSubagentTools())) for _, tool := range tools { @@ -166,3 +166,14 @@ func TestRootPromptDefinesChildRoutingAndConsent(t *testing.T) { require.NotContains(t, child, "Use agent_create") require.Contains(t, child, "Send nothing to WhatsApp. Draft replies in your report instead") } + +func TestRootPromptKeepsImageConsentAndChildForwardingRules(t *testing.T) { + text := prompt("Ada", "/AGENT/instructions.md", "") + require.Contains(t, text, "Use image_show or whatsapp_send with an image only on the user's request.") + require.Contains(t, text, "Pass an image to a child with an [image FILE] line in tell.") + + child := promptChild("House", "Ada", "Keep house plans.", "/CHILD/instructions.md", "") + require.Contains(t, child, "Send nothing to WhatsApp. Draft replies in your report instead") + require.NotContains(t, promptToolNames(promptSubagentTools()), "image_show") + require.NotContains(t, promptToolNames(promptSubagentTools()), "whatsapp_send") +}