This repository was archived by the owner on Sep 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
This repository was archived by the owner on Sep 23, 2025. It is now read-only.
Use review shell context for action button routing #26
Copy link
Copy link
Open
Description
Enhancement Request
When a review is active (presented via present_review or present_walkthrough), action buttons should send messages back to the same AI assistant that created the review, rather than requiring terminal disambiguation.
Current Behavior
Action buttons use generic terminal detection:
- Find all terminals with active MCP servers
- If multiple found, show picker to user
- Send message to selected terminal
Proposed Behavior
Action buttons should be context-aware:
- If review is active, send to the originating shell that presented the review
- Only fall back to disambiguation if no active review context
Implementation Notes
Review Context Tracking:
- Track
shellPidwhenpresent_revieworpresent_walkthroughis called - Store in review provider state:
currentReviewShellPid?: number - Clear when review is closed/replaced
Action Button Routing:
// In sendToActiveShell()
if (this.currentReviewShellPid) {
// Find terminal matching the review's shell PID
const reviewTerminal = terminals.find(t => t.processId === this.currentReviewShellPid);
if (reviewTerminal) {
reviewTerminal.sendText(message, false);
return; // Skip disambiguation
}
}
// Fall back to current disambiguation logicSecondary Enhancement
Ask Socratic Shell Integration:
- Also use review shell context for Ask Socratic Shell disambiguation
- When user selects code and clicks "Ask Socratic Shell", prefer the terminal that presented the current review
- Provides more intuitive workflow when working with active reviews
Benefits
- Better UX: No disambiguation needed when context is clear
- Consistent conversation: Messages go to the same AI that created the review
- Workflow continuity: Natural back-and-forth with the reviewing AI assistant
Priority
Medium - enhances UX but current implementation works functionally.
Metadata
Metadata
Assignees
Labels
No labels