Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/cursor/cookbook
/ ensureAgentFresh
Method
ensureAgentFresh
sdk/coding-agent-cli/src/agent.ts:224–228 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
222
}
223
224
private
async
ensureAgentFresh() {
225
if
(this.agentKey !== this.currentAgentKey()) {
226
await
this.replaceAgent()
227
}
228
}
229
230
private
async
replaceAgent() {
231
const
previousAgent = this.agent
Callers
1
sendPrompt
Method · 0.95
Calls
2
currentAgentKey
Method · 0.95
replaceAgent
Method · 0.95
Tested by
no test coverage detected