[feat]: Add /extensions restart command (#12739)

This commit is contained in:
Jacob MacDonald
2025-11-07 15:17:23 -08:00
committed by GitHub
parent fdb6088603
commit bafbcbbe8b
9 changed files with 457 additions and 10 deletions

View File

@@ -86,7 +86,11 @@ export const HistoryItemDisplay: React.FC<HistoryItemDisplayProps> = ({
/>
)}
{itemForDisplay.type === 'info' && (
<InfoMessage text={itemForDisplay.text} />
<InfoMessage
text={itemForDisplay.text}
icon={itemForDisplay.icon}
color={itemForDisplay.color}
/>
)}
{itemForDisplay.type === 'warning' && (
<WarningMessage text={itemForDisplay.text} />

View File

@@ -11,21 +11,28 @@ import { RenderInline } from '../../utils/InlineMarkdownRenderer.js';
interface InfoMessageProps {
text: string;
icon?: string;
color?: string;
}
export const InfoMessage: React.FC<InfoMessageProps> = ({ text }) => {
const prefix = ' ';
export const InfoMessage: React.FC<InfoMessageProps> = ({
text,
icon,
color,
}) => {
color ??= theme.status.warning;
const prefix = icon ?? ' ';
const prefixWidth = prefix.length;
return (
<Box flexDirection="row" marginTop={1}>
<Box width={prefixWidth}>
<Text color={theme.status.warning}>{prefix}</Text>
<Text color={color}>{prefix}</Text>
</Box>
<Box flexGrow={1} flexDirection="column">
{text.split('\n').map((line, index) => (
<Text wrap="wrap" key={index}>
<RenderInline text={line} defaultColor={theme.status.warning} />
<RenderInline text={line} defaultColor={color} />
</Text>
))}
</Box>