feature: "powered_document" drafts a full markdown document. Four modes, set in context.mode:
context.mode |
Also requires |
Source |
article (default) |
— |
drafts from the topic in input alone |
from_list |
context.listId |
loads your list's schema + up to 50 rows server-side |
from_article |
context.documentId |
loads your document's title + body server-side |
research_url |
context.url |
fetches the page (http/https, SSRF-guarded), extracts title/description/text, cites the URL |
You pass a reference, not source text. Derived modes are IDOR-guarded — a missing or non-owned reference returns 422 invalid_input. Server-fetched context is truncated before it reaches the model.
/suggest → kind: "document"; /generate → {documentId}.
Acceptance criteria
feature: "powered_document"drafts a full markdown document. Four modes, set incontext.mode:context.modearticle(default)inputalonefrom_listcontext.listIdfrom_articlecontext.documentIdresearch_urlcontext.urlYou pass a reference, not source text. Derived modes are IDOR-guarded — a missing or non-owned reference returns
422 invalid_input. Server-fetched context is truncated before it reaches the model./suggest→kind: "document";/generate→{documentId}.Acceptance criteria
Views/DocumentsView.xaml, gated onIsAiAvailable.from_list/from_articlepick their source from the user's own lists/documents;research_urltakes a URL with http/https validation./api/ai/generateand opens the created document from a freshGET.422 invalid_inputon a missing/non-owned reference is reported against the source field, not as a generic failure.