MCPcopy Create free account
hub / github.com/coderoad/coderoad-vscode / editorLoadSolution

Function editorLoadSolution

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

Source from the content-addressed store, hash-verified

72 }
73 },
74 editorLoadSolution(context: T.MachineContext): void {
75 const step: TT.Step | null = selectors.currentStep(context)
76 // tell editor to load solution commit
77 if (step && step.solution) {
78 editorSend({
79 type: 'EDITOR_SOLUTION_ENTER',
80 payload: {
81 position: {
82 stepId: step.id,
83 levelId: context.position.levelId,
84 complete: false,
85 },
86 actions: step.solution,
87 },
88 })
89 }
90 },
91 validateSetup() {
92 editorSend({
93 type: 'EDITOR_VALIDATE_SETUP',

Callers

nothing calls this directly

Calls 1

editorSendFunction · 0.85

Tested by

no test coverage detected