MCPcopy Create free account
hub / github.com/astercloud/aster / handleHistory

Method handleHistory

pkg/desktop/bridge_web.go:276–293  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

274}
275
276func (b *WebBridge) handleHistory(w http.ResponseWriter, r *http.Request) {
277 agentID := r.URL.Query().Get("agent_id")
278
279 var msgType MessageType
280 if r.Method == http.MethodDelete {
281 msgType = MsgTypeClearHistory
282 } else {
283 msgType = MsgTypeGetHistory
284 }
285
286 resp, _ := b.handler(&FrontendMessage{
287 ID: generateID(),
288 Type: msgType,
289 AgentID: agentID,
290 })
291
292 writeJSON(w, http.StatusOK, resp)
293}
294
295func (b *WebBridge) handleConfig(w http.ResponseWriter, r *http.Request) {
296 switch r.Method {

Callers

nothing calls this directly

Calls 4

generateIDFunction · 0.70
writeJSONFunction · 0.70
GetMethod · 0.65
QueryMethod · 0.65

Tested by

no test coverage detected