Skip to content

feat: web search and improve chat with tools#810

Merged
graphite-app[bot] merged 1 commit intomainfrom
03-26-feat_web_search_and_improve_chat_with_tools
Mar 27, 2026
Merged

feat: web search and improve chat with tools#810
graphite-app[bot] merged 1 commit intomainfrom
03-26-feat_web_search_and_improve_chat_with_tools

Conversation

@MaheshtheDev
Copy link
Member

No description provided.

@MaheshtheDev MaheshtheDev marked this pull request as ready for review March 27, 2026 01:24
Copy link
Member Author


How to use the Graphite Merge Queue

Add the label Main to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link

claude bot commented Mar 27, 2026

Claude finished @MaheshtheDev's task in 1m 4s —— View job


Re-reviewing PR after new commits

  • Fetch latest PR diff
  • Review changes for bugs, security issues, and logic errors
  • Submit review summary

Overview: Adds web search tool support to chat UI, refactors memory result cards into a shared component, and removes the follow-up questions feature.

Issues found: None — this looks good to ship.

The code changes are well-structured:

  • New MemorySearchResultCard component properly handles null checks and URL validation
  • memoryResultsFromSearchToolOutput utility gracefully normalizes different API response shapes with appropriate fallbacks
  • Web sources grouping logic correctly batches consecutive source-url parts
  • Dynamic tool handling properly maps output-error state for display
  • Error text now displayed when tool calls fail (errorText support added)
  • No XSS concerns — URLs are used safely in href attributes with rel="noopener noreferrer"

The latest commit (a05903f) fixed a lint issue, and the code remains solid.

Score: 10/10

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 27, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
supermemory-app 57748ea Mar 27 2026, 02:01 AM

Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Overview: Adds web search tool support to chat UI, refactors memory result cards into a shared component, and removes the follow-up questions feature.

Issues found: None — this looks good to ship.

The code changes are well-structured:

  • New MemorySearchResultCard component properly handles null checks and URL validation
  • memoryResultsFromSearchToolOutput utility gracefully normalizes different API response shapes with appropriate fallbacks
  • Web sources grouping logic correctly batches consecutive source-url parts
  • Dynamic tool handling properly maps output-error state for display
  • No XSS concerns — URLs are used safely in href attributes with rel="noopener noreferrer"

Score: 10/10

@entelligence-ai-pr-reviews
Copy link

entelligence-ai-pr-reviews bot commented Mar 27, 2026

EntelligenceAI PR Summary

Removes the follow-up questions feature and introduces web search tool support in the chat UI, alongside a refactor of memory result rendering into shared components and utilities.

  • Deleted FollowUpQuestions component and all associated state, props, effects, and analytics tracking (follow_up source, chatFollowUpClicked)
  • Updated chat API endpoint from /chat/v2 to /chat in apps/web/components/chat/index.tsx
  • Added WebSourcesGroup component and handlers for source-url, source-document, dynamic-tool, and output-error part types in agent-message.tsx
  • Added web search tool step tracking (streaming/completed/failed/fallback) in chain-of-thought.tsx
  • Introduced MemorySearchResultCard reusable component (memory-search-result-card.tsx) with sidebar/input tone variants
  • Introduced chat-search-memory-results.ts with ChatMemoryCard type, memoryResultsFromSearchToolOutput, and getMemoryCardDisplay utilities
  • Introduced chat-web-search-tools.ts with isWebSearchToolName utility
  • Refactored RelatedMemories and ChainOfThought to use new shared memory card abstractions

Confidence Score: 4/5 - Mostly Safe

Safe to merge — this PR cleanly removes the FollowUpQuestions component and its associated state/effects/analytics while introducing web search tool support with source-url, source-document, and dynamic-tool message part rendering in AgentMessage, along with a collapsible WebSourcesGroup component. The API endpoint migration from /chat/v2 to /chat in ChatSidebar and the additions to TOOL_NAMES for web_search and google_search appear straightforward and low-risk. No review comments were generated across 8 of 9 changed files, suggesting the implementation is clean and well-structured.

