Skip to content

Conversation

@Sg312
Copy link
Contributor

@Sg312 Sg312 commented Aug 19, 2025

Summary

Fixes copilot streaming, checkpoints, depths, etc

Type of Change

  • New feature

Testing

Manual

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Aug 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sim Ready Ready Preview Comment Aug 19, 2025 5:49am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Aug 19, 2025 5:49am

@vercel vercel bot temporarily deployed to Preview – docs August 19, 2025 04:38 Inactive
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR implements comprehensive fixes for the copilot streaming functionality, addressing several key areas including depth configuration, prefetch behavior, UI interactions, and data consistency. The changes introduce a new agent configuration system that separates depth levels (0-3) from a new agentPrefetch boolean flag, replacing the previous system that encoded prefetch behavior using negative depth values (-2, -1). The API route maintains backward compatibility by mapping these negative depths to their positive equivalents with prefetch enabled.

The PR enhances user experience through several UI improvements: the ThinkingBlock component now auto-expands during streaming and collapses when finished, the copilot chat implements sophisticated scroll state tracking to prevent auto-scroll from interfering with user reading, and the user input component features a redesigned slider-based interface with clearer labeling (Fast/Balanced/Advanced/Expert). A checkpoint system has been added to diff controls, creating restore points before accepting copilot changes.

Critical data consistency fixes ensure the copilot has access to the most recent workflow state by merging subblock values from the store into both the workflow retrieval tool and diff engine baseline. This prevents user edits from being lost during copilot operations. The streaming system now includes comprehensive tool call progress tracking to only persist conversation IDs at safe checkpoints where no tools are mid-execution.

Confidence score: 2/5

  • This PR requires careful review due to complex state management changes and a critical duplicate file issue
  • Score lowered significantly due to an empty duplicate store file that could cause import conflicts and build issues
  • Pay close attention to apps/sim/apps/sim/stores/copilot/store.ts which is an empty duplicate that needs removal

15 files reviewed, 3 comments

Edit Code Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs August 19, 2025 05:45 Inactive
@Sg312 Sg312 merged commit bdfb56b into staging Aug 19, 2025
4 of 5 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/copilot-subblocks branch August 20, 2025 01:33
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
* Fix 1

* Fix

* Bugfix

* Make thinking streaming smoother

* Better autoscroll, still not great

* Updates

* Updates

* Updates

* Restore checkpoitn logic

* Fix aborts

* Checkpoitn ui

* Lint

* Fix empty file
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.

1 participant