MCPcopy Index your code
hub / github.com/the-open-agent/openagent / deleteSession

Method deleteSession

model/opencode.go:180–195  ·  view source on GitHub ↗
(sessionID string)

Source from the content-addressed store, hash-verified

178}
179
180func (p *OpenCodeProvider) deleteSession(sessionID string) {
181 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
182 defer cancel()
183
184 req, err := http.NewRequestWithContext(ctx, "DELETE", p.serverUrl+"/session/"+sessionID, nil)
185 if err != nil {
186 return
187 }
188 p.setAuth(req)
189
190 resp, err := p.client.Do(req)
191 if err != nil {
192 return
193 }
194 resp.Body.Close()
195}
196
197func (p *OpenCodeProvider) sendMessageAsync(sessionID string, systemPrompt string, text string) error {
198 reqBody := map[string]interface{}{

Callers 3

QueryTextMethod · 0.95
SessionListPage.jsFile · 0.80
deleteSessionFunction · 0.80

Calls 2

setAuthMethod · 0.95
CloseMethod · 0.45

Tested by

no test coverage detected