pull/5371/head
bunsenstraat 2 weeks ago committed by bunsenstraat
parent cbab1a11fb
commit ed896ee6fc
  1. 4
      apps/remix-ide/src/app/components/popup-panel.tsx
  2. 2
      apps/remix-ide/src/app/plugins/remixAIPlugin.tsx
  3. 2
      libs/remix-ui/app/src/index.ts
  4. 50
      libs/remix-ui/app/src/lib/remix-app/reducer/app.ts
  5. 2
      libs/remix-ui/helper/src/lib/components/PluginViewWrapper.tsx
  6. 4
      libs/remix-ui/remix-ai/src/lib/components/Default.tsx
  7. 6
      libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx
  8. 4
      libs/remix-ui/statusbar/src/lib/remixui-statusbar-panel.tsx

@ -4,8 +4,8 @@ import { PluginRecord, RemixPluginPanel } from '@remix-ui/panel'
import packageJson from '../../../../../package.json'
import { PluginViewWrapper } from '@remix-ui/helper'
import { EventEmitter } from 'events'
import { AppState } from 'libs/remix-ui/app/src/lib/remix-app/interface'
import { AppAction, appActionTypes } from '@remix-ui/app'
import { AppAction, appActionTypes, AppState } from '@remix-ui/app'
const profile = {
name: 'popupPanel',

@ -62,7 +62,7 @@ export class RemixAIPlugin extends ViewPlugin {
this.initialize()
}
}
async initialize(model1?:IModel, model2?:IModel, remoteModel?:IRemoteModel, useRemote?:boolean){
if (this.isOnDesktop && !this.useRemoteInferencer) {
// on desktop use remote inferencer -> false

@ -2,6 +2,6 @@ export { default as RemixApp } from './lib/remix-app/remix-app'
export { dispatchModalContext, dispatchModalInterface, AppContext, appProviderContextType, appPlatformTypes, platformContext, onLineContext } from './lib/remix-app/context/context'
export { ModalProvider, useDialogDispatchers } from './lib/remix-app/context/provider'
export { AppModal } from './lib/remix-app/interface/index'
export { AlertModal } from './lib/remix-app/interface/index'
export { AlertModal, AppState } from './lib/remix-app/interface/index'
export { ModalTypes, AppModalCancelTypes } from './lib/remix-app/types/index'
export { AppAction, appActionTypes } from './lib/remix-app/actions/app'

@ -3,36 +3,36 @@ import { AppState } from "../interface";
export const appReducer = (state: AppState, action: AppAction): AppState => {
switch (action.type) {
case appActionTypes.setGitHubUser: {
return {
...state,
gitHubUser: action.payload
}
case appActionTypes.setGitHubUser: {
return {
...state,
gitHubUser: action.payload
}
case appActionTypes.setCurrentBranch: {
return {
...state,
currentBranch: action.payload
}
}
case appActionTypes.setCurrentBranch: {
return {
...state,
currentBranch: action.payload
}
case appActionTypes.setNeedsGitInit: {
return {
...state,
needsGitInit: action.payload
}
}
case appActionTypes.setNeedsGitInit: {
return {
...state,
needsGitInit: action.payload
}
case appActionTypes.setCanUseGit: {
return {
...state,
canUseGit: action.payload
}
}
case appActionTypes.setCanUseGit: {
return {
...state,
canUseGit: action.payload
}
}
case appActionTypes.setShowPopupPanel: {
return {
...state,
showPopupPanel: action.payload
}
case appActionTypes.setShowPopupPanel: {
return {
...state,
showPopupPanel: action.payload
}
}
}
}

@ -14,7 +14,7 @@ export const PluginViewWrapper = (props: IPluginViewWrapperProps) => {
if (props.plugin.setDispatch) {
props.plugin.setDispatch(setState)
}
if(props.plugin.setAppStateDispatch) {
if (props.plugin.setAppStateDispatch) {
props.plugin.setAppStateDispatch(appContext.appStateDispatch)
}
}, [])

@ -42,8 +42,8 @@ export const Default = (props) => {
};
ChatApi = useAiChatApi();
const conversationStarters: ConversationStarter[] = [
{ prompt: 'Explain what is a solidity contract!'},
{ prompt: 'Explain briefly the current file in Editor'}]
{ prompt: 'Explain what is a solidity contract!' },
{ prompt: 'Explain briefly the current file in Editor' }]
// Define initial messages
const initialMessages: ChatItem[] = [

@ -15,13 +15,13 @@ export default function AIStatus(props: AIStatusProps) {
const [copilotActive, setCopilotActive] = useState(false)
const appContext = useContext(AppContext)
useEffect(() => {
const run = async () => {
const aiActivate = await props.plugin.call('settings', 'get', 'settings/copilot/suggest/activate')
setCopilotActive(aiActivate)
}
run()
}, [])
useEffect(() => {
@ -40,7 +40,7 @@ export default function AIStatus(props: AIStatusProps) {
tooltipText={copilotActive ? "Disable RemixAI Copilot" : "Enable RemixAI Copilot. Switch to .sol file to try it."}
>
<span
style={{cursor: 'pointer'}}
style={{ cursor: 'pointer' }}
className={"small mx-1 bg-info border-0 text-white " + (copilotActive === false ? "semi-bold" : "")}
onClick={async () => {
await props.plugin.call('settings' as any, 'updateCopilotChoice', !copilotActive)

@ -89,8 +89,8 @@ export function RemixUIStatusBar({ statusBarPlugin }: RemixUIStatusBarProps) {
)}
<div className="d-flex remixui_statusbar_height flex-row bg-info justify-content-between align-items-center">
{ (platform !== appPlatformTypes.desktop) && <div className="remixui_statusbar bg-warning px-2 remixui_statusbar_custom_padding d-flex justify-center align-items-center">
<ScamAlertStatus refs={refs} getReferenceProps={getReferenceProps} />
</div> }
<ScamAlertStatus refs={refs} getReferenceProps={getReferenceProps} />
</div> }
<div className='d-flex w-100 justify-content-between'>
<div className="remixui_statusbar remixui_statusbar_gitstatus">
<GitStatus plugin={statusBarPlugin} gitBranchName={gitBranchName} setGitBranchName={setGitBranchName} />

Loading…
Cancel
Save