rrce-workflow 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrce-workflow",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "RRCE-Workflow TUI - Agentic code workflow generator for AI-assisted development",
5
5
  "author": "RRCE Team",
6
6
  "license": "MIT",
@@ -37,6 +37,7 @@
37
37
  "scripts": {
38
38
  "dev": "bun run src/index.tsx",
39
39
  "wizard": "bun run src/index.tsx wizard",
40
+ "select": "bun run src/index.tsx select",
40
41
  "start": "bun run src/index.tsx"
41
42
  },
42
43
  "engines": {
@@ -45,8 +46,12 @@
45
46
  },
46
47
  "dependencies": {
47
48
  "gray-matter": "^4.0.3",
48
- "ink": "^6.6.0",
49
- "ink-select-input": "^6.2.0",
49
+ "ink": "^5.0.0",
50
+ "ink-big-text": "^2.0.0",
51
+ "ink-gradient": "^3.0.0",
52
+ "ink-select-input": "^5.0.0",
53
+ "ink-spinner": "^5.0.0",
54
+ "pastel": "^4.0.0",
50
55
  "react": "^18",
51
56
  "zod": "^4"
52
57
  },
@@ -54,4 +59,4 @@
54
59
  "@types/bun": "latest",
55
60
  "@types/react": "^18"
56
61
  }
57
- }
62
+ }
package/src/App.tsx CHANGED
@@ -15,7 +15,7 @@ interface AppProps {
15
15
  }
16
16
 
