Skip to content

Extending remend to custom marks #332

Description

@afallou

Problem Statement

Streamdown is easily extensible with custom components; which means I can easily prompt and AI agent to use custom marks (e.g. Every time you write a joke, wrap it in <<<JOKE>>>) to denote a block of some type, and create custom UI treatment for it.

One limitation is that as far as I understand remend is not extensible, so in streaming mode my custom marks will be shown to the end user until the end mark comes.

Proposed Solution

Have you considered making remend extensible? It seems that it already has the right structure for it, with the code for each supported mark already in a separate file; it seems it's mostly a matter of defining an interface for handler extensions (which might eventually become the interface used by the built-in handlers).

Alternatives Considered

If I understand correctly the current alternative is to handle this directly in Streamdown, in the parseMarkdownIntoBlocksFn logic.

Use Case

Priority

Important

Contribution

  • I am willing to help implement this feature

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions