@@ -6,6 +6,7 @@ import OpenAIKey from './components/OpenAIKey';
6
6
import Projects from './components/Projects' ;
7
7
import Prompts from './components/Prompts' ;
8
8
import RunOutput from './components/RunOutput' ;
9
+ import Runner from './components/Runner' ; // Added this import
9
10
10
11
const client = createDockerDesktopClient ( ) ;
11
12
@@ -168,31 +169,22 @@ export function App() {
168
169
track ( 'end-prompt' ) ;
169
170
}
170
171
172
+ const renderPrompt = async ( ) => {
173
+ await client . docker . cli . exec ( "pull" , [ "vonwig/prompts" ] ) ;
174
+ const args = getRunArgs ( selectedPrompt ! , selectedProject ! , "" , client . host . platform , true )
175
+ const render = await client . docker . cli . exec ( "run" , args ) ;
176
+ console . log ( render ) ;
177
+ }
178
+
171
179
return (
172
180
< div style = { { overflow : 'auto' , maxHeight : '100vh' } } ref = { scrollRef } >
173
181
< Stack direction = "column" spacing = { 1 } >
174
182
< OpenAIKey openAIKey = { openAIKey || '' } setOpenAIKey = { setOpenAIKey } />
175
183
< Projects projects = { projects } selectedProject = { selectedProject } setProjects = { setProjects } setSelectedProject = { setSelectedProject } />
176
184
< Prompts prompts = { prompts } selectedPrompt = { selectedPrompt } promptInput = { promptInput } setPrompts = { setPrompts } setSelectedPrompt = { setSelectedPrompt } setPromptInput = { setPromptInput } track = { track } />
177
- { selectedProject && selectedPrompt && openAIKey ? (
178
- < Paper sx = { { padding : 1 } } >
179
- < Typography variant = "h3" > Ready</ Typography >
180
- < pre > PROJECT={ selectedProject } </ pre >
181
- < pre > PROMPT={ selectedPrompt } </ pre >
182
- < Button sx = { { mt : 1 , } } color = 'success' onClick = { startPrompt } >
183
- Run
184
- </ Button >
185
- </ Paper >
186
- ) : (
187
- < Paper sx = { { padding : 1 } } >
188
- < Typography variant = 'h3' > Missing:</ Typography >
189
- { selectedProject ?. length ? null : < Typography variant = 'body1' > - Project</ Typography > }
190
- { selectedPrompt ?. length ? null : < Typography variant = 'body1' > - Prompt</ Typography > }
191
- { openAIKey ?. length ? null : < Typography variant = 'body1' > - OpenAI Key</ Typography > }
192
- </ Paper >
193
- ) }
185
+ < Runner selectedProject = { selectedProject } selectedPrompt = { selectedPrompt } openAIKey = { openAIKey } startPrompt = { startPrompt } renderPrompt = { renderPrompt } />
194
186
< RunOutput runOut = { runOut } showDebug = { showDebug } setShowDebug = { setShowDebug } />
195
187
</ Stack >
196
188
</ div >
197
189
)
198
- }
190
+ }
0 commit comments