Skip to main content
Glama
initializeWizardState.ts907 B
/** * This file defines the initializeWizardState function which creates and returns * a new wizard state object with default values. The function initializes the * issue creation wizard state with essential properties including: * * - Setting the wizard as active * - Setting the current step to INITIATE * - Initializing empty fields object * - Creating empty validation structures * - Setting a creation timestamp * * This provides a clean starting point for the issue creation process. */ import { log } from '../../../utils/logger' import { type WizardState, WizardStep } from '../types' export function initializeWizardState(): WizardState { const initialState: WizardState = { active: true, currentStep: WizardStep.INITIATE, fields: {}, validation: { errors: {}, warnings: {}, }, timestamp: Date.now(), } log('Initialized new wizard state') return initialState }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tbreeding/jira-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server