mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-03 01:03:26 +00:00
43 lines
1,018 B
TypeScript
43 lines
1,018 B
TypeScript
|
|
import React from "react";
|
||
|
|
import { Box, Text } from "ink";
|
||
|
|
|
||
|
|
interface TerminalInterfaceProps {
|
||
|
|
message: string | null;
|
||
|
|
setMessage: () => void;
|
||
|
|
CustomInput: React.FC<{ onSubmit: () => void }>;
|
||
|
|
}
|
||
|
|
|
||
|
|
const TerminalInterface: React.FC<TerminalInterfaceProps> = ({
|
||
|
|
message,
|
||
|
|
setMessage,
|
||
|
|
CustomInput,
|
||
|
|
}) => {
|
||
|
|
return (
|
||
|
|
<Box flexDirection="column" padding={1}>
|
||
|
|
<Box justifyContent="center" marginBottom={0}>
|
||
|
|
<Text bold>LangChain Open SWE CLI</Text>
|
||
|
|
</Box>
|
||
|
|
<Box flexDirection="column">
|
||
|
|
<Text>Describe your coding task in as much detail as possible...</Text>
|
||
|
|
</Box>
|
||
|
|
<Box
|
||
|
|
borderStyle="round"
|
||
|
|
borderColor="gray"
|
||
|
|
paddingX={2}
|
||
|
|
paddingY={1}
|
||
|
|
marginTop={0}
|
||
|
|
marginBottom={0}
|
||
|
|
>
|
||
|
|
<CustomInput onSubmit={setMessage} />
|
||
|
|
</Box>
|
||
|
|
{message && (
|
||
|
|
<Box marginTop={1}>
|
||
|
|
<Text color="green">You typed: {message}</Text>
|
||
|
|
</Box>
|
||
|
|
)}
|
||
|
|
</Box>
|
||
|
|
);
|
||
|
|
};
|
||
|
|
|
||
|
|
export default TerminalInterface;
|