Skip to content

Commit

Permalink
[Obs AI Assistant] Enable syntax highlighting for ES|QL (#212384)
Browse files Browse the repository at this point in the history
  • Loading branch information
viduni94 committed Feb 27, 2025
1 parent 2704a71 commit c0a128c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,20 @@ export function CodeBlock({ children }: { children: React.ReactNode }) {

export function EsqlCodeBlock({
value,
lang,
actionsDisabled,
onActionClick,
}: {
value: string;
lang: string;
actionsDisabled: boolean;
onActionClick: ChatActionClickHandler;
}) {
return (
<CodeBlockWrapper>
<EuiFlexGroup direction="column" gutterSize="xs">
<EuiFlexItem grow={false}>
<EuiCodeBlock isCopyable fontSize="m">
<EuiCodeBlock language={lang} isCopyable fontSize="m">
{value}
</EuiCodeBlock>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export function MessageText({ loading, content, onActionClick }: Props) {
<>
<EsqlCodeBlock
value={props.value}
lang={props.lang}
actionsDisabled={loading}
onActionClick={onActionClickRef.current}
/>
Expand Down

0 comments on commit c0a128c

Please sign in to comment.