mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 20:32:20 +03:00
Adiciona dashboard TUI com 7 abas (Overview, Combos, Providers, Keys, Logs, Health, Cost) via Ink, 13 componentes reutilizáveis em tui-components/, menu interativo ao iniciar sem subcomando, e flag --tui no comando dashboard.
14 lines
442 B
JavaScript
14 lines
442 B
JavaScript
import React from "react";
|
|
import { Text } from "ink";
|
|
|
|
export function MarkdownView({ content = "" }) {
|
|
// Render markdown as plain text with basic bold/italic stripping.
|
|
// For rich rendering, use marked-terminal externally before passing content.
|
|
const clean = content
|
|
.replace(/\*\*(.+?)\*\*/g, "$1")
|
|
.replace(/\*(.+?)\*/g, "$1")
|
|
.replace(/`(.+?)`/g, "$1")
|
|
.replace(/^#+\s+/gm, "");
|
|
return <Text>{clean}</Text>;
|
|
}
|