Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libs/remix-ui/editor/src/lib/remix-ui-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const EditorUI = (props: EditorUIProps) => {
const currentFunction = useRef('')
const currentFileRef = useRef('')
const currentUrlRef = useRef('')
let currenFunctionNode = useRef('')
let currentFunctionNode = useRef('')

// const currentDecorations = useRef({ sourceAnnotationsPerFile: {}, markerPerFile: {} }) // decorations that are currently in use by the editor
// const registeredDecorations = useRef({}) // registered decorations
Expand Down Expand Up @@ -784,7 +784,7 @@ export const EditorUI = (props: EditorUIProps) => {
// const cm = await await props.plugin.call('remixAI', 'code_explaining', message)
const cm = await props.plugin.call('remixAI' as any, 'chatPipe', 'solidity_answer', message, '', pipeMessage)
const natSpecCom = "\n" + extractNatspecComments(cm)
const cln = await props.plugin.call('codeParser', "getLineColumnOfNode", currenFunctionNode)
const cln = await props.plugin.call('codeParser', "getLineColumnOfNode", currentFunctionNode)
const range = new monacoRef.current.Range(cln.start.line, cln.start.column, cln.start.line, cln.start.column)
const lines = natSpecCom.split('\n')
const newNatSpecCom = []
Expand Down Expand Up @@ -941,7 +941,7 @@ export const EditorUI = (props: EditorUIProps) => {
const functionImpl = nodesAtPosition.find((node) => node.kind === 'function')
if (functionImpl) {
currentFunction.current = functionImpl.name
currenFunctionNode = functionImpl
currentFunctionNode = functionImpl

executeGptGenerateDocumentationAction.label = intl.formatMessage({ id: 'editor.generateDocumentation2' }, { name: functionImpl.name })
gptGenerateDocumentationAction = editor.addAction(executeGptGenerateDocumentationAction)
Expand Down