]> git.giacomolli.uk - onechat/blobdiff - prompt_test.go
Store the subagents and read them with zoom
[onechat] / prompt_test.go
index c9d3691ba038ab6830a9de6925c497663a22dd76..5b10597bb755c1f629eefd823ca588a12573f527 100644 (file)
@@ -16,6 +16,7 @@ func TestPromptNamesTheAgent(t *testing.T) {
        require.Contains(t, text, "- reply: Ada's replies")
        require.Contains(t, text, "Goal: let Ada work later")
        require.Contains(t, text, `- work: an agent's report, starting "[Name]"`)
+       require.Contains(t, text, "- zoom(id, 1) gives message id whole\n- zoom(\"Name\") gives an agent's whole chat\n")
        require.NotContains(t, text, promptName)
 
        // The old agent name is built from parts, so the source does not spell
@@ -25,7 +26,7 @@ func TestPromptNamesTheAgent(t *testing.T) {
 
 func TestPromptLeavesOutAbsentFeatures(t *testing.T) {
        text := prompt("Ada", "")
-       for _, absent := range []string{"image", "ubagent", "computer", "device", `zoom("Name")`, "instructions at the end"} {
+       for _, absent := range []string{"image", "ubagent", "computer", "device", "instructions at the end"} {
                require.NotContains(t, text, absent)
        }
 }
@@ -47,7 +48,7 @@ func TestPromptWithoutInstructionsHasNoClause(t *testing.T) {
 }
 
 func TestAgentToolsAreStrictAndStable(t *testing.T) {
-       tools := agentTools()
+       tools := promptTools()
        names := make([]string, len(tools))
        for n, tool := range tools {
                names[n] = tool.Name
@@ -67,7 +68,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)
        }