Skip to content

Conversation

@Kvadratni
Copy link
Contributor

this is a fresh branch to fix rebase on main for #3040

Implement checkpoint system with intelligent diff splitting

Adds file versioning and enhanced diff handling for better change management and review.

Checkpoint system:

  • Automatic backup creation before file modifications with timestamp-based storage
  • Persistent checkpoint index tracking file modification history
  • Restore functionality with diff generation for change tracking

Enhanced diff generation:

  • File-type aware context sizing for better hunk boundaries
  • Intelligent splitting of large diffs into manageable chunks
  • Improved review experience for AI-generated changes

New tools:

  • list_checkpoints - View available file versions
  • restore_checkpoint - Revert files to previous states

Integration:

  • Checkpoint payloads embedded in message stream for UI consumption
  • Maintains backward compatibility with existing undo functionality
  • Supports both traditional string replacement and Editor API workflows

Addresses large diff readability issues while providing robust file versioning capabilities.

new-diff.mp4

@michaelneale
Copy link
Collaborator

I think to be a side car there needs to be a change to main.ts to process a message to increase underlying window to the right (you can't do it inside the one window) - otherwise we take real estate away from what is there (which is fine if default was wider?) - do you think sidecars should slide out to the right @aharvard ?

mgd1984 added a commit to mgd1984/goose that referenced this pull request Jul 18, 2025
This commit combines two major enhancements to create a unified interactive UI system:

🎯 MCP-UI Integration:
- Add @mcp-ui/client dependency for rendering interactive UI components
- Implement UIResourceRenderer component with secure iframe sandboxing
- Add UI resource detection and automatic UI/text content switching
- Update Accept headers to support MCP-UI content types (remote-dom, HTML, URI lists)
- Enhance Content Security Policy to allow iframe rendering with ui: scheme

🔧 Checkpoint & Sidecar System (from PR block#3493):
- Add SidecarLayout component for side-by-side UI rendering
- Implement checkpoint system with automatic file backup and versioning
- Add intelligent diff generation with file-type aware context sizing
- Create RestoreModal and MessageRestoreLink for file restoration workflow
- Add list_checkpoints and restore_checkpoint tools to developer router

🔗 Unified Architecture:
- Sidecar can display both diff content AND interactive MCP-UI components
- Enhanced message filtering to support tool request/response matching
- Resource type system handles both UI resources and checkpoint data
- Integrated debug logging for MCP-UI resource detection

This creates a comprehensive interactive AI agent interface that combines:
- Rich, interactive UI components via MCP-UI standard
- File versioning and diff management via checkpoint system
- Side-by-side layout for optimal workflow management

Resolves: Unifies MCP-UI integration efforts with checkpoint/sidecar functionality
@Kvadratni Kvadratni force-pushed the feature/diff-viewer-sidecar branch from 453d83c to 1e963e6 Compare July 18, 2025 04:47
@Kvadratni
Copy link
Contributor Author

It was doing that. My bug. Lost it during rebase

@Kvadratni Kvadratni force-pushed the feature/diff-viewer-sidecar branch from b7df644 to aa57f48 Compare July 18, 2025 17:59
@aharvard
Copy link
Collaborator

fixed some issues @Kvadratni : #3520

@aharvard
Copy link
Collaborator

two things are still bothering me

  1. the chat message thread grows when the window resizes. I think its width should remain as-is.
  2. the sidecar does not slide in from the right

not blockers, but I'm gonna try to address those before my EOD

}
return false;
});
}, [filteredMessages, messages]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

dont use useMemo on lists

@Kvadratni Kvadratni force-pushed the feature/diff-viewer-sidecar branch from 8ee9e77 to 3b7ad8a Compare July 21, 2025 20:49
@Kvadratni Kvadratni force-pushed the feature/diff-viewer-sidecar branch from 3b7ad8a to b4b6bfb Compare July 21, 2025 20:50
@michaelneale
Copy link
Collaborator

main thing I would like to change is that the developer MCP doesn't assume any interactivity (be that checkpoints, diff viewer) out of the box - as headless mode is common for it so you don't want tools in there in that case which aren't relevant to it, increasing context and confusion.

@jamadeo
Copy link
Collaborator

jamadeo commented Aug 18, 2025

@Kvadratni @michaelneale @DOsinga do we want to keep going on this?

@Kvadratni
Copy link
Contributor Author

I will keep it as a reference. I will try to reimplement using MCP-UI. Will mark as draft

@Kvadratni Kvadratni marked this pull request as draft August 18, 2025 20:00
@DOsinga
Copy link
Collaborator

DOsinga commented Sep 19, 2025

thanks, closing this for now

@DOsinga DOsinga closed this Sep 19, 2025
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.

6 participants