mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-25 18:55:19 +02:00
Add context to scenarios in simulation
This commit is contained in:
parent
c468a9726b
commit
4862a6273d
7 changed files with 40 additions and 3 deletions
|
|
@ -53,6 +53,7 @@ export function App({
|
|||
messages: [],
|
||||
simulated: true,
|
||||
simulationData: data,
|
||||
systemMessage: 'context' in data ? data.context : '',
|
||||
});
|
||||
}, [counter, projectId]);
|
||||
|
||||
|
|
@ -62,7 +63,10 @@ export function App({
|
|||
console.log('Scenario Effect triggered:', { scenarioId, projectId });
|
||||
getScenario(projectId, scenarioId).then((scenario) => {
|
||||
console.log('Scenario data received:', scenario);
|
||||
beginSimulation(scenario as z.infer<typeof SimulationScenarioData>);
|
||||
beginSimulation({
|
||||
...scenario,
|
||||
systemMessage: scenario.context || '',
|
||||
} as z.infer<typeof SimulationScenarioData>);
|
||||
localStorage.removeItem('pendingScenarioId');
|
||||
}).catch(error => {
|
||||
console.error('Error fetching scenario:', error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue