Markdown Document: A single-view plugin that renders GitHub-flavored Markdown written into a panel's state as formatted React elements on the grid.
| 1 | import { definePlugin, defineView } from '@jaspers-ai/sdk' |
| 2 | import { OutputSchema, StateSchema, summarize } from './doc' |
| 3 | import { DocView } from './DocView' |
| 4 | import { INSTRUCTIONS } from './instructions' |
| 5 | |
| 6 | // A Markdown document on the grid, for whatever the assistant puts in writing: a memo, a summary, a |
| 7 | // comparison table. The assistant writes the whole document into state, and the view draws it and |
| 8 | // publishes what it shows, with the Markdown as the panel's text, so a model can read it back at |
| 9 | // length and an analyst can quote it. No sources, no connections, no backend. |
| 10 | |
| 11 | export default definePlugin({ |
| 12 | id: 'markdown', |
| 13 | views: { |
| 14 | doc: defineView(DocView, { |
| 15 | title: 'Document', |
| 16 | state: StateSchema, |
| 17 | output: OutputSchema, |
| 18 | instructions: INSTRUCTIONS, |
| 19 | summarize, |
| 20 | }), |
| 21 | }, |
| 22 | }) |