File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { Box , Text } from "ink" ;
2+ import BigText from "ink-big-text" ;
3+
4+ interface BannerProps {
5+ text ?: string ;
6+ font ?:
7+ | "block"
8+ | "simple"
9+ | "simpleBlock"
10+ | "3d"
11+ | "simple3d"
12+ | "chrome"
13+ | "huge" ;
14+ colors ?: string [ ] ;
15+ align ?: "left" | "center" | "right" ;
16+ showSubtitle ?: boolean ;
17+ }
18+
19+ export const Banner = ( {
20+ text = "Mstudio" ,
21+ font = "block" ,
22+ colors = [ "white" ] ,
23+ align = "left" ,
24+ showSubtitle = true ,
25+ } : BannerProps ) => {
26+ return (
27+ < Box
28+ flexDirection = "column"
29+ alignItems = {
30+ align === "center"
31+ ? "center"
32+ : align === "right"
33+ ? "flex-end"
34+ : "flex-start"
35+ }
36+ >
37+ < BigText text = { text } font = { font } colors = { colors } />
38+ { showSubtitle && (
39+ < Box marginTop = { 1 } >
40+ < Text color = "gray" dimColor >
41+ Welcome to Missing Studio CLI
42+ </ Text >
43+ </ Box >
44+ ) }
45+ </ Box >
46+ ) ;
47+ } ;
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ export default function App({ provider, model }: AppProps) {
5050 model : selectedModel ,
5151 enabled : Boolean ( selectedProvider && selectedModel && readyForApi ) ,
5252 } ) ;
53+
5354 const [ currentInput , setCurrentInput ] = useState < string > ( "" ) ;
5455 const [ showHelp , setShowHelp ] = useState ( false ) ;
5556 const { exit } = useApp ( ) ;
Original file line number Diff line number Diff line change 1- import { Box , Text } from "ink" ;
2- import { AsciiLogo } from "../components/ascii-logo .js" ;
1+ import { Box } from "ink" ;
2+ import { Banner } from "../components/banner .js" ;
33
44type AppLayoutProps = {
55 children : React . ReactNode ;
@@ -9,7 +9,7 @@ export default function AppLayout({ children }: AppLayoutProps) {
99 return (
1010 < Box flexDirection = "column" minHeight = { 24 } padding = { 1 } >
1111 < Box justifyContent = "flex-start" marginBottom = { 1 } >
12- < AsciiLogo />
12+ < Banner />
1313 </ Box >
1414 < Box flexGrow = { 1 } flexDirection = "column" >
1515 { children }
You can’t perform that action at this time.
0 commit comments