open-swe/apps/cli/src/TerminalInterface.tsx
Palash Shah 219c280644
feat: add initial updates to create cli (#469)
* open swe cli: initial cli updates

* openswe cli: add working authentication

* open swe cli: remove unecessary console log statements

* openswe cli: typescript modifications

* openswe cli: updates to formats

* openswe cli: updates to formatting

* openswe cli: ran prettier

* openswe cli: update urls

* openswe cli: update eslint

* openswe cli: add env example

* Update apps/cli/package.json

---------

Co-authored-by: Brace Sproul <braceasproul@gmail.com>
2025-07-23 19:21:28 +00:00

42 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;