remix-nlux
Version:
Remix IDE NLUX integration. Remix IDE is the leading IDE for building and deploying smart contracts on Ethereum. NLUX is a JavaScript and React library for building conversational AI experiences.
24 lines (22 loc) • 684 B
text/typescript
import {CompUpdater} from '../../../types/comp';
import {CompChatItemActions, CompChatItemElements, CompChatItemProps} from './chatItem.types';
export const updateChatItem: CompUpdater<
CompChatItemProps, CompChatItemElements, CompChatItemActions
> = ({
propName,
newValue,
dom,
}) => {
switch (propName) {
case 'markdownLinkTarget':
case 'skipStreamingAnimation':
case 'syntaxHighlighter':
case 'htmlSanitizer':
case 'showCodeBlockCopyButton':
case 'streamingAnimationSpeed':
dom.actions?.updateMarkdownStreamRenderer({
[propName]: newValue,
});
break;
}
};