(t *testing.T)
| 648 | } |
| 649 | |
| 650 | func TestStopAfterBehaviorTools(t *testing.T) { |
| 651 | t.Parallel() |
| 652 | |
| 653 | planMode := database.NullChatPlanMode{ |
| 654 | ChatPlanMode: database.ChatPlanModePlan, |
| 655 | Valid: true, |
| 656 | } |
| 657 | exploreMode := database.NullChatMode{ |
| 658 | ChatMode: database.ChatModeExplore, |
| 659 | Valid: true, |
| 660 | } |
| 661 | |
| 662 | t.Run("DefaultModeReturnsNil", func(t *testing.T) { |
| 663 | t.Parallel() |
| 664 | require.Nil(t, stopAfterBehaviorTools( |
| 665 | database.NullChatPlanMode{}, |
| 666 | database.NullChatMode{}, |
| 667 | uuid.NullUUID{}, |
| 668 | )) |
| 669 | }) |
| 670 | |
| 671 | t.Run("PlanModeDelegatesToPlanTools", func(t *testing.T) { |
| 672 | t.Parallel() |
| 673 | require.Equal(t, stopAfterPlanTools(planMode, uuid.NullUUID{}), stopAfterBehaviorTools( |
| 674 | planMode, |
| 675 | database.NullChatMode{}, |
| 676 | uuid.NullUUID{}, |
| 677 | )) |
| 678 | }) |
| 679 | |
| 680 | t.Run("ExploreModeReturnsNil", func(t *testing.T) { |
| 681 | t.Parallel() |
| 682 | require.Nil(t, stopAfterBehaviorTools(planMode, exploreMode, uuid.NullUUID{})) |
| 683 | }) |
| 684 | } |
| 685 | |
| 686 | // TestWaitForActiveChatStop and TestWaitForActiveChatStop_WaitsForReplacementRun |
| 687 | // were removed along with the process-local activeChats mechanism. |
nothing calls this directly
no test coverage detected