Skip to content

refactor(task): extract ClineMessagesStore#69

Open
doctarock wants to merge 1 commit into
Zoo-Code-Org:mainfrom
doctarock:refactor/cline-messages-store
Open

refactor(task): extract ClineMessagesStore#69
doctarock wants to merge 1 commit into
Zoo-Code-Org:mainfrom
doctarock:refactor/cline-messages-store

Conversation

@doctarock
Copy link
Copy Markdown

Related GitHub Issue

#17

Closes: # 17

Roo Code Task Context (Optional)

Description

Added ClineMessagesStore.ts
Slimmed Task.ts so it delegates Cline message save/update/overwrite/find behavior through the new store
Kept compatibility getters/setters for clineMessages and lastMessageTs so existing call sites keep working
Removed the private pass-through wrappers in Task.ts for:
getSavedClineMessages, addToClineMessages, updateClineMessage, saveClineMessages, findMessageByTimestamp
Updated Task.ts call sites to use this.clineMessagesStore.* directly.
Updated the persistence/throttle tests to target the extracted store.
Left overwriteClineMessages() and the clineMessages / lastMessageTs accessors in place because other modules still use those as part of the Task contract.

Test Procedure

tsc --noEmit --project src/tsconfig.json passes
vitest run core/task/tests/Task.persistence.spec.ts core/message-manager/index.spec.ts --config vitest.config.ts passes: 35 tests

Pre-Submission Checklist

  • [x ] Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • [x ] Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • [x ] Self-Review: I have performed a thorough self-review of my code.
  • [x ] Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • [ x] Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • [ x] Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Documentation Updates

Additional Notes

Get in Touch

pixe1forge

@doctarock doctarock requested a review from hannesrudolph as a code owner May 11, 2026 04:12
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Warning

Rate limit exceeded

@doctarock has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 2 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b374769b-6e7c-4c14-98fe-dc87d9cc4c54

📥 Commits

Reviewing files that changed from the base of the PR and between 5a5b22e and 5777bef.

📒 Files selected for processing (5)
  • src/core/task/ClineMessagesStore.ts
  • src/core/task/Task.ts
  • src/core/task/__tests__/Task.persistence.spec.ts
  • src/core/task/__tests__/Task.throttle.test.ts
  • src/core/webview/ClineProvider.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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