(id: string)
| 175 | } |
| 176 | |
| 177 | export async function remove(id: string) { |
| 178 | const session = state().get(id) |
| 179 | if (!session) return |
| 180 | log.info("removing session", { id }) |
| 181 | try { |
| 182 | session.process.kill() |
| 183 | } catch {} |
| 184 | for (const ws of session.subscribers) { |
| 185 | ws.close() |
| 186 | } |
| 187 | state().delete(id) |
| 188 | Bus.publish(Event.Deleted, { id }) |
| 189 | } |
| 190 | |
| 191 | export function resize(id: string, cols: number, rows: number) { |
| 192 | const session = state().get(id) |