(t *testing.T)
| 619 | } |
| 620 | |
| 621 | func TestStopAfterPlanTools(t *testing.T) { |
| 622 | t.Parallel() |
| 623 | |
| 624 | planMode := database.NullChatPlanMode{ |
| 625 | ChatPlanMode: database.ChatPlanModePlan, |
| 626 | Valid: true, |
| 627 | } |
| 628 | |
| 629 | t.Run("NormalModeReturnsNil", func(t *testing.T) { |
| 630 | t.Parallel() |
| 631 | require.Nil(t, stopAfterPlanTools(database.NullChatPlanMode{}, uuid.NullUUID{})) |
| 632 | }) |
| 633 | |
| 634 | t.Run("RootPlanModeIncludesClarificationTool", func(t *testing.T) { |
| 635 | t.Parallel() |
| 636 | require.Equal(t, map[string]struct{}{ |
| 637 | "propose_plan": {}, |
| 638 | "ask_user_question": {}, |
| 639 | }, stopAfterPlanTools(planMode, uuid.NullUUID{})) |
| 640 | }) |
| 641 | |
| 642 | t.Run("ChildPlanModeSkipsClarificationTool", func(t *testing.T) { |
| 643 | t.Parallel() |
| 644 | require.Equal(t, map[string]struct{}{ |
| 645 | "propose_plan": {}, |
| 646 | }, stopAfterPlanTools(planMode, uuid.NullUUID{UUID: uuid.New(), Valid: true})) |
| 647 | }) |
| 648 | } |
| 649 | |
| 650 | func TestStopAfterBehaviorTools(t *testing.T) { |
| 651 | t.Parallel() |
nothing calls this directly
no test coverage detected