llm-ui icon indicating copy to clipboard operation
llm-ui copied to clipboard

Link reference definitions are ignored if code block exists between definition and destination

Open vrslev opened this issue 1 year ago • 3 comments

This works:

[llm-ui][llm-ui-link]

hello

[llm-ui-link]: https://github.com/llm-ui-kit/llm-ui

This does not:

[llm-ui][llm-ui-link]

```
hello
```

[llm-ui-link]: https://github.com/llm-ui-kit/llm-ui

I think, it happens because code block is not detected correctly. I use useLLMOutput as documentation suggests:

const { blockMatches } = useLLMOutput({
    llmOutput: ...,
    fallbackBlock: {
        component: MarkdownComponent,
        lookBack: markdownLookBack(),
    },
    blocks: [
        {
            component: CodeBlock,
            findCompleteMatch: findCompleteCodeBlock(),
            findPartialMatch: findPartialCodeBlock(),
            lookBack: codeBlockLookBack(),
        },
    ],
    isStreamFinished: true,
});

vrslev avatar Jun 19 '24 09:06 vrslev

Hey @vrslev thanks for the report. This is definitely a bug.

I'll try and fix it for you in the next couple of days 👍

richardgill avatar Jun 19 '24 12:06 richardgill

Thanks, really appreciate it ❤️

vrslev avatar Jun 19 '24 12:06 vrslev

Hey @richardgill Any update on this?

vrslev avatar Jun 30 '24 19:06 vrslev

Hi, I'm no longer using llm-ui. Reopen the issue if you will have interest in working on the issue.

vrslev avatar Oct 27 '24 09:10 vrslev