pull/5371/head
lianahus 2 weeks ago
parent e4d64a8b75
commit 4d047091ba
  1. 4
      apps/remix-ide/src/app/components/popup-panel.tsx
  2. 2
      apps/remix-ide/src/app/plugins/electron/remixAIDesktopPlugin.tsx
  3. 4
      apps/remix-ide/src/app/plugins/remixAIPlugin.tsx
  4. 2
      apps/remixdesktop/src/plugins/remixAIDektop.ts
  5. 2
      libs/remix-ui/remix-ai/src/lib/components/RemixAI.tsx
  6. 22
      libs/remix-ui/remix-ai/src/lib/components/color.css
  7. 4
      libs/remix-ui/remix-ai/src/lib/components/personas.tsx
  8. 60
      libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx
  9. 2
      libs/remix-ui/statusbar/src/lib/components/scamDetails.tsx

@ -97,14 +97,14 @@ export class PopupPanel extends AbstractPanel {
bottom: '2rem',
right: '3.5rem',
zIndex: 200,
boxShadow: '3px 3px var(--secondary), -0.1em 0 1.4em var(--secondary)'
boxShadow: "0 1px 7px var(--secondary)"
}}
data-id="popupPanelPluginsContainer"
>
<div className='d-flex flex-column'>
<RemixPluginPanel
header={
<span id='popupPanelToggle' className='pb-2 d-flex flex-row'>
<span id='popupPanelToggle' className='d-flex flex-row'>
<button
className='btn fas fa-angle-double-down'
onClick={async () => {

@ -10,7 +10,7 @@ const desktop_profile = {
description: 'RemixAI provides AI services to Remix IDE Desktop.',
documentation: 'https://remix-ide.readthedocs.io/en/latest/remixai.html',
icon: 'assets/img/remix-logo-blue.png',
methods: ['initializeModelBackend', 'code_completion', 'code_insertion', 'code_generation', 'code_explaining', 'error_explaining', 'solidity_answer', 'toggle'],
methods: ['initializeModelBackend', 'code_completion', 'code_insertion', 'code_generation', 'code_explaining', 'error_explaining', 'solidity_answer'],
}
export class remixAIDesktopPlugin extends ElectronPlugin {

@ -18,7 +18,7 @@ const profile = {
"solidity_answer", "code_explaining",
"code_insertion", "error_explaining",
"initialize", 'chatPipe', 'ProcessChatRequestBuffer',
'isChatRequestPending', 'toggle'],
'isChatRequestPending'],
events: [],
icon: 'assets/img/remix-logo-blue.png',
description: 'RemixAI provides AI services to Remix IDE.',
@ -224,7 +224,7 @@ export class RemixAIPlugin extends ViewPlugin {
render() {
return <div
id='ai-view'
className='pb-2 mb-2 h-100 d-flex'
className='h-100 d-flex'
data-id='aichat-view'
style={{
minHeight: 'max-content',

@ -32,7 +32,7 @@ const clientProfile: Profile = {
description: 'RemixAI provides AI services to Remix IDE Desktop.',
kind: '',
documentation: 'https://remix-ide.readthedocs.io/en/latest/remixai.html',
methods: ['initializeModelBackend', 'code_completion', 'code_insertion', 'code_generation', 'code_explaining', 'error_explaining', 'solidity_answer', 'toggle']
methods: ['initializeModelBackend', 'code_completion', 'code_insertion', 'code_generation', 'code_explaining', 'error_explaining', 'solidity_answer']
}
class RemixAIDesktopPluginClient extends ElectronBasePluginClient {

@ -9,7 +9,7 @@ export const RemixAITab = (props: IRemixAITab) => {
return (
<>
<div id="remixAITab" className="h-100 w-100 px-2 pb-1">
<div id="remixAITab" className="mx-2 h-100 w-100 px-0">
<div className='h-100'>
<Default plugin={props.plugin}></Default>
</div>

@ -16,6 +16,14 @@
overflow-y: hidden;
}
.nlux-comp-composer {
line-height: normal;
}
.nlux-comp-composer>textarea {
padding: 10px !important
}
.nlux-comp-conversationStarters {
width: auto !important;
padding: 0px !important
@ -26,7 +34,6 @@
border-color: var(--text-background) !important;
}
.nlux-theme-remix_ai_theme {
/* Override top-level chat room colors */
@ -61,9 +68,6 @@
--nlux-cvStrt--brdrWd: 0;
--nlux-cvStrt--brdClr: var(--light);
--nlux-cvStrt--brdrWd: 'hidden';
--nlux-comp-composer > textarea {padding: 8px;}
/* Override input colors */
--nlux-PromptInput--BackgroundColor: var(--light);
@ -74,10 +78,10 @@
--nlux-Composer--Gap: 0;
/* Override submit button colors */
--nlux-SubmitButton--BackgroundColor: var(--light);
--nlux-SubmitButton-Active--BackgroundColor:var(--light);
--nlux-SubmitButton--BackgroundColor: var(--primary);
--nlux-SubmitButton-Active--BackgroundColor:var(--primary);
--nlux-SubmitButton-Disabled--BackgroundColor: var(--dark);
--nlux-SubmitButton-Active--TextColor: var(--primary);
--nlux-SubmitButton-Active--TextColor: var(--white);
--nlux-SubmitButton-Disabled--TextColor: var(--text);
/** Inline code in markdown */
@ -103,11 +107,13 @@
--nlux-ConversationStarter--BackgroundColor: var(--light);
--nlux-copy-icon: url('data:image/svg+xml,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">\
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 1.25H10.9436C9.10583 1.24998 7.65019 1.24997 6.51098 1.40314C5.33856 1.56076 4.38961 1.89288 3.64124 2.64124C2.89288 3.38961 2.56076 4.33856 2.40314 5.51098C2.24997 6.65019 2.24998 8.10582 2.25 9.94357V16C2.25 17.8722 3.62205 19.424 5.41551 19.7047C5.55348 20.4687 5.81753 21.1208 6.34835 21.6517C6.95027 22.2536 7.70814 22.5125 8.60825 22.6335C9.47522 22.75 10.5775 22.75 11.9451 22.75H15.0549C16.4225 22.75 17.5248 22.75 18.3918 22.6335C19.2919 22.5125 20.0497 22.2536 20.6517 21.6517C21.2536 21.0497 21.5125 20.2919 21.6335 19.3918C21.75 18.5248 21.75 17.4225 21.75 16.0549V10.9451C21.75 9.57754 21.75 8.47522 21.6335 7.60825C21.5125 6.70814 21.2536 5.95027 20.6517 5.34835C20.1208 4.81753 19.4687 4.55348 18.7047 4.41551C18.424 2.62205 16.8722 1.25 15 1.25ZM17.1293 4.27117C16.8265 3.38623 15.9876 2.75 15 2.75H11C9.09318 2.75 7.73851 2.75159 6.71085 2.88976C5.70476 3.02502 5.12511 3.27869 4.7019 3.7019C4.27869 4.12511 4.02502 4.70476 3.88976 5.71085C3.75159 6.73851 3.75 8.09318 3.75 10V16C3.75 16.9876 4.38624 17.8265 5.27117 18.1293C5.24998 17.5194 5.24999 16.8297 5.25 16.0549V10.9451C5.24998 9.57754 5.24996 8.47522 5.36652 7.60825C5.48754 6.70814 5.74643 5.95027 6.34835 5.34835C6.95027 4.74643 7.70814 4.48754 8.60825 4.36652C9.47522 4.24996 10.5775 4.24998 11.9451 4.25H15.0549C15.8297 4.24999 16.5194 4.24998 17.1293 4.27117ZM7.40901 6.40901C7.68577 6.13225 8.07435 5.9518 8.80812 5.85315C9.56347 5.75159 10.5646 5.75 12 5.75H15C16.4354 5.75 17.4365 5.75159 18.1919 5.85315C18.9257 5.9518 19.3142 6.13225 19.591 6.40901C19.8678 6.68577 20.0482 7.07435 20.1469 7.80812C20.2484 8.56347 20.25 9.56458 20.25 11V16C20.25 17.4354 20.2484 18.4365 20.1469 19.1919C20.0482 19.9257 19.8678 20.3142 19.591 20.591C19.3142 20.8678 18.9257 21.0482 18.1919 21.1469C17.4365 21.2484 16.4354 21.25 15 21.25H12C10.5646 21.25 9.56347 21.2484 8.80812 21.1469C8.07435 21.0482 7.68577 20.8678 7.40901 20.591C7.13225 20.3142 6.9518 19.9257 6.85315 19.1919C6.75159 18.4365 6.75 17.4354 6.75 16V11C6.75 9.56458 6.75159 8.56347 6.85315 7.80812C6.9518 7.07435 7.13225 6.68577 7.40901 6.40901Z" fill="currentColor"/>\
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 1.25H10.9436C9.10583 1.24998 7.65019 1.24997 6.51098 1.40314C5.33856 1.56076 4.38961 1.89288 3.64124 2.64124C2.89288 3.38961 2.56076 4.33856 2.40314 5.51098C2.24997 6.65019 2.24998 8.10582 2.25 9.94357V16C2.25 17.8722 3.62205 19.424 5.41551 19.7047C5.55348 20.4687 5.81753 21.1208 6.34835 21.6517C6.95027 22.2536 7.70814 22.5125 8.60825 22.6335C9.47522 22.75 10.5775 22.75 11.9451 22.75H15.0549C16.4225 22.75 17.5248 22.75 18.3918 22.6335C19.2919 22.5125 20.0497 22.2536 20.6517 21.6517C21.2536 21.0497 21.5125 20.2919 21.6335 19.3918C21.75 18.5248 21.75 17.4225 21.75 16.0549V10.9451C21.75 9.57754 21.75 8.47522 21.6335 7.60825C21.5125 6.70814 21.2536 5.95027 20.6517 5.34835C20.1208 4.81753 19.4687 4.55348 18.7047 4.41551C18.424 2.62205 16.8722 1.25 15 1.25ZM17.1293 4.27117C16.8265 3.38623 15.9876 2.75 15 2.75H11C9.09318 2.75 7.73851 2.75159 6.71085 2.88976C5.70476 3.02502 5.12511 3.27869 4.7019 3.7019C4.27869 4.12511 4.02502 4.70476 3.88976 5.71085C3.75159 6.73851 3.75 8.09318 3.75 10V16C3.75 16.9876 4.38624 17.8265 5.27117 18.1293C5.24998 17.5194 5.24999 16.8297 5.25 16.0549V10.9451C5.24998 9.57754 5.24996 8.47522 5.36652 7.60825C5.48754 6.70814 5.74643 5.95027 6.34835 5.34835C6.95027 4.74643 7.70814 4.48754 8.60825 4.36652C9.47522 4.24996 10.5775 4.24998 11.9451 4.25H15.0549C15.8297 4.24999 16.5194 4.24998 17.1293 4.27117ZM7.40901 6.40901C7.68577 6.13225 8.07435 5.9518 8.80812 5.85315C9.56347 5.75159 10.5646 5.75 12 5.75H15C16.4354 5.75 17.4365 5.75159 18.1919 5.85315C18.9257 5.9518 19.3142 6.13225 19.591 6.40901C19.8678 6.68577 20.0482 7.07435 20.1469 7.80812C20.2484 8.56347 20.25 9.56458 20.25 11V16C20.25 17.4354 20.2484 18.4365 20.1469 19.1919C20.0482 19.9257 19.8678 20.3142 19.591 20.591C19.3142 20.8678 18.9257 21.0482 18.1919 21.1469C17.4365 21.2484 16.4354 21.25 15 21.25H12C10.5646 21.25 9.56347 21.2484 8.80812 21.1469C8.07435 21.0482 7.68577 20.8678 7.40901 20.591C7.13225 20.3142 6.9518 19.9257 6.85315 19.1919C6.75159 18.4365 6.75 17.4354 6.75 16V11C6.75 9.56458 6.75159 8.56347 6.85315 7.80812C6.9518 7.07435 7.13225 6.68577 7.40901 6.40901Z" fill="currentColor"/>\
</svg>\
');
/* Override icon for the send button */
--nlux-send-icon: url('data:image/svg+xml, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM297 385c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l71-71L120 280c-13.3 0-24-10.7-24-24s10.7-24 24-24l214.1 0-71-71c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L409 239c9.4 9.4 9.4 24.6 0 33.9L297 385z"/></svg>');
--nlux-comp-composer > textarea {padding: 10px;};
}

@ -1,8 +1,8 @@
import { PersonaOptions, UserPersona } from '@nlux/react';
export const user: UserPersona = {
name: 'Pipper',
name: 'Remi',
avatar: 'assets/img/remix-logo-blue.png'
};
export const assistantAvatar = 'assets/img/remi-prof.webp';
export const assistantAvatar = 'assets/img/aiLogo.svg'

@ -49,30 +49,42 @@ export default function AIStatus(props: AIStatusProps) {
{copilotActive === false ? 'RemixAI Copilot (disabled)' : 'RemixAI Copilot (enabled)'}
</span>
</CustomTooltip>
<div className="d-flex text-sm flex-row pr-2 text-white justify-content-center align-items-center">
<button
style={{
position: 'absolute',
bottom: '0.7rem',
right: '0.3rem',
height: '3rem',
width: '3rem',
borderRadius: '50%',
color: 'var(--ai)',
boxShadow: '3px 3px var(--secondary), -0.1em 0 1.4em var(--secondary)'
}}
data-id="aiStatusButton"
className='p-1 alert alert-info border border-info fa-solid fa-message-bot'
onClick={async () => {
appContext.appStateDispatch({
type: appActionTypes.setShowPopupPanel,
payload: !appContext.appState.showPopupPanel
})
}}
>
</button>
</div>
<CustomTooltip
tooltipText={"Ask RemixAI for help!"}
>
<div className="d-flex text-sm flex-row pr-2 text-white justify-content-center align-items-center">
<style>{`
button.fa-robot:focus {
outline: none;
box-shadow: none;
}
button.fa-robot:hover {
border-color: var(--info)
}
`}</style>
<button
style={{
position: 'absolute',
bottom: '0.7rem',
right: '0.1rem',
height: '3rem',
width: '3rem',
borderRadius: '50%',
color: 'var(--ai)',
boxShadow: "0 1px 7px var(--secondary)"
}}
data-id="aiStatusButton"
className='h3 p-1 alert alert-info fal fa-robot'
onClick={async () => {
appContext.appStateDispatch({
type: appActionTypes.setShowPopupPanel,
payload: !appContext.appState.showPopupPanel
})
}}
>
</button>
</div>
</CustomTooltip>
</div>
)
}

@ -26,7 +26,7 @@ export default function ScamDetails ({ refs, floatStyle, scamAlerts }: ScamDetai
height: '6rem',
transform: 'translate(88.5px, -80px)',
willChange: 'transform',
boxShadow: '3px 3px var(--secondary), -0.1em 0 1.4em var(--secondary)'
boxShadow: "0 1px 7px var(--secondary)"
} }
className="p-1 pb-0 mb-1 d-flex alert alert-warning border border-warning"
>

Loading…
Cancel
Save