diff --git a/.github/workflows/build-and-push-tutorial-agent.yml b/.github/workflows/build-and-push-tutorial-agent.yml index 4492b3a5f..48d511b0e 100644 --- a/.github/workflows/build-and-push-tutorial-agent.yml +++ b/.github/workflows/build-and-push-tutorial-agent.yml @@ -71,10 +71,15 @@ jobs: echo "### 🔄 Rebuilding All Tutorial Agents" >> $GITHUB_STEP_SUMMARY else - # Always compare against main branch - BASE_BRANCH="origin/main" - echo "Comparing against main branch: $BASE_BRANCH" - + # Determine the base branch for comparison + if [ "${{ github.event_name }}" = "pull_request" ]; then + BASE_BRANCH="origin/${{ github.base_ref }}" + echo "Comparing against PR base branch: $BASE_BRANCH" + else + # For pushes to main, compare against the first parent (pre-merge state) + BASE_BRANCH="HEAD^1" + echo "Comparing against previous commit: $BASE_BRANCH" + fi # Check each agent directory for changes for agent_dir in $all_agents; do echo "Checking $agent_dir for changes..." diff --git a/examples/tutorials/00_sync/000_hello_acp/project/acp.py b/examples/tutorials/00_sync/000_hello_acp/project/acp.py index 3299cf5ea..21a7f9e77 100644 --- a/examples/tutorials/00_sync/000_hello_acp/project/acp.py +++ b/examples/tutorials/00_sync/000_hello_acp/project/acp.py @@ -21,7 +21,7 @@ async def handle_message_send( ) -> Union[TaskMessageContent, AsyncGenerator[TaskMessageUpdate, None]]: """Default message handler with streaming support""" # Extract content safely from the message - logger.info("msg 2", params) + message_text = "" if hasattr(params.content, "content"): content_val = getattr(params.content, "content", "")