MCPcopy
hub / github.com/Doorman11991/smallcode / kill

Method kill

src/session/multi.js:62–71  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

60
61 // Kill/remove a session
62 kill(id) {
63 if (!this.sessions.has(id)) return false;
64 this.sessions.delete(id);
65 if (this.activeId === id) {
66 // Switch to first remaining or null
67 const remaining = [...this.sessions.keys()];
68 this.activeId = remaining[0] || null;
69 }
70 return true;
71 }
72
73 // Get messages for the active session
74 getMessages() {

Callers 10

runAgentFunction · 0.80
runMethod · 0.80
stopMethod · 0.80
disconnectMethod · 0.80
_connectServerMethod · 0.80
stopMethod · 0.80
constructorMethod · 0.80
runOneFunction · 0.80
commands.jsFile · 0.80
killMCPFunction · 0.80

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected