Skip to content

Commit 5c0f9b0

Browse files
committed
overhaul WebUI: sub-agent cards, magic effects, UX polish
- Sub-agent rendering: delegate_tasks tool calls render as live agent cards with running/complete/error states, file lists, token counts, and expandable details - Magic effects: glowing logo pulse animation, floating particle background in empty state, smooth message entrance animations, streaming cursor with glow, typing indicator dots, status pulse animation - UX polish: message bubbles with gradient user styling, code blocks with copy button, thinking/reasoning toggles, full markdown rendering (headers, lists, links, bold, italic, strikethrough), session sidebar search, session delete button, keyboard shortcuts modal (? key), toast notifications, top bar blur backdrop, input gradient send button with hover lift, approval dialog styled with risk class colors, session refresh on Ctrl+R - Server: adds DELETE /api/sessions/:id endpoint for session deletion from the WebUI
1 parent 0fa0304 commit 5c0f9b0

2 files changed

Lines changed: 1227 additions & 275 deletions

File tree

cmd/kode/serve.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Flags:
8484
})
8585
mux.HandleFunc("/api/resources", handleResourceSearch(resourceReg))
8686
mux.HandleFunc("/api/sessions", handleSessionList(store))
87+
mux.HandleFunc("/api/sessions/", handleSessionDelete(store))
8788

8889
listener, err := net.Listen("tcp", addr)
8990
if err != nil {
@@ -500,6 +501,29 @@ func handleSessionList(store *session.Store) http.HandlerFunc {
500501
}
501502
}
502503

504+
func handleSessionDelete(store *session.Store) http.HandlerFunc {
505+
return func(w http.ResponseWriter, r *http.Request) {
506+
if r.Method != http.MethodDelete {
507+
http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
508+
return
509+
}
510+
511+
// Extract session ID from path: /api/sessions/{id}
512+
id := strings.TrimPrefix(r.URL.Path, "/api/sessions/")
513+
if id == "" {
514+
http.Error(w, "missing session id", http.StatusBadRequest)
515+
return
516+
}
517+
518+
if err := store.Delete(id); err != nil {
519+
http.Error(w, err.Error(), http.StatusInternalServerError)
520+
return
521+
}
522+
523+
w.WriteHeader(http.StatusNoContent)
524+
}
525+
}
526+
503527
// ── Static Handler ─────────────────────────────────────────────────────
504528

505529
func handleStatic() http.HandlerFunc {

0 commit comments

Comments
 (0)