Add Away mode and an agent fork tool

This commit is contained in:
Ian Gulliver
2026-10-19 21:40:24 -07:00
parent bb60b685ba
commit f6f2440635
22 changed files with 617 additions and 317 deletions
+14
View File
@@ -41,6 +41,20 @@ func (s *Server) UpdateDefaultModel(w http.ResponseWriter, r *http.Request) {
writeJSON(w, http.StatusOK, u)
}
func (s *Server) UpdateAway(w http.ResponseWriter, r *http.Request) {
req := api.Away{}
if !readJSON(w, r, &req) {
return
}
u, err := s.agents.SetAway(r.Context(), actor(r), req.Away)
if err != nil {
writeAgentError(w, err)
return
}
writeJSON(w, http.StatusOK, u)
}
func (s *Server) UpdateReviewModels(w http.ResponseWriter, r *http.Request) {
req := api.ReviewModels{}
if !readJSON(w, r, &req) {