Skip to content

Add taskCreated event to API and subscribe to Cline events earlier#1942

Merged
cte merged 2 commits intoRooCodeInc:mainfrom
franekp:cline-created-event
Mar 24, 2025
Merged

Add taskCreated event to API and subscribe to Cline events earlier#1942
cte merged 2 commits intoRooCodeInc:mainfrom
franekp:cline-created-event

Conversation

@wkordalski
Copy link
Contributor

@wkordalski wkordalski commented Mar 24, 2025

Context

taskStarted event is not the first event generated by a task. Before taskStarted, some messages may be sent (e.g. by the checkpoint service). It would be good to have taskCreated event that fires before any message is sent.

Also it would be better to attach to Cline events before the "event loop" starts.

Implementation

Added onCreated callback to ClineOptions that is called after the Cline is created, but before the task "event loop" is run.
Replaced ClineProvider's clineAdded event with clineCreated event that fires before the "event loop" starts.

Screenshots

None.

How to Test

Not tested.

Get in Touch

Discord handle: wkordalski


Important

Add taskCreated event to API and adjust Cline event subscription timing to occur before task loop starts.

  • Behavior:
    • Add taskCreated event emission in API class in api.ts when a Cline is created.
    • Modify ClineProvider to emit clineCreated event before task event loop starts.
  • Cline Modifications:
    • Add onCreated callback to ClineOptions in Cline.ts.
    • Call onCreated in Cline constructor before starting task loop.
  • Event Renames:
    • Rename clineAdded to clineCreated in ClineProvider and api.ts.

This description was created by Ellipsis for c9cea1e. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Mar 24, 2025

⚠️ No Changeset found

Latest commit: 753b685

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. Enhancement New feature or request labels Mar 24, 2025
@mrubens
Copy link
Collaborator

mrubens commented Mar 24, 2025

@cte can you review this one?

@cte
Copy link
Collaborator

cte commented Mar 24, 2025

Makes sense - thank you!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 24, 2025
@cte cte merged commit fdcc679 into RooCodeInc:main Mar 24, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Mar 24, 2025
teddyOOXX pushed a commit to teddyOOXX/Roo-Code that referenced this pull request Mar 28, 2025
…ooCodeInc#1917) (RooCodeInc#1942)

* Reapply "Add IS_DEV and Hot Reloading to debug. (RooCodeInc#1895)" (RooCodeInc#1917)

This reverts commit 25ea46a.

* Update TODO to be more explicit. Update logic for checking IS_DEV

* Update TODO with even more explanation.  (Now with 2x more explanation per explanation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants