Implements decofile hotswap apis#993
Conversation
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
|
Caution Review failedThe pull request is closed. WalkthroughThis change introduces a debounced state update mechanism for the decofile provider and exposes it via a new HTTP endpoint. The fs provider refactors its update logic into a reusable debounced function and adds a public Changes
Sequence DiagramsequenceDiagram
participant ext as External System
participant http as HTTP Endpoint<br/>(reload.ts)
participant deco as DecofileProvider<br/>(notify)
participant updater as Debounced<br/>updateState
participant cb as onChange<br/>Callbacks
ext->>http: GET /.decofile/reload?delay=100
http->>http: Parse delay parameter
http-->>ext: { "scheduled": true }
http->>deco: Schedule notify() after delay
deco->>updater: Invoke (debounced)
updater->>updater: Read & parse file
updater->>updater: Update in-memory state
updater->>cb: Notify all listeners
cb-->>deco: Callbacks executed
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~10–15 minutes
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
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. Comment |
Tagging OptionsShould a new tag be published when this PR is merged?
|
Summary by CodeRabbit
New Features
Refactor