Fix receive and send

This commit is contained in:
2026-03-16 06:48:29 +00:00
parent 9ef1720e1f
commit dd275593cd
28 changed files with 1918 additions and 769 deletions

View File

@@ -4,7 +4,7 @@
import React, { useRef, useState } from 'react';
import { Box, Text, useInput, measureElement } from 'ink';
import TextInput from 'ink-text-input';
import TextInput from './TextInput.js';
import { colors } from '../theme.js';
/**
@@ -29,6 +29,7 @@ export function DialogWrapper({
borderColor = colors.primary,
children,
width = 60,
backgroundColor = colors.bg,
}: DialogWrapperProps): React.ReactElement {
const ref = useRef<any>(null);
const [height, setHeight] = useState<number | null>(null);
@@ -51,9 +52,12 @@ export function DialogWrapper({
flexDirection="column"
width={width}
height={height}
backgroundColor={backgroundColor}
>
{Array.from({ length: height }).map((_, i) => (
<Text key={i}>{' '.repeat(width)}</Text>
<Text key={i} backgroundColor={backgroundColor}>
{' '.repeat(width)}
</Text>
))}
</Box>
)}
@@ -67,6 +71,7 @@ export function DialogWrapper({
paddingX={2}
paddingY={1}
width={width}
backgroundColor={backgroundColor}
>
<Text color={borderColor} bold>
{title}