17
17
  export function App({ command }: AppProps) {
18
- const [mode, setMode] = React.useState<AppMode>(command === 'wizard' ? 'wizard' : 'select');
18
+ const [mode, setMode] = React.useState<AppMode>(command === 'select' ? 'select' : 'wizard');
19
19
  const [selectedPrompt, setSelectedPrompt] = React.useState<ParsedPrompt | null>(null);
20
20
  const [message, setMessage] = React.useState<string | null>(null);
21
21
 
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import Gradient from 'ink-gradient';
3
+ import BigText from 'ink-big-text';
4
+ import { Box } from 'ink';
5
+
6
+ export function Logo() {
7
+ return (
8
+ <Box flexDirection="column" alignItems="center" marginBottom={1}>
9
+ <Gradient name="morning">
10
+ <BigText text="RRCE" align='center' font='block'/>
11
+ </Gradient>
12
+ <Gradient name="cristal">
13
+ <BigText text="Workflow" align='center' font='chrome'/>
14
+ </Gradient>
15
+ </Box>
16
+ );
17
+ }
@@ -1,6 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { Box, Text, useInput } from 'ink';
3
3
  import SelectInput from 'ink-select-input';
4
+ import Spinner from 'ink-spinner';
5
+ import Gradient from 'ink-gradient';
6
+ import { Logo } from './Logo';
4
7
  import type { StorageMode } from '../types/prompt';
5
8
  import { getGitUser } from '../lib/git';
6
9
  import { detectWorkspaceRoot, getWorkspaceName } from '../lib/paths';
@@ -29,15 +32,30 @@ const storageModeItems = [
29
32
  ];
30
33
 
31
34
  export function Wizard({ onComplete }: WizardProps) {
32
- const workspacePath = detectWorkspaceRoot();
33
- const workspaceName = getWorkspaceName(workspacePath);
34
- const gitUser = getGitUser();
35
-
35
+ const [loading, setLoading] = React.useState(true);
36
36
  const [step, setStep] = React.useState<WizardStep>('welcome');
37
37
  const [storageMode, setStorageMode] = React.useState<StorageMode>('global');
38
38
  const [tools, setTools] = React.useState({ copilot: true, antigravity: true });
39
+
40
+ // Data state
41
+ const [workspacePath, setWorkspacePath] = React.useState('');
42
+ const [workspaceName, setWorkspaceName] = React.useState('');
43
+ const [gitUser, setGitUser] = React.useState<string | null>(null);
44
+
45
+ React.useEffect(() => {
46
+ // Simulate a small delay for dramatic effect/loading feeling
47
+ const timer = setTimeout(() => {
48
+ setWorkspacePath(detectWorkspaceRoot());
49
+ setWorkspaceName(getWorkspaceName(detectWorkspaceRoot()));
50
+ setGitUser(getGitUser());
51
+ setLoading(false);
52
+ }, 800);
53
+ return () => clearTimeout(timer);
54
+ }, []);
39
55
 
40
56
  useInput((input, key) => {
57
+ if (loading) return;
58
+
41
59
  if (step === 'welcome' && key.return) {
42
60
  setStep('storage');
43
61
  } else if (step === 'confirm' && key.return) {
@@ -67,69 +85,86 @@ export function Wizard({ onComplete }: WizardProps) {
67
85
  };
68
86
 
69
87
  return (
70
- <Box flexDirection="column" padding={1}>
71
- <Box borderStyle="round" borderColor="cyan" paddingX={2}>
72
- <Text bold color="cyan">RRCE-Workflow Setup</Text>
73
- </Box>
74
-
75
- <Box marginTop={1}>
88
+ <Box flexDirection="column" padding={1} alignItems="center">
89
+ <Logo />
90
+
91
+ <Box borderStyle="round" borderColor="cyan" paddingX={2} paddingY={1} width={60} flexDirection="column">
76
92
  {step === 'welcome' && (
77
- <Box flexDirection="column">
78
- <Text>Welcome! Detecting your environment...</Text>
79
- <Box marginTop={1} flexDirection="column">
80
- <Text>
81
- <Text color="green">✓</Text> Git user: <Text bold>{gitUser || '(not found)'}</Text>
82
- </Text>
83
- <Text>
84
- <Text color="green">✓</Text> Workspace: <Text bold>{workspaceName}</Text>
85
- </Text>
86
- </Box>
87
- <Box marginTop={1}>
88
- <Text dimColor>Press Enter to continue...</Text>
89
- </Box>
93
+ <Box flexDirection="column" alignItems="center">
94
+ {loading ? (
95
+ <Box>
96
+ <Text color="cyan"><Spinner type="dots" /> </Text>
97
+ <Text> Detecting environment...</Text>
98
+ </Box>
99
+ ) : (
100
+ <Box flexDirection="column" alignItems="center">
101
+ <Box marginBottom={1}>
102
+ <Text bold color="cyan">Welcome to RRCE-Workflow Setup</Text>
103
+ </Box>
104
+
105
+ <Box flexDirection="column" width="100%" marginBottom={1}>
106
+ <Box>
107
+ <Text color="green">✓</Text>
108
+ <Text> Git User: </Text>
109
+ <Text bold color="white">{gitUser || '(not found)'}</Text>
110
+ </Box>
111
+ <Box>
112
+ <Text color="green">✓</Text>
113
+ <Text> Workspace: </Text>
114
+ <Text bold color="white">{workspaceName}</Text>
115
+ </Box>
116
+ </Box>
117
+
118
+ <Text dimColor>Press Enter to continue ❯</Text>
119
+ </Box>
120
+ )}
90
121
  </Box>
91
122
  )}
92
123
 
93
124
  {step === 'storage' && (
94
125
  <Box flexDirection="column">
95
- <Text>Where should workflow data be stored?</Text>
96
- <Box marginTop={1}>
97
- <SelectInput items={storageModeItems} onSelect={handleStorageSelect} />
98
- </Box>
126
+ <Box marginBottom={1}><Text bold underline>Storage Configuration</Text></Box>
127
+ <Box marginBottom={1}><Text>Where should workflow data be stored?</Text></Box>
128
+ <SelectInput items={storageModeItems} onSelect={handleStorageSelect} />
99
129
  </Box>
100
130
  )}
101
131
 
102
132
  {step === 'tools' && (
103
133
  <Box flexDirection="column">
104
- <Text>Which AI tools do you use?</Text>
105
- <Box marginTop={1}>
106
- <SelectInput
107
- items={[
108
- { label: `[${tools.copilot ? 'x' : ' '}] GitHub Copilot (VSCode)`, value: 'copilot' },
109
- { label: `[${tools.antigravity ? 'x' : ' '}] Antigravity IDE`, value: 'antigravity' },
110
- { label: '───────────────', value: 'sep' },
111
- { label: 'Done', value: 'done' },
112
- ]}
113
- onSelect={handleToolsSelect}
114
- />
115
- </Box>
134
+ <Box marginBottom={1}><Text bold underline>AI Tools Integration</Text></Box>
135
+ <Box marginBottom={1}><Text>Select the tools you want to generate prompts for:</Text></Box>
136
+ <SelectInput
137
+ items={[
138
+ { label: `[${tools.copilot ? 'x' : ' '}] GitHub Copilot`, value: 'copilot' },
139
+ { label: `[${tools.antigravity ? 'x' : ' '}] Antigravity IDE`, value: 'antigravity' },
140
+ { label: '───────────────', value: 'sep' },
141
+ { label: 'Done (Continue)', value: 'done' },
142
+ ]}
143
+ onSelect={handleToolsSelect}
144
+ />
116
145
  </Box>
117
146
  )}
118
147
 
119
148
  {step === 'confirm' && (
120
149
  <Box flexDirection="column">
121
- <Text bold color="green">Configuration Summary</Text>
122
- <Box marginTop={1} flexDirection="column">
123
- <Text>• Storage: <Text bold>{storageMode}</Text></Text>
124
- <Text>• Copilot: <Text bold>{tools.copilot ? 'Yes' : 'No'}</Text></Text>
125
- <Text>• Antigravity: <Text bold>{tools.antigravity ? 'Yes' : 'No'}</Text></Text>
150
+ <Box marginBottom={1}><Text bold underline>Summary</Text></Box>
151
+ <Box flexDirection="column" marginBottom={1}>
152
+ <Box><Text bold>Storage:</Text><Text> {storageMode}</Text></Box>
153
+ <Box><Text bold>Copilot:</Text><Text color={tools.copilot ? 'green' : 'red'}> {tools.copilot ? 'Enabled' : 'Disabled'}</Text></Box>
154
+ <Box><Text bold>Antigravity:</Text><Text color={tools.antigravity ? 'green' : 'red'}> {tools.antigravity ? 'Enabled' : 'Disabled'}</Text></Box>
126
155
  </Box>
127
- <Box marginTop={1}>
128
- <Text dimColor>Press Enter to create configuration...</Text>
156
+ <Box marginTop={1} alignItems="center">
157
+ <Text dimColor>Press Enter to generate config ❯</Text>
129
158
  </Box>
130
159
  </Box>
131
160
  )}
132
161
  </Box>
162
+
163
+ {!loading && (
164
+ <Box marginTop={1}>
165
+ <Text dimColor>v{process.env.npm_package_version || '0.1.0'}</Text>
166
+ </Box>
167
+ )}
133
168
  </Box>
134
169
  );
135
170
  }