Merge pull request #4677 from ethereum/doc_button

added AI documentation button. Hart coded link
pull/4554/head
yann300 8 months ago committed by GitHub
commit 157f84a942
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  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.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.tooltipText4": "Select .sol file to use AI tools [BETA]",
"remixUiTabs.tooltipText5": "Explain the contract(s) in current file [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.tooltipText7": "Disable AI Copilot [BETA]",
"remixUiTabs.tooltipText8": "AI Documentation [BETA]",
"remixUiTabs.zoomOut": "Zoom out", "remixUiTabs.zoomOut": "Zoom out",
"remixUiTabs.zoomIn": "Zoom in" "remixUiTabs.zoomIn": "Zoom in"
} }

@ -282,6 +282,24 @@ export const TabsUI = (props: TabsUIProps) => {
</span> </span>
</button> </button>
</CustomTooltip> </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> <script>
const button = document.querySelector('#button'); const button = document.querySelector('#button');
</script> </script>

Loading…
Cancel
Save