File tree Expand file tree Collapse file tree 2 files changed +25
-24
lines changed
Expand file tree Collapse file tree 2 files changed +25
-24
lines changed Original file line number Diff line number Diff line change @@ -171,15 +171,15 @@ export const _runCode = wrapAsync(async function runCode({code, source}) {
171171 finishedLastRunResolve ( ) ;
172172
173173 postCodeEntry ( {
174- entry,
175- result : {
176- passed : data . passed ,
177- messageSections : data . message_sections ?. map ( section => ( {
178- type : section . type ,
179- messages : section . messages ?. map ( m => _ . truncate ( m , { length : 1000 } ) ) ,
180- } ) ) ,
181- output : _ . truncate ( data . output , { length : 1000 } ) ,
182- } ,
174+ // entry,
175+ // result: {
176+ // passed: data.passed,
177+ // messageSections: data.message_sections?.map(section => ({
178+ // type: section.type,
179+ // messages: section.messages?.map(m => _.truncate(m, {length: 1000})),
180+ // })),
181+ // output: _.truncate(data.output, {length: 1000}),
182+ // },
183183 } ) ;
184184} ) ;
185185
Original file line number Diff line number Diff line change @@ -514,19 +514,20 @@ export function logEvent(name, data = {}) {
514514}
515515
516516export function postCodeEntry ( codeEntry ) {
517- const { user : { developerMode} , route, assistant : { numHints, requestingSolution} } = localState ;
518- codeEntry = {
519- ...codeEntry ,
520- state : {
521- developerMode,
522- page_route : route ,
523- num_hints : numHints ,
524- requesting_solution : requestingSolution ,
525- } ,
526- timestamp : new Date ( ) . toISOString ( ) ,
527- } ;
528- console . log ( "Posting code entry" , codeEntry ) ;
529- if ( isProduction ) {
530- databaseRequest ( "POST" , codeEntry , "code_entries" ) . catch ( e => console . error ( e ) ) ;
531- }
517+ // Disabling for now because this data isn't used.
518+ // const {user: {developerMode}, route, assistant: {numHints, requestingSolution} } = localState;
519+ // codeEntry = {
520+ // ...codeEntry,
521+ // state: {
522+ // developerMode,
523+ // page_route: route,
524+ // num_hints: numHints,
525+ // requesting_solution: requestingSolution,
526+ // },
527+ // timestamp: new Date().toISOString(),
528+ // };
529+ // console.log("Posting code entry", codeEntry);
530+ // if (isProduction) {
531+ // databaseRequest("POST", codeEntry, "code_entries").catch(e => console.error(e));
532+ // }
532533}
You can’t perform that action at this time.
0 commit comments