Skip to content

Commit

Permalink
[OPIK-579] Change component to present metadata (#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
andriidudar authored Dec 19, 2024
1 parent 68cc522 commit 6070d73
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { StringParam, useQueryParam } from "use-query-params";
import { Button } from "@/components/ui/button";
import { PromptWithLatestVersion } from "@/types/prompts";
import Loader from "@/components/shared/Loader/Loader";
import SyntaxHighlighter from "@/components/shared/SyntaxHighlighter/SyntaxHighlighter";
import CodeHighlighter, {
SUPPORTED_LANGUAGE,
} from "@/components/shared/CodeHighlighter/CodeHighlighter";
import UseThisPromptDialog from "@/components/pages/PromptPage/PromptTab/UseThisPromptDialog";
import EditPromptDialog from "@/components/pages/PromptPage/PromptTab/EditPromptDialog";
import CommitHistory from "@/components/pages/PromptPage/PromptTab/CommitHistory";
Expand Down Expand Up @@ -101,7 +103,10 @@ const PromptTab = ({ prompt }: PromptTabInterface) => {
<p className="comet-body-s-accented mt-4 text-foreground">
Metadata
</p>
<SyntaxHighlighter data={activeVersion.metadata} />
<CodeHighlighter
data={JSON.stringify(activeVersion.metadata, null, 2)}
language={SUPPORTED_LANGUAGE.json}
/>
</>
)}
</div>
Expand Down

0 comments on commit 6070d73

Please sign in to comment.