fix(agent): resolve gadget callbacks without heavy executor scans - #25
fix(agent): resolve gadget callbacks without heavy executor scans#25darjss wants to merge 2 commits into
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the agent’s callback replay prompt so gadget chat callbacks resolve from supplied arguments without expensive executor scans unless live data is necessary, reducing callback latency while leaving normal user-message behavior unchanged. Sequence diagram for fast gadget callback resolutionsequenceDiagram
participant Gadget
participant Agent
participant Callback
participant EXECUTOR
Gadget->>Agent: agentCallback(args)
Agent->>Agent: Resolve from callback args and request context
alt live data required
Agent->>EXECUTOR: Fetch required live data
EXECUTOR-->>Agent: Return data
end
Agent->>Callback: env.name.resolve(value) or env.name.reject(error)
Callback-->>Gadget: Callback completed
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
7a4df34 to
9ca67a9
Compare
69720dc to
2d2db2c
Compare
Use shared executor tool names in callback guidance and skip registering executor tools when the turn exists only to resolve gadget callbacks.
2d2db2c to
93fba53
Compare
Why
Dashboard
onGadgetChatcallbacks blocked on the agent for up to 113s because the agent re-fetched live erxes data on every chat message. Workers RPC waits approach ~180s.Scope
packages/workshop-backend/src/agent.ts:agentCallbackreplay prompt tells the agent to resolve from callback args without EXECUTOR unless live data is required. Target under 30 seconds.Blast Radius
Agent prompt only. Affects gadget chat callbacks, not normal user messages.
Verification
Prompt string change only; no automated test for replay text.
Summary by Sourcery
Resolve gadget callbacks promptly without invoking executor tools unless live data is required.
Bug Fixes: