Skip to content

Commit 74cf15f

Browse files
committed
Remove unused code
1 parent 84c4706 commit 74cf15f

File tree

2 files changed

+3
-59
lines changed

2 files changed

+3
-59
lines changed

apps/noir-compiler/src/app/components/container.tsx

Lines changed: 2 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,7 @@ export function Container () {
2121
}
2222
}
2323

24-
const handleOpenErrorLocation = async (report: CompilerReport) => {
25-
if (report.labels.length > 0) {
26-
// const location = noirApp.appState.filePathToId[report.labels[0].file_id]
27-
// const startRange = report.labels[0].range.start
28-
29-
// if (location) {
30-
// const fullPathLocation = await circuitApp.plugin.resolveReportPath(location)
31-
32-
// await circuitApp.plugin.call('fileManager', 'open', fullPathLocation)
33-
// // @ts-ignore
34-
// const startPosition: { lineNumber: number; column: number } = await circuitApp.plugin.call('editor', 'getPositionAt', startRange)
35-
// // @ts-ignore
36-
// await circuitApp.plugin.call('editor', 'gotoLine', startPosition.lineNumber - 1, startPosition.column)
37-
// }
38-
}
39-
}
24+
const handleOpenErrorLocation = async (report: CompilerReport) => {}
4025

4126
const handleCircuitAutoCompile = (value: boolean) => {
4227
noirApp.dispatch({ type: 'SET_AUTO_COMPILE', payload: value })
@@ -46,48 +31,7 @@ export function Container () {
4631
noirApp.dispatch({ type: 'SET_HIDE_WARNINGS', payload: value })
4732
}
4833

49-
const askGPT = async (report: CompilerReport) => {
50-
if (report.labels.length > 0) {
51-
// const location = circuitApp.appState.filePathToId[report.labels[0].file_id]
52-
// const error = report.labels[0].message
53-
54-
// if (location) {
55-
// const fullPathLocation = await circuitApp.plugin.resolveReportPath(location)
56-
// const content = await circuitApp.plugin.call('fileManager', 'readFile', fullPathLocation)
57-
// const message = `
58-
// circom code: ${content}
59-
// error message: ${error}
60-
// full circom error: ${JSON.stringify(report, null, 2)}
61-
// explain why the error occurred and how to fix it.
62-
// `
63-
// await circuitApp.plugin.call('popupPanel' as any, 'showPopupPanel', true)
64-
// setTimeout(async () => {
65-
// await circuitApp.plugin.call('remixAI' as any, 'chatPipe', 'error_explaining', message)
66-
// }, 500)
67-
// } else {
68-
// const message = `
69-
// error message: ${error}
70-
// full circom error: ${JSON.stringify(report, null, 2)}
71-
// explain why the error occurred and how to fix it.
72-
// `
73-
// await circuitApp.plugin.call('popupPanel' as any, 'showPopupPanel', true)
74-
// setTimeout(async () => {
75-
// await circuitApp.plugin.call('remixAI' as any, 'chatPipe', 'error_explaining', message)
76-
// }, 500)
77-
// }
78-
} else {
79-
// const error = report.message
80-
// const message = `
81-
// error message: ${error}
82-
// full circom error: ${JSON.stringify(report, null, 2)}
83-
// explain why the error occurred and how to fix it.
84-
// `
85-
// await circuitApp.plugin.call('popupPanel' as any, 'showPopupPanel', true)
86-
// setTimeout(async () => {
87-
// await circuitApp.plugin.call('remixAI' as any, 'chatPipe', 'error_explaining', message)
88-
// }, 500)
89-
}
90-
}
34+
const askGPT = async (report: CompilerReport) => {}
9135

9236
const handleCompileClick = () => {
9337
compileNoirCircuit(noirApp.plugin, noirApp.appState)

apps/noir-compiler/src/app/services/noirPluginClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class NoirPluginClient extends PluginClient {
5656
this.call('terminal', 'log', { type: 'log', value: 'Compiling ' + path })
5757
const program = await compile_program(this.fm, null, this.logFn.bind(this), this.debugFn.bind(this))
5858

59-
console.log('program: ', program)
59+
this.call('fileManager', 'writeFile', path.replace('.nr', '.json'), JSON.stringify(program, null, 2))
6060
this.internalEvents.emit('noir_compiling_done')
6161
this.emit('statusChanged', { key: 'succeed', title: 'Noir circuit compiled successfully', type: 'success' })
6262
// @ts-ignore

0 commit comments

Comments
 (0)