fix(server): treat a template-only ledger as a readable in-scope document
A missing ledger body was reported as not found, so an in-scope view of a template document never reached the template reply. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -157,7 +157,7 @@ func (s *Server) loadControlledDocumentContent(ctx context.Context, docID string
|
||||
if err != nil && !errors.Is(err, docquery.ErrLedgerMissing) {
|
||||
return nil, err
|
||||
}
|
||||
if view != nil && view.Markdown != "" {
|
||||
if view != nil && (view.Markdown != "" || view.IsTemplateOnly) {
|
||||
return view.ToDocumentContent(), nil
|
||||
}
|
||||
return s.gov.ReadDocumentContent(ctx, docID, s.repoRoot())
|
||||
|
||||
Reference in New Issue
Block a user