Add a project Page tab and a page origin per worktree and repo

This commit is contained in:
Ian Gulliver
2026-10-23 19:33:26 -07:00
parent 1f61bf7cf5
commit c52b8839bd
12 changed files with 327 additions and 161 deletions
+8
View File
@@ -240,6 +240,14 @@ func (s *Server) GetProjectRaw(w http.ResponseWriter, r *http.Request, projectID
serveRaw(w, r, p.RepoPath, params.Path)
}
func (s *Server) GetRaw(w http.ResponseWriter, r *http.Request, params api.GetRawParams) {
if !path.IsAbs(params.Path) {
writeError(w, http.StatusBadRequest, fmt.Errorf("%s is not an absolute path", params.Path))
return
}
serveRaw(w, r, "/", params.Path)
}
func serveRaw(w http.ResponseWriter, r *http.Request, root, rel string) {
if rel == "" {
writeError(w, http.StatusBadRequest, errors.New("path is required"))