Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev -> Main v0.0.9 #890

Merged
merged 101 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
e7026c3
first commit
Aryan-Singh-14 Jul 11, 2023
898c75f
instagram APIs implemented and AI generated caption utility added
Aryan-Singh-14 Jul 13, 2023
fce5808
Image upload to S3 and URL generation added
Aryan-Singh-14 Jul 14, 2023
ac457a5
added upload to s3 instagram bucket
Aryan-Singh-14 Jul 18, 2023
0ab34be
Merge branch 'dev' into instagram_tool
Aryan-Singh-14 Jul 18, 2023
59a95ed
fixing the send email attachement issue
Jul 18, 2023
35b5bc4
fixing schedule agent run
Jul 18, 2023
2551e8f
Refactored code
Aryan-Singh-14 Jul 19, 2023
281753f
Resource duplicate fix (#803)
luciferlinx101 Jul 19, 2023
6f3deb4
removed jpeg files used for testing
Aryan-Singh-14 Jul 19, 2023
c697937
Dalle fix (#812)
Tarraann Jul 19, 2023
2889187
fixed recurring run issues
Aryan-Singh-14 Jul 20, 2023
9f0a78d
Supercoder Improve tool addition (#755)
Autocop-Agent Jul 20, 2023
e37014e
fixed recurring issues
Aryan-Singh-14 Jul 20, 2023
0937ba5
Edit agent templates (#793)
anisha1607 Jul 20, 2023
ded659c
Readme added
Aryan-Singh-14 Jul 20, 2023
3708a30
instabot config folder deleted
Aryan-Singh-14 Jul 20, 2023
cdf3495
Read file s3 fix (#823)
luciferlinx101 Jul 20, 2023
0bb6000
refactored code
Aryan-Singh-14 Jul 20, 2023
1218fd6
Handled the case where stable diffusion generated multiple photos
Aryan-Singh-14 Jul 21, 2023
37bab8d
ui bug bash fixes
jedan2506 Jul 21, 2023
2607db3
docker compose.yaml version reverted to original
Aryan-Singh-14 Jul 21, 2023
9f6c045
removed the utility to add stable diffusion automatically
Aryan-Singh-14 Jul 21, 2023
e2dbae1
ui bug bash fixes
jedan2506 Jul 21, 2023
873a049
ui bug bash fixes
jedan2506 Jul 21, 2023
167c4bf
Edit agent templates fix (#838)
anisha1607 Jul 21, 2023
c76c453
ui bug bash fixes
jedan2506 Jul 21, 2023
8415dbe
Merge pull request #837 from TransformerOptimus/bugs_revamp_dev
nborthy Jul 21, 2023
b6587bf
added test cases and modified readme
Aryan-Singh-14 Jul 25, 2023
6595b1a
Frontend bugs (#849)
nborthy Jul 25, 2023
58355d3
Added instagram tool bucket entry in config_template.yaml
Aryan-Singh-14 Jul 25, 2023
bb0304f
added instagram tool bucket entry in config template
Aryan-Singh-14 Jul 25, 2023
e2c01bc
ui bug fixes
jedan2506 Jul 25, 2023
dab5ab7
Merge pull request #828 from TransformerOptimus/instagram_tool
Aryan-Singh-14 Jul 25, 2023
e57b8bc
ui bug fixes
jedan2506 Jul 25, 2023
802eeb1
ui bug fixes
jedan2506 Jul 25, 2023
de8189e
Merge pull request #853 from TransformerOptimus/apm_changes
nborthy Jul 25, 2023
1ea8d16
External repo support for marketplace (#847)
luciferlinx101 Jul 25, 2023
bddffb5
instagram image added
jedan2506 Jul 25, 2023
e3291fb
Merge pull request #856 from TransformerOptimus/instagram_pictures
nborthy Jul 25, 2023
84b593c
apm bug fixes
jedan2506 Jul 25, 2023
4b202ba
Dev rebase (#858)
nihiragarwal24 Jul 25, 2023
eca6e6d
apm bug fixes
jedan2506 Jul 25, 2023
8eeaca4
apm bug fixes
jedan2506 Jul 25, 2023
6392966
Merge pull request #859 from TransformerOptimus/instagram_pictures
nborthy Jul 25, 2023
97c5ee9
Docker image (#836)
Fluder-Paradyne Jul 25, 2023
b638d37
handled resource path change (#861)
Aryan-Singh-14 Jul 26, 2023
fdadbf0
Updated Expiry Time backward fix
luciferlinx101 Jul 26, 2023
a2d8e5e
Merge pull request #864 from TransformerOptimus/jwt-expiry-backward-fix
nborthy Jul 26, 2023
e105b2e
readme toolkit fix (#867)
luciferlinx101 Jul 26, 2023
d9c942f
Knowledge frontend (#860)
nborthy Jul 26, 2023
800bb30
Fixed Delete Agent Bug (#830)
anisha1607 Jul 26, 2023
20dfa29
close button fix
NishantBorthakur Jul 26, 2023
73fff67
Merge branch 'dev_fixes' of github.com:TransformerOptimus/SuperAGI in…
jedan2506 Jul 26, 2023
3fea732
refactor
NishantBorthakur Jul 26, 2023
799417e
centralise prevent default
NishantBorthakur Jul 26, 2023
b124288
Merge branch 'dev_fixes' of github.com:TransformerOptimus/SuperAGI in…
jedan2506 Jul 26, 2023
0ebd563
app.css fixes
jedan2506 Jul 26, 2023
c1f9ab9
Dev fixes (#869)
jedan2506 Jul 26, 2023
9973567
close icon issue
NishantBorthakur Jul 26, 2023
5707bdb
resolving conflcits
NishantBorthakur Jul 26, 2023
f74b781
Merge pull request #872 from TransformerOptimus/dev_fixes
nborthy Jul 26, 2023
ae6e620
Added tools.json (#868)
luciferlinx101 Jul 26, 2023
030e886
Updated Chat completion for tool selection prompt
luciferlinx101 Jul 26, 2023
9326e6c
Updated Prompt
luciferlinx101 Jul 26, 2023
32e31c0
Bug fixes afternoon (#875)
jedan2506 Jul 26, 2023
6eeb7f6
Docker image (#876)
Fluder-Paradyne Jul 26, 2023
b798985
Final knowledge backend (#870)
Tarraann Jul 26, 2023
caad111
very minor fix for naming
Jul 26, 2023
98ee15a
Merge pull request #877 from TransformerOptimus/minor_fix_knowledge
Tarraann Jul 26, 2023
4356fbc
Changes for HTTP EXception in Knowledge Controller
Jul 27, 2023
73efa91
HTTP changes for vector_dbs
Jul 27, 2023
db80c8c
Bug fixes afternoon (#878)
jedan2506 Jul 27, 2023
4c06c1d
Refactoring of vector embedding
Jul 27, 2023
f149e9b
adding of knowledge logo
namansleeps2 Jul 27, 2023
75930b2
Delete HTTP fixed
Jul 27, 2023
2d52781
Merge remote-tracking branch 'origin/knowledge_logo' into http_knowledge
Jul 27, 2023
a876859
Updated prompt
luciferlinx101 Jul 27, 2023
a59a1b6
changes in tests
Jul 27, 2023
d6bf83c
changes
Jul 27, 2023
7bc8e81
Merge pull request #882 from TransformerOptimus/prompt-fix
Jul 27, 2023
5085269
changes
Jul 27, 2023
129e00d
args fix in dalle
Jul 27, 2023
4672c07
bug fix
luciferlinx101 Jul 27, 2023
79928cb
Merge pull request #884 from TransformerOptimus/prompt-fix
Tarraann Jul 27, 2023
2fe3f0d
Merge remote-tracking branch 'origin/dev' into dalle_args_fix
Jul 27, 2023
1de727f
minor change
Jul 27, 2023
e440d63
Merge pull request #883 from TransformerOptimus/dalle_args_fix
Tarraann Jul 27, 2023
d80920e
Merge pull request #881 from TransformerOptimus/http_knowledge
Tarraann Jul 27, 2023
edec2f5
minor changes
namansleeps2 Jul 27, 2023
6a0df87
Merge pull request #885 from TransformerOptimus/knowledge_changes
Tarraann Jul 27, 2023
b901801
fixes (#886)
Tarraann Jul 27, 2023
98312be
the user will now be unable to select striked knowledges
namansleeps2 Jul 27, 2023
a1f2abe
minor fix
namansleeps2 Jul 27, 2023
bb27d3f
Merge pull request #888 from TransformerOptimus/minor_changes_launch
namansleeps Jul 27, 2023
a16526d
Fix for agent details - not fetching data
Jul 27, 2023
08d8ba1
minor change for details
Jul 27, 2023
7dfbe3a
Fixes
Jul 27, 2023
bb308fc
Merge pull request #889 from TransformerOptimus/agent_detail_fix
anisha1607 Jul 27, 2023
de12454
conflict resolved
luciferlinx101 Jul 27, 2023
d978a6a
Merge pull request #892 from TransformerOptimus/conflict-resolve-dev
nborthy Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Dev rebase (#858)
* Fix/agents delete (#795)

* fixing the send email attachement issue

* delete run label (#796)

* fix

* fixing schedule agent run

* Updated README.md

Provided Instructions for serper.dev API key creation and configuring it in the Toolkit Page

* Update README.md

Updated Image

* Update config_template.yaml

Modified Serp Configuration for SERPER

* Twitter and Google Oauth for Web (#808)

Co-authored-by: Tarraann <jot.taran15522@gmail.com>

* Updated DB settings (#805)

* document fix (#806)

* ui bug bash fixes

* ui bug bash fixes

* ui bug bash fixes

* ui bug bash fixes

* ui bug bash fixes

* ui bug bash fixes

* ui bug bash fixes

* ui bug bash fixes

* ui bug bash fixes

* ui bug bash fixes

* ui bug bash fixes

* Bugs fixes new (#809)

* csv file fix (#810)

* ui bug bash fixes

* ui bug bash fixes

* Bugs new (#814)

* Fixes (#815)

Co-authored-by: Tarraann <jot.taran15522@gmail.com>

* ui bug bash fixes

* ui bug bash fixes

* Handling the rate limit exception

* fixed add_to_vector_store_and_create_summary (#827)

* fix 97971622 (#824)

* Llm models fix (#829)

* removed unnecessary toolkits from marketplace

* Dalle fix (#825)

* ui bug bash fixes (#839)

* Fixing twitter creds

* fixing google oauth issues

* fixing google oauth issue

* fixess

* fixess

* fixess

* fixess (#854)

* Resource duplicate fix (#803)

* Supercoder Improve tool addition (#755)

* rebased

* Read file s3 fix (#823)

* Updated

* Read from s3 works

* Read from s3 works

* Minor Updates

* Added Unit Tests

* Updated Tests

* Updated Tests

* Refactored

* Updated Test

* Updated Test

* Updated Test

* Edit agent templates fix (#838)

* ui bug bash fixes

* ui bug bash fixes

* ui bug bash fixes

* rebased

* first commit

* instagram APIs implemented and AI generated caption utility added

* Image upload to S3 and URL generation added

* added upload to s3 instagram bucket

* Refactored code

* removed jpeg files used for testing

* fixed recurring run issues

* fixed recurring issues

* Readme added

* instabot config folder deleted

* refactored code

* Handled the case where stable diffusion generated multiple photos

* docker compose.yaml version reverted to original

* removed the utility to add stable diffusion automatically

* added test cases and modified readme

* Added instagram tool bucket entry in config_template.yaml

* added instagram tool bucket entry in config template

---------

Co-authored-by: I’m <133493246+TransformerOptimus@users.noreply.github.com>
Co-authored-by: TransformerOptimus <muknrq@gmail.com>
Co-authored-by: Phoenix2809 <133874957+Phoenix2809@users.noreply.github.com>
Co-authored-by: Taran <97586318+Tarraann@users.noreply.github.com>
Co-authored-by: Tarraann <jot.taran15522@gmail.com>
Co-authored-by: luciferlinx <129729795+luciferlinx101@users.noreply.github.com>
Co-authored-by: Fluder-Paradyne <121793617+Fluder-Paradyne@users.noreply.github.com>
Co-authored-by: Kalki <parth.pathak@science.christuniversity.in>
Co-authored-by: Kalki <97698934+jedan2506@users.noreply.github.com>
Co-authored-by: GeekyBaller <43145646+neelayan7@users.noreply.github.com>
Co-authored-by: Nishant Borthakur <101320057+nborthy@users.noreply.github.com>
Co-authored-by: NishantBorthakur <nist.16br@gmail.com>
Co-authored-by: Autocop-Agent <129729746+Autocop-Agent@users.noreply.github.com>
Co-authored-by: Anisha Gupta <60440541+anisha1607@users.noreply.github.com>
Co-authored-by: Maverick-F35 <maverickcode.f35@gmail.com>
  • Loading branch information
16 people authored Jul 25, 2023
commit 4b202babf8db14600ed39742518a7f290fad0610
6 changes: 3 additions & 3 deletions config_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ WEAVIATE_USE_EMBEDDED: true
GOOGLE_API_KEY: YOUR_GOOGLE_API_KEY
SEARCH_ENGINE_ID: YOUR_SEARCH_ENIGNE_ID

# IF YOU DONT HAVE GOOGLE SEARCH KEY, USE THIS
SERP_API_KEY: YOUR_SERP_API_KEY
# IF YOU DONT HAVE GOOGLE SEARCH KEY, YOU CAN USE SERPER.DEV KEYS
SERP_API_KEY: YOUR_SERPER_API_KEY

#ENTER YOUR EMAIL CREDENTIALS TO ACCESS EMAIL TOOL
EMAIL_ADDRESS: YOUR_EMAIL_ADDRESS
Expand Down Expand Up @@ -118,4 +118,4 @@ ENGINE_ID: "stable-diffusion-xl-beta-v2-2-2"

## To use Qdrant for vector store
#QDRANT_HOST_NAME: YOUR_QDRANT_HOST_NAME
#QDRANT_PORT: YOUR_QDRANT_PORT
#QDRANT_PORT: YOUR_QDRANT_PORT
14 changes: 6 additions & 8 deletions gui/pages/Content/Agents/ActivityFeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat
}, [runStatus])

function fetchFeeds() {
console.log("In")
setIsLoading(true);
console.log(isLoading)
getExecutionFeeds(selectedRunId)
if (selectedRunId !== null) {
setIsLoading(true);
getExecutionFeeds(selectedRunId)
.then((response) => {
const data = response.data;
setFeeds(data.feeds);
Expand All @@ -90,6 +89,7 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat
console.error('Error fetching execution feeds:', error);
setIsLoading(false); // and this line
});
}
}

useEffect(() => {
Expand Down Expand Up @@ -166,12 +166,10 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat
}
{feeds.length < 1 && !agent?.is_running && !agent?.is_scheduled ?
(isLoading ?
<div style={{display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100vh'}}>
<div style={{display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100vh'}}>
<ClipLoader/>
</div>
: <div style={{color: 'white', fontSize: '14px', display: 'flex', flexDirection: 'column', alignItems: 'center', textAlign: 'center', width: '100%'}}>
The Agent is not scheduled
</div>): null
: <div style={{color: 'white', fontSize: '14px', display: 'flex', flexDirection: 'column', alignItems: 'center', textAlign: 'center', width: '100%'}}>The Agent is not scheduled</div>): null
}
</div>
{feedContainerRef.current && feedContainerRef.current.scrollTop >= 1200 &&
Expand Down
73 changes: 31 additions & 42 deletions gui/pages/Content/Agents/AgentCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
editAgentTemplate,
fetchAgentTemplateConfigLocal,
getOrganisationConfig,
getLlmModels,
updateExecution,
uploadFile
} from "@/pages/api/DashboardService";
Expand All @@ -16,22 +17,13 @@ import {
openNewTab,
removeTab,
setLocalStorageValue,
setLocalStorageArray, returnResourceIcon, getUserTimezone, createInternalId, preventDefault
setLocalStorageArray, returnResourceIcon, getUserTimezone, createInternalId,preventDefault,excludedToolkits
} from "@/utils/utils";
import {EventBus} from "@/utils/eventBus";
import 'moment-timezone';
import AgentSchedule from "@/pages/Content/Agents/AgentSchedule";

export default function AgentCreate({
sendAgentData,
selectedProjectId,
fetchAgents,
toolkits,
organisationId,
template,
internalId
}) {

export default function AgentCreate({sendAgentData, selectedProjectId, fetchAgents, toolkits, organisationId, template, internalId, env}) {
const [advancedOptions, setAdvancedOptions] = useState(false);
const [agentName, setAgentName] = useState("");
const [agentTemplateId, setAgentTemplateId] = useState(null);
Expand Down Expand Up @@ -59,8 +51,8 @@ export default function AgentCreate({
const [goals, setGoals] = useState(['Describe the agent goals here']);
const [instructions, setInstructions] = useState(['']);

const models = ['gpt-4', 'gpt-3.5-turbo', 'gpt-3.5-turbo-16k', 'gpt-4-32k', 'google-palm-bison-001']
const [model, setModel] = useState(models[1]);
const [modelsArray, setModelsArray] = useState([]);
const [model, setModel] = useState('');
const modelRef = useRef(null);
const [modelDropdown, setModelDropdown] = useState(false);

Expand Down Expand Up @@ -94,18 +86,12 @@ export default function AgentCreate({
const toolkitRef = useRef(null);
const [toolkitDropdown, setToolkitDropdown] = useState(false);

const excludedToolkits = ["Thinking Toolkit", "Human Input Toolkit", "Resource Toolkit"];
const [hasAPIkey, setHasAPIkey] = useState(false);

const [createDropdown, setCreateDropdown] = useState(false);
const [createModal, setCreateModal] = useState(false);

const [scheduleData, setScheduleData] = useState(null);
const [col6ScrollTop, setCol6ScrollTop] = useState(0);

const handleCol3Scroll = (event) => {
setCol6ScrollTop(event.target.scrollTop);
};

useEffect(() => {
getOrganisationConfig(organisationId, "model_api_key")
Expand Down Expand Up @@ -138,6 +124,21 @@ export default function AgentCreate({
}, [toolNames]);

useEffect(() => {
getLlmModels()
.then((response) => {
const models = response.data || [];
const selected_model = localStorage.getItem("agent_model_" + String(internalId)) || '';
setModelsArray(models);
if(models.length > 0 && !selected_model) {
setLocalStorageValue("agent_model_" + String(internalId), models[0], setModel);
} else {
setModel(selected_model);
}
})
.catch((error) => {
console.error('Error fetching models:', error);
});

if (template !== null) {
setLocalStorageValue("agent_name_" + String(internalId), template.name, setAgentName);
setLocalStorageValue("agent_description_" + String(internalId), template.description, setAgentDescription);
Expand Down Expand Up @@ -266,8 +267,8 @@ export default function AgentCreate({
};

const handleModelSelect = (index) => {
setLocalStorageValue("agent_model_" + String(internalId), models[index], setModel);
if (models[index] === "google-palm-bison-001") {
setLocalStorageValue("agent_model_" + String(internalId), modelsArray[index], setModel);
if (modelsArray[index] === "google-palm-bison-001") {
setAgentType("Fixed Task Queue")
}
setModelDropdown(false);
Expand Down Expand Up @@ -392,6 +393,10 @@ export default function AgentCreate({
toast.error("Add atleast one tool", {autoClose: 1800});
return false;
}
if(!modelsArray.includes(model)) {
toast.error("Your key does not have access to the selected model", {autoClose: 1800});
return false;
}
return true;
}

Expand Down Expand Up @@ -716,7 +721,7 @@ export default function AgentCreate({

return (<>
<div className="row" style={{overflowY: 'scroll', height: 'calc(100vh - 92px)'}}>
<div className="col-3" onScroll={handleCol3Scroll}></div>
<div className="col-3"></div>
<div className="col-6" style={{padding: '25px 20px'}}>
<div>
<div className={styles.page_title}>Create new agent</div>
Expand Down Expand Up @@ -787,7 +792,7 @@ export default function AgentCreate({
</div>
<div>
{modelDropdown && <div className="custom_select_options" ref={modelRef} style={{width: '100%'}}>
{models.map((model, index) => (
{modelsArray?.map((model, index) => (
<div key={index} className="custom_select_option" onClick={() => handleModelSelect(index)}
style={{padding: '12px 14px', maxWidth: '100%'}}>
{model}
Expand Down Expand Up @@ -826,7 +831,7 @@ export default function AgentCreate({
{toolkitDropdown && <div className="custom_select_options" ref={toolkitRef} style={{width: '100%'}}>
{toolkitList && toolkitList.filter((toolkit) => toolkit.tools ? toolkit.tools.some((tool) => tool.name.toLowerCase().includes(searchValue.toLowerCase())) : false).map((toolkit, index) => (
<div key={index}>
{toolkit.name !== null && !excludedToolkits.includes(toolkit.name) && <div>
{toolkit.name !== null && !excludedToolkits().includes(toolkit.name) && <div>
<div onClick={() => addToolkit(toolkit)} className="custom_select_option" style={{
padding: '10px 14px',
maxWidth: '100%',
Expand Down Expand Up @@ -1055,23 +1060,7 @@ export default function AgentCreate({
</button>
)}
<div style={{display: 'flex', position: 'relative'}}>
{createDropdown && (<div className="custom_select_option" style={{
background: '#3B3B49',
borderRadius: '8px',
position: 'absolute',
top: '-40px',
right: '0',
zIndex: '1',
boxShadow: '0 2px 7px rgba(0,0,0,.4), 0 0 2px rgba(0,0,0,.22)',
height: '40px',
width: '150px',
paddingTop: '10px',
textAlign: 'center'
}}
onClick={() => {
setCreateModal(true);
setCreateDropdown(false);
}}>Create & Schedule Run
{createDropdown && (<div className="create_agent_dropdown_options" onClick={() => {setCreateModal(true);setCreateDropdown(false);}}>Create & Schedule Run
</div>)}
<div className="primary_button"
style={{backgroundColor: 'white', marginBottom: '4px', paddingLeft: '0', paddingRight: '5px'}}>
Expand All @@ -1088,7 +1077,7 @@ export default function AgentCreate({
</div>

{createModal && (
<AgentSchedule internalId={internalId} closeCreateModal={closeCreateModal} type="create_agent"/>
<AgentSchedule env={env} internalId={internalId} closeCreateModal={closeCreateModal} type="create_agent"/>
)}

</div>
Expand Down
11 changes: 2 additions & 9 deletions gui/pages/Content/Agents/AgentSchedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,14 @@ import {agentScheduleComponent, createAndScheduleRun, updateSchedule} from "@/pa
import {EventBus} from "@/utils/eventBus";
import moment from 'moment';

export default function AgentSchedule({
internalId,
closeCreateModal,
type,
agentId,
setCreateModal,
setCreateEditModal
}) {
export default function AgentSchedule({internalId, closeCreateModal, type, agentId, setCreateModal, setCreateEditModal, env}) {
const [isRecurring, setIsRecurring] = useState(false);
const [timeDropdown, setTimeDropdown] = useState(false);
const [expiryDropdown, setExpiryDropdown] = useState(false);

const [startTime, setStartTime] = useState('');

const timeUnitArray = ['Days', 'Hours', 'Minutes'];
const timeUnitArray = (env === 'PROD') ? ['Days', 'Hours'] : ['Days', 'Hours', 'Minutes'];
const [timeUnit, setTimeUnit] = useState(timeUnitArray[1]);
const [timeValue, setTimeValue] = useState(null);

Expand Down
11 changes: 2 additions & 9 deletions gui/pages/Content/Agents/AgentTemplatesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@ import {fetchAgentTemplateListLocal} from "@/pages/api/DashboardService";
import AgentCreate from "@/pages/Content/Agents/AgentCreate";
import {setLocalStorageValue, openNewTab} from "@/utils/utils";

export default function AgentTemplatesList({
sendAgentData,
selectedProjectId,
fetchAgents,
toolkits,
organisationId,
internalId
}) {
export default function AgentTemplatesList({sendAgentData, selectedProjectId, fetchAgents, toolkits, organisationId, internalId, env}) {
const [agentTemplates, setAgentTemplates] = useState([])
const [createAgentClicked, setCreateAgentClicked] = useState(false)
const [sendTemplate, setSendTemplate] = useState(null)
Expand Down Expand Up @@ -112,7 +105,7 @@ export default function AgentTemplatesList({
</div>
</div> : <AgentCreate internalId={internalId} organisationId={organisationId} sendAgentData={sendAgentData}
selectedProjectId={selectedProjectId} fetchAgents={fetchAgents} toolkits={toolkits}
template={sendTemplate}/>}
template={sendTemplate} env={env} />}
</div>
)
};
14 changes: 7 additions & 7 deletions gui/pages/Content/Agents/AgentWorkspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {EventBus} from "@/utils/eventBus";
import 'moment-timezone';
import AgentSchedule from "@/pages/Content/Agents/AgentSchedule";

export default function AgentWorkspace({agentId, agentName, selectedView, agents, internalId}) {
export default function AgentWorkspace({env, agentId, agentName, selectedView, agents, internalId}) {
const [leftPanel, setLeftPanel] = useState('activity_feed')
const [rightPanel, setRightPanel] = useState('')
const [history, setHistory] = useState(true)
Expand Down Expand Up @@ -235,7 +235,7 @@ export default function AgentWorkspace({agentId, agentName, selectedView, agents
}

function fetchAgentScheduleComponent() {
if (agent.is_scheduled) {
if (agent?.is_scheduled) {
getDateTime(agentId)
.then((response) => {
setAgentScheduleDetails(response.data)
Expand Down Expand Up @@ -365,9 +365,9 @@ export default function AgentWorkspace({agentId, agentName, selectedView, agents
}}>Resume</li>}
{agentExecutions && agentExecutions.length > 1 && <li className="dropdown_item" onClick={() => {
updateRunStatus("TERMINATED")
}}>Delete</li>}
}}>Delete Run</li>}

{agent && agent.is_scheduled ? (<div>
{agent?.is_scheduled ? (<div>
<li className="dropdown_item" onClick={handleEditScheduleClick}>Edit Schedule</li>
<li className="dropdown_item" onClick={handleStopScheduleClick}>Stop Schedule</li>
</div>) : (<div>
Expand All @@ -379,10 +379,10 @@ export default function AgentWorkspace({agentId, agentName, selectedView, agents
</div>}

{createModal &&
<AgentSchedule internalId={internalId} closeCreateModal={closeCreateModal} type="schedule_agent"
<AgentSchedule env={env} internalId={internalId} closeCreateModal={closeCreateModal} type="schedule_agent"
agentId={agentId} setCreateModal={() => setCreateModal(false)}/>}
{createEditModal &&
<AgentSchedule internalId={internalId} closeCreateModal={closeCreateModal} type="edit_schedule_agent"
<AgentSchedule env={env} internalId={internalId} closeCreateModal={closeCreateModal} type="edit_schedule_agent"
agentId={agentId} setCreateEditModal={() => setCreateEditModal(false)}/>}
{createStopModal && (
<div className="modal" onClick={closeCreateModal}>
Expand All @@ -406,7 +406,7 @@ export default function AgentWorkspace({agentId, agentName, selectedView, agents
</div>
<div className={styles.detail_body}>
{leftPanel === 'activity_feed' && <div className={styles.detail_content}>
<ActivityFeed selectedView={selectedView} selectedRunId={selectedRun?.id || 0}
<ActivityFeed selectedView={selectedView} selectedRunId={selectedRun?.id || null}
setFetchedData={setFetchedData} agent={agent}/>
</div>}
{leftPanel === 'agent_type' &&
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Content/Agents/Agents.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function Agents({sendAgentData, agents}) {
src="/images/loading.gif" alt="active-icon"/></div>}
<div style={{display: 'flex', height: '15px'}}>
<div className={styles.text_block}><span className={styles.agent_text}>{agent.name}</span></div>
{agent.is_scheduled &&
{agent?.is_scheduled &&
<div style={{marginLeft: '8px'}}><Image style={{paddingBottom: '12px'}} width={20} height={28}
src="/images/event_repeat.svg" alt="check-icon"/></div>}
</div>
Expand Down
4 changes: 2 additions & 2 deletions gui/pages/Content/Agents/Details.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function Details({agentDetails, runCount, goals, instructions, ag
}, [instructions]);

useEffect(() => {
if (agent.is_scheduled) {
if (agent?.is_scheduled) {
if (agentScheduleDetails?.recurrence_interval !== null) {
if ((agentScheduleDetails?.expiry_runs === -1 || agentScheduleDetails?.expiry_runs == null) && agentScheduleDetails?.expiry_date !== null) {
let expiryDate;
Expand Down Expand Up @@ -182,7 +182,7 @@ export default function Details({agentDetails, runCount, goals, instructions, ag
<div><Image width={15} height={15} src="/images/info.svg" alt="info-icon"/></div>
<div style={info_text}>Stop after {agentDetails.max_iterations} iterations</div>
</div>}
{agent.is_scheduled && <div className={styles.agent_info_box}>
{agent?.is_scheduled && <div className={styles.agent_info_box}>
<div><Image width={15} height={15} src="/images/event_repeat.svg" alt="info-icon"/></div>
<div style={info_text}>{scheduleText}</div>
</div>}
Expand Down
Loading