Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 20, 2025

Description

This PR implements the AI Deep Research feature with real-time Server-Sent Events (SSE) support as described in issue #5962.

What's Included

Core Implementation

  • aiDeepResearchTool.ts: New tool for handling AI deep research requests
  • AIDeepResearchService.ts: Service for SSE communication with the node-DeepResearch-ai server
  • AIDeepResearchBlock.tsx: React component for displaying research progress in real-time

Integration

  • Added ai_deep_research to tool types and registration in shared/tools.ts
  • Updated ClineSayTool interface to include aiDeepResearch
  • Added ai_deep_research_result to ClineSay types for UI communication
  • Integrated the tool in presentAssistantMessage.ts
  • Added UI integration in ChatRow.tsx

UI/UX

  • Real-time status updates showing:
    • Thinking process
    • Web searching
    • Reading sources
    • Analyzing information
    • Final results
  • Collapsible UI component with status indicators
  • Localization support with translation keys

Testing

  • Comprehensive unit tests for aiDeepResearchTool
  • All tests passing

How It Works

  1. The AI requests to use the ai_deep_research tool with a query
  2. The tool connects to the node-DeepResearch-ai server via SSE
  3. Real-time updates are streamed to the UI showing the research progress
  4. The final result is displayed in a formatted markdown view

Server Configuration

The server URL can be configured via VSCode settings:

Screenshots

The implementation provides a clean, real-time UI that shows the AI's research process transparently to the user.

Closes #5962


Important

Implements AI Deep Research feature with real-time SSE support, including new tools, services, UI components, and integration with existing systems.

  • Core Implementation:
    • Adds aiDeepResearchTool.ts for handling AI deep research requests.
    • Adds AIDeepResearchService.ts for SSE communication with the server.
    • Adds AIDeepResearchBlock.tsx for displaying research progress.
  • Integration:
    • Registers ai_deep_research in shared/tools.ts and updates ClineSayTool interface.
    • Integrates tool in presentAssistantMessage.ts and ChatRow.tsx.
  • UI/UX:
    • Real-time status updates for thinking, searching, reading, analyzing, and results.
    • Collapsible UI component with status indicators.
    • Localization support with translation keys.
  • Testing:
    • Adds unit tests for aiDeepResearchTool in aiDeepResearchTool.test.ts.
  • Misc:
    • Adds server configuration option in VSCode settings.

This description was created by Ellipsis for 85d07ce. You can customize this summary. It will automatically update as commits are pushed.

- Add aiDeepResearchTool.ts for handling AI deep research requests
- Create AIDeepResearchService.ts for SSE communication with server
- Add AIDeepResearchBlock.tsx UI component for displaying research progress
- Update tool types and registration in shared/tools.ts
- Add ai_deep_research to ClineSayTool interface
- Add ai_deep_research_result to ClineSay types
- Update presentAssistantMessage.ts to handle the new tool
- Add UI integration in ChatRow.tsx
- Add translation keys for AI Deep Research
- Add comprehensive tests for aiDeepResearchTool

This implementation provides real-time streaming of AI research progress
including thinking, searching, reading, and analyzing states.
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 20, 2025 01:29
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request UI/UX UI/UX related or focused labels Jul 20, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 20, 2025
// Simple parsing logic - in a real implementation, the server would send structured events
// For now, we'll use heuristics to determine the event type

if (content.includes("thinking") || content.includes("analyzing")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parseEventFromContent heuristic currently returns type 'thinking' for any content that includes 'analyzing'. This causes the onAnalyzing callback never to fire. Consider refining the logic to return 'analyzing' when appropriate so that UI events reflect the correct state.

<div className="flex items-center gap-2 flex-1">
{getStatusIcon()}
<span className="font-medium text-vscode-foreground">
{t("aiDeepResearch.title", "AI Deep Research")}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using inline default fallback strings in translation calls. Remove the second argument (e.g. 'AI Deep Research' for t('aiDeepResearch.title', 'AI Deep Research')) so translations rely solely on the language files.

Suggested change
{t("aiDeepResearch.title", "AI Deep Research")}
{t("aiDeepResearch.title")}

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

@daniel-lxs
Copy link
Member

Seems like issue #5962 was created accidentally

@daniel-lxs daniel-lxs closed this Jul 21, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 21, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XL This PR changes 500-999 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

🚀 Implementar AI Deep Research com SSE em Tempo Real

4 participants