Key Findings:

  • The removal of FollowUpQuestions component along with all its state, effects, props, and analytics tracking appears complete — no dangling references or orphaned props are flagged, reducing dead-code risk.
  • The new WebSourcesGroup collapsible component and rendering logic for source-url, source-document, and dynamic-tool message parts in AgentMessage introduce new UI surface area but no reviewer identified null-safety or rendering edge case concerns.
  • The /chat/v2 to /chat endpoint migration in ChatSidebar is a behavioral change that could affect production traffic, but no issues were flagged, suggesting the backend is ready to support this.
  • One file of nine was not reviewed, leaving a small gap in coverage, but given zero issues across all reviewed files this is a minor concern rather than a blocking one.
Files requiring special attention
  • ChatSidebar (endpoint migration from /chat/v2 to /chat)
  • AgentMessage (new message part rendering logic)
  • WebSourcesGroup (new collapsible component)

@entelligence-ai-pr-reviews
Copy link

Walkthrough

This PR removes the follow-up questions feature entirely from the chat UI and analytics layer, while introducing web search tool support (web_search, google_search) in the agent message and chain-of-thought components. Memory result rendering is refactored into a reusable MemorySearchResultCard component with shared parsing utilities. The chat API endpoint is updated from /chat/v2 to /chat.

Changes

File(s) Summary
apps/web/components/chat/index.tsx Removes follow-up questions state, refs, effects, and API call; removes related props passed to message component; updates chat endpoint from /chat/v2 to /chat.
apps/web/components/chat/message/follow-up-questions.tsx Deleted entirely — removes the FollowUpQuestions React component including button rendering, loading skeleton, and empty state logic.
apps/web/components/chat/message/agent-message.tsx Adds web search tool support (web_search, google_search, GlobeIcon, WebSourcesGroup, source-url, source-document, dynamic-tool part handlers); adds output-error state handling; removes FollowUpQuestions component and its associated props.
apps/web/components/chat/input/chain-of-thought.tsx Extracts memory rendering into MemorySearchResultCard; centralizes memory parsing via memoryResultsFromSearchToolOutput; adds web search tool step tracking with streaming, completed, failed, and fallback states.
apps/web/components/chat/message/memory-search-result-card.tsx New reusable component rendering a memory search result card with title, body, URL, relevancy score, dual visual tones (sidebar/input), and conditional anchor/div rendering.
apps/web/components/chat/message/related-memories.tsx Replaces inline MemoryResult type and card rendering with ChatMemoryCard, memoryResultsFromSearchToolOutput, and MemorySearchResultCard; updates grid alignment to items-stretch.
apps/web/lib/analytics.ts Removes follow_up source option from chatMessageSent event; deletes chatFollowUpClicked tracking function.
apps/web/lib/chat-search-memory-results.ts New utility module defining ChatMemoryCard interface, memoryResultsFromSearchToolOutput (normalizes tool output to typed array), and getMemoryCardDisplay (deduplicates title/content).
apps/web/lib/chat-web-search-tools.ts New utility exporting isWebSearchToolName — case-insensitive check against known web search tool name variants.

🔗 Cross-Repository Impact Analysis

Enable automatic detection of breaking changes across your dependent repositories. → Set up now

Learn more about Cross-Repository Analysis

What It Does

  • Automatically identifies repositories that depend on this code
  • Analyzes potential breaking changes across your entire codebase
  • Provides risk assessment before merging to prevent cross-repo issues

How to Enable

  1. Visit Settings → Code Management
  2. Configure repository dependencies
  3. Future PRs will automatically include cross-repo impact analysis!

Benefits

  • 🛡️ Prevent breaking changes across repositories
  • 🔍 Catch integration issues before they reach production
  • 📊 Better visibility into your multi-repo architecture

@graphite-app
Copy link

graphite-app bot commented Mar 27, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the 03-26-feat_web_search_and_improve_chat_with_tools branch from 2de4f8f to 57748ea Compare March 27, 2026 01:57
@graphite-app graphite-app bot merged commit 57748ea into main Mar 27, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants