added AI documentation button. Hart coded link

pull/4677/head
Stéphane Tetsing 8 months ago
parent 97a25bf55f
commit 067cfb0015
  1. 3
      apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json
  2. 18
      libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx

@ -4,8 +4,9 @@
"remixUiTabs.tooltipText3": "Select .sol or .yul file to compile or a .ts or .js file and run it",
"remixUiTabs.tooltipText4": "Select .sol file to use AI tools [BETA]",
"remixUiTabs.tooltipText5": "Explain the contract(s) in current file [BETA]",
"remixUiTabs.tooltipText6": "Enable AI Copilot [BETA]. Note that the AI model is downloaded once to your browser's memory - approximately 50MB.",
"remixUiTabs.tooltipText6": "Enable AI Copilot [BETA]",
"remixUiTabs.tooltipText7": "Disable AI Copilot [BETA]",
"remixUiTabs.tooltipText8": "AI Documentation [BETA]",
"remixUiTabs.zoomOut": "Zoom out",
"remixUiTabs.zoomIn": "Zoom in"
}

@ -282,6 +282,24 @@ export const TabsUI = (props: TabsUIProps) => {
</span>
</button>
</CustomTooltip>
<CustomTooltip placement="bottom" tooltipId="overlay-tooltip-aiDocumentation" tooltipText={<FormattedMessage id="remixUiTabs.tooltipText8" />}>
<span
data-id="remix_ai_docs"
id="remix_ai_docs"
className="btn ai-docs"
role='link'
onClick={()=>{window.open("https://remix-ide.readthedocs.io/en/latest/security.html")}}
>
<i className="fa-solid fa-book text-ai"></i>
<span
className="position-relative text-ai text-sm pl-1"
style={{fontSize: "x-small", alignSelf: "end"}}
>
AI
</span>
</span>
</CustomTooltip>
<script>
const button = document.querySelector('#button');
</script>

Loading…
Cancel
Save