pull/5371/head
bunsenstraat 3 weeks ago
parent 452ae03b88
commit 78d4ce895c
  1. 4
      apps/remix-ide/src/app/components/popup-panel.tsx
  2. 2
      libs/remix-ui/app/src/index.ts
  3. 50
      libs/remix-ui/app/src/lib/remix-app/reducer/app.ts
  4. 2
      libs/remix-ui/helper/src/lib/components/PluginViewWrapper.tsx
  5. 4
      libs/remix-ui/remix-ai/src/lib/components/Default.tsx
  6. 2
      libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx
  7. 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 packageJson from '../../../../../package.json'
import { PluginViewWrapper } from '@remix-ui/helper' import { PluginViewWrapper } from '@remix-ui/helper'
import { EventEmitter } from 'events' 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 = { const profile = {
name: 'popupPanel', name: 'popupPanel',

@ -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 { dispatchModalContext, dispatchModalInterface, AppContext, appProviderContextType, appPlatformTypes, platformContext, onLineContext } from './lib/remix-app/context/context'
export { ModalProvider, useDialogDispatchers } from './lib/remix-app/context/provider' export { ModalProvider, useDialogDispatchers } from './lib/remix-app/context/provider'
export { AppModal } from './lib/remix-app/interface/index' 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 { ModalTypes, AppModalCancelTypes } from './lib/remix-app/types/index'
export { AppAction, appActionTypes } from './lib/remix-app/actions/app' 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 => { export const appReducer = (state: AppState, action: AppAction): AppState => {
switch (action.type) { switch (action.type) {
case appActionTypes.setGitHubUser: { case appActionTypes.setGitHubUser: {
return { return {
...state, ...state,
gitHubUser: action.payload gitHubUser: action.payload
}
} }
case appActionTypes.setCurrentBranch: { }
return { case appActionTypes.setCurrentBranch: {
...state, return {
currentBranch: action.payload ...state,
} currentBranch: action.payload
} }
case appActionTypes.setNeedsGitInit: { }
return { case appActionTypes.setNeedsGitInit: {
...state, return {
needsGitInit: action.payload ...state,
} needsGitInit: action.payload
} }
case appActionTypes.setCanUseGit: { }
return { case appActionTypes.setCanUseGit: {
...state, return {
canUseGit: action.payload ...state,
} canUseGit: action.payload
} }
}
case appActionTypes.setShowPopupPanel: { case appActionTypes.setShowPopupPanel: {
return { return {
...state, ...state,
showPopupPanel: action.payload showPopupPanel: action.payload
}
} }
} }
}
} }

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

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

@ -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."} tooltipText={copilotActive ? "Disable RemixAI Copilot" : "Enable RemixAI Copilot. Switch to .sol file to try it."}
> >
<span <span
style={{cursor: 'pointer'}} style={{ cursor: 'pointer' }}
className={"small mx-1 bg-info border-0 text-white " + (copilotActive === false ? "semi-bold" : "")} className={"small mx-1 bg-info border-0 text-white " + (copilotActive === false ? "semi-bold" : "")}
onClick={async () => { onClick={async () => {
await props.plugin.call('settings' as any, 'updateCopilotChoice', !copilotActive) 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"> <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"> { (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} /> <ScamAlertStatus refs={refs} getReferenceProps={getReferenceProps} />
</div> } </div> }
<div className='d-flex w-100 justify-content-between'> <div className='d-flex w-100 justify-content-between'>
<div className="remixui_statusbar remixui_statusbar_gitstatus"> <div className="remixui_statusbar remixui_statusbar_gitstatus">
<GitStatus plugin={statusBarPlugin} gitBranchName={gitBranchName} setGitBranchName={setGitBranchName} /> <GitStatus plugin={statusBarPlugin} gitBranchName={gitBranchName} setGitBranchName={setGitBranchName} />

Loading…
Cancel
Save