fix: take the file edit limit in the panel from the agent's read cap

The limit was repeated in the page; a file of exactly the cap is read
in full, so it is editable too.
This commit is contained in:
redtea committed 2026-10-13 14:50:49 +03:00
1 parent 7cb9da8569
commit 08fc2d79a8
4 files changed
+10 -6

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ func (s *Server) handleFilesPage(w http.ResponseWriter, r *http.Request) {
http.NotFound(w, r)
return
}
s.render(w, "files.html", map[string]any{"Agent": a})
s.render(w, "files.html", map[string]any{"Agent": a, "EditLimit": proto.FSReadCap})
}
// POST /api/panel/agents/{id}/fs/{op} — run a file-manager operation on the