def _create_follow_up_response(self, content: str, follow_up_data: dict, request) -> ToolOutput:
        """
        Create a response with follow-up question for conversation threading.

        Args:
            content: The main response content
            follow_up_data: Dict containing follow_up_question and optional suggested_params
            request: Original request for context

        Returns:
            ToolOutput configured for conversation continuation
        """
        # Create or get thread ID
        continuation_id = getattr(request, "continuation_id", None)

        if continuation_id:
            # This is a continuation - add this turn to existing thread
            request_files = getattr(request, "files", []) or []
            success = add_turn(
                continuation_id,
                "assistant",
                content,
                follow_up_question=follow_up_data.get("follow_up_question"),
                files=request_files,
                tool_name=self.name,
            )
            if not success:
                # Thread not found or at limit, return normal response
                return ToolOutput(
                    status="success",
                    content=content,
                    content_type="markdown",
                    metadata={"tool_name": self.name},
                )
            thread_id = continuation_id
        else:
            # Create new thread
            try:
                thread_id = create_thread(
                    tool_name=self.name, initial_request=request.model_dump() if hasattr(request, "model_dump") else {}
                )

                # Add the assistant's response with follow-up
                request_files = getattr(request, "files", []) or []
                add_turn(
                    thread_id,
                    "assistant",
                    content,
                    follow_up_question=follow_up_data.get("follow_up_question"),
                    files=request_files,
                    tool_name=self.name,
                )
            except Exception as e:
                # Threading failed, return normal response
                logger = logging.getLogger(f"tools.{self.name}")
                logger.warning(f"Follow-up threading failed in {self.name}: {str(e)}")
                return ToolOutput(
                    status="success",
                    content=content,
                    content_type="markdown",
                    metadata={"tool_name": self.name, "follow_up_error": str(e)},
                )

        # Create follow-up request
        follow_up_request = FollowUpRequest(
            continuation_id=thread_id,
            question_to_user=follow_up_data["follow_up_question"],
            suggested_tool_params=follow_up_data.get("suggested_params"),
            ui_hint=follow_up_data.get("ui_hint"),
        )

        # Strip the JSON block from the content since it's now in the follow_up_request
        clean_content = self._remove_follow_up_json(content)

        return ToolOutput(
            status="requires_continuation",
            content=clean_content,
            content_type="markdown",
            follow_up_request=follow_up_request,
            metadata={"tool_name": self.name, "thread_id": thread_id},
        )

        Create a response with follow-up question for conversation threading.

        Args:
            content: The main response content
            follow_up_data: Dict containing follow_up_question and optional suggested_params
            request: Original request for context

        Returns:
            ToolOutput configured for conversation continuation
        
tools/base.py