MCPcopy Index your code
hub / github.com/coderoad/coderoad-vscode / loadLevel

Function loadLevel

web-app/src/services/state/actions/editor.ts:30–45  ·  view source on GitHub ↗
(context: T.MachineContext)

Source from the content-addressed store, hash-verified

28 })
29 },
30 loadLevel(context: T.MachineContext): void {
31 const level: TT.Level = selectors.currentLevel(context)
32 const step: TT.Step | null = selectors.currentStep(context)
33 // load step actions
34 editorSend({
35 type: 'EDITOR_LEVEL_ENTER',
36 payload: {
37 position: {
38 stepId: step?.id || null,
39 levelId: level.id,
40 complete: false,
41 },
42 actions: level.setup,
43 },
44 })
45 },
46 loadStep(context: T.MachineContext): void {
47 const step: TT.Step | null = selectors.currentStep(context)
48 if (step && step.setup) {

Callers

nothing calls this directly

Calls 1

editorSendFunction · 0.85

Tested by

no test coverage detected