Skip to content

Plugins

@aparte/core is presentational and zero-dependency: it renders raw text, exposes seams, and asks nothing of you. Plugins fill those seams — each is an opt-in @aparte/plugin-* package that you install and wire in one call, so core stays small and you pay only for what you use.

You want…PackageSeam it fills
Render finished Markdown messagesmarkedsetMarkdownProvider
Stream Markdown token-by-tokenstreaming-markdownsetStreamingMarkdownProvider
Highlight code blocksshikisetHighlightProvider
Let the user pick a provider + modelmodel-selector<aparte-model-selector> element
Let the AI ask the user a questionask-questionregisterTool + elicitation

Every plugin lists @aparte/core as a peer dependency and, where it wraps a third-party library (marked, streaming-markdown, shiki), that library too — so you control its version and it is never bundled into core.

Most plugins register something on the config once, at startup:

import { setupMarkedProvider } from '@aparte/plugin-marked';
import { setupShikiProvider } from '@aparte/plugin-shiki';
setupMarkedProvider(); // finished messages → HTML
await setupShikiProvider(); // code blocks → highlighted HTML

The two Markdown plugins are complementary: streaming-markdown renders each token as it arrives, and marked re-renders the finished message. Register both for the best of both.

Translating the built-in UI strings is its own seam — see the Localization guide and the @aparte/locale-fr package.