-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Subagents PR 4: Visual testing infrastructure #46189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rtfeldman
wants to merge
7
commits into
subagents-pr3
Choose a base branch
from
subagents-pr4
base: subagents-pr3
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+453
−837
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83398fc to
0b8868a
Compare
b80cf05 to
34766b4
Compare
b365fb8 to
01c26e6
Compare
1133398 to
2cd0264
Compare
- Add SubagentsFeatureFlag with staff-disabled default - Create SubagentTool with input schema for task/summary/context-low prompts - Register SubagentTool conditionally when feature flag is enabled - Tool returns stub message 'not yet implemented' for now Amp-Thread-ID: https://ampcode.com/threads/T-019b94c4-0a15-7799-aba2-83a644590a2e Co-authored-by: Amp <[email protected]>
- Add SubagentsFeatureFlag with staff-disabled default - Create SubagentTool with input schema for task/summary/context-low prompts - Register SubagentTool conditionally when feature flag is enabled - Tool returns stub message 'not yet implemented' for now Amp-Thread-ID: https://ampcode.com/threads/T-019b94c4-0a15-7799-aba2-83a644590a2e Co-authored-by: Amp <[email protected]>
Core subagent execution: - Add Thread::new_subagent() constructor for creating subagent threads - Implement SubagentTool::run() to spawn and manage subagent lifecycle - Add SubagentContext for parent-child thread relationship - Implement submit_user_message(), interrupt_for_summary(), request_final_summary() - Add timeout support and context-low detection - Propagate cancellation from parent to child threads Thread management: - Add MAX_SUBAGENT_DEPTH (4) and MAX_PARALLEL_SUBAGENTS (8) limits - Add register/unregister_running_subagent() for tracking - Add restrict_tools() for allowed_tools filtering - Add is_subagent(), depth(), is_turn_complete() accessors ACP thread changes: - Add ToolCallContent::SubagentThread variant - Add ToolCallUpdateSubagentThread for UI updates - Add tool_name field for subagent detection - Add is_subagent() method on ToolCall - Add image support in ContentBlock Comprehensive test coverage for all subagent scenarios
Thread view changes: - Add expanded_subagents state HashMap for tracking expanded cards - Implement render_subagent_tool_call() for collapsed card with label and chevron - Add subagent detection via is_subagent() and tool_name field - Handle SubagentThread content type in tool call rendering - Add expand/collapse toggle button for subagent cards - Style collapsed cards similar to terminal tool calls - Support inline image rendering in content blocks Agent panel changes: - Add open_external_thread_with_server() for testing with stubbed servers Test support: - Add acp_thread/test-support feature to agent_ui - Add base64 dev dependency for image tests
67a9b47 to
58f6a6f
Compare
- Add SubagentsFeatureFlag with staff-disabled default - Create SubagentTool with input schema for task/summary/context-low prompts - Register SubagentTool conditionally when feature flag is enabled - Tool returns stub message 'not yet implemented' for now Amp-Thread-ID: https://ampcode.com/threads/T-019b94c4-0a15-7799-aba2-83a644590a2e Co-authored-by: Amp <[email protected]>
Thread view changes: - Add expanded_subagents state HashMap for tracking expanded cards - Implement render_subagent_tool_call() for collapsed card with label and chevron - Add subagent detection via is_subagent() and tool_name field - Handle SubagentThread content type in tool call rendering - Add expand/collapse toggle button for subagent cards - Style collapsed cards similar to terminal tool calls - Support inline image rendering in content blocks Agent panel changes: - Add open_external_thread_with_server() for testing with stubbed servers Test support: - Add acp_thread/test-support feature to agent_ui - Add base64 dev dependency for image tests
Visual test runner enhancements: - Add agent panel visual test for thread with image - Support acp_thread, agent, agent_servers dependencies for visual tests - Add embedded test image constant - Initialize prompt_store and language_model subsystems - Add app assets to Application builder Test support helpers in connection.rs: - Add create_test_png_base64() for generating test PNG images - Add StubModelSelector for mocking model selection in tests - Add model_selector() to StubAgentConnection Build configuration: - Add acp_thread, agent, agent_servers, agent-client-protocol to visual-tests feature - Add base64 dependency for image encoding in tests - Add db/test-support for database testing
2cd0264 to
8f4dfe3
Compare
58f6a6f to
0771296
Compare
c539250 to
3c32d6f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:ai
Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features
cla-signed
The user has signed the Contributor License Agreement
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds visual testing infrastructure for the subagents feature:
Visual test runner enhancements
Test support helpers in connection.rs
create_test_png_base64()for generating test PNG imagesStubModelSelectorfor mocking model selection in testsmodel_selector()toStubAgentConnectionBuild configuration
Part of stacked PRs
This is PR 4 of 4 for the subagents feature: