Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ui/desktop/src/utils/appInitialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from '../components/ConfigContext';
import { backupConfig, initConfig, readAllConfig, recoverConfig, validateConfig } from '../api';
import { COST_TRACKING_ENABLED } from '../updates';
import { toastService } from '../toasts';

interface InitializationDependencies {
getExtensions?: (b: boolean) => Promise<FixedExtensionEntry[]>;
Expand Down Expand Up @@ -140,6 +141,13 @@ const initializeForRecipe = async ({
> & {
recipeConfig: Recipe;
}) => {
toastService.configure({ silent: false });

const loadingToastId = toastService.loading({
title: `Loading recipe: ${recipeConfig.title}`,
msg: 'Setting up environment...',
});

await initConfig();
await readAllConfig({ throwOnError: true });

Expand All @@ -148,6 +156,9 @@ const initializeForRecipe = async ({
addExtension,
});

toastService.dismiss(loadingToastId);
toastService.success({ title: 'Recipe loaded', msg: `Recipe is ready to use` });

setPairChat((prevChat) => ({
...prevChat,
recipeConfig: recipeConfig,
Expand Down
Loading