minor fix docs

pull/5241/head
STetsing 1 month ago
parent 52408f32e5
commit 1348d1f76b
  1. 12
      apps/remix-ide/src/app/plugins/remixAIPlugin.tsx
  2. 6
      libs/remix-ui/editor/src/lib/remix-ui-editor.tsx

@ -52,8 +52,18 @@ export class RemixAIPlugin extends ViewPlugin {
console.log('Activating RemixAIPlugin on browser')
this.initialize()
}
this.call('sidePanel', 'pinView', profile)
this.setRemixAIOnSidePannel(false)
}
setRemixAIOnSidePannel(resize:boolean=false){
if (resize){
this.call('sidePanel', 'pinView', profile)
} else {
this.call('sidePanel', 'pinView', profile)
}
}
async initialize(model1?:IModel, model2?:IModel, remoteModel?:IRemoteModel, useRemote?:boolean){
if (this.isOnDesktop) {
// on desktop use remote inferencer -> false

@ -776,9 +776,11 @@ export const EditorUI = (props: EditorUIProps) => {
const file = await props.plugin.call('fileManager', 'getCurrentFile')
const content = await props.plugin.call('fileManager', 'readFile', file)
const message = intl.formatMessage({ id: 'editor.generateDocumentationByAI' }, { content, currentFunction: currentFunction.current })
// do not stream this response
const cm = await await props.plugin.call('remixAI', 'code_explaining', message)
const pipeMessage = `Generate the documentation for the function **${currentFunction.current}**`
// 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)

Loading…
Cancel
Save