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

feat: implement agent global state #400

Merged
merged 29 commits into from
Apr 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6b35326
implement zustand for messages
Jshen123 Apr 23, 2023
4e36a48
implement live task status update in task window
Jshen123 Apr 24, 2023
a0b199d
resolve merge conflicts
Jshen123 Apr 24, 2023
f7dcc73
revert unintended changes
Jshen123 Apr 24, 2023
2855687
revert unintended changes
Jshen123 Apr 24, 2023
7d8f9ab
updated task states
Jshen123 Apr 25, 2023
30e77ff
remove isAction check
Jshen123 Apr 25, 2023
a280460
resolve merge conflicts
Jshen123 Apr 25, 2023
8da0cb1
fix issues
Jshen123 Apr 25, 2023
acd105d
remove green text color for completed and final tasks
Jshen123 Apr 25, 2023
f2e082e
resolve merge conflicts
Jshen123 Apr 26, 2023
d70d817
resolve merge conflicts
Jshen123 Apr 26, 2023
1561d2e
Empty-Commit
Jshen123 Apr 26, 2023
05687e3
update AgentTask to include status field
Jshen123 Apr 26, 2023
b6facf6
update agentRouter
Jshen123 Apr 26, 2023
ff5a11a
resolve merge conflicts
Jshen123 Apr 26, 2023
50a384f
fix saved message rendering error
Jshen123 Apr 26, 2023
bd84241
fix saved message rendering error
Jshen123 Apr 26, 2023
77d6a8b
implement agentStore
Jshen123 Apr 28, 2023
e16933b
Revert "fix saved message rendering error"
Jshen123 Apr 28, 2023
444b1c1
Revert "fix saved message rendering error"
Jshen123 Apr 28, 2023
e418eab
clean up comments
Jshen123 Apr 28, 2023
6a73ad1
remove changes from other PR
Jshen123 Apr 28, 2023
0402392
change directory from store to stores
Jshen123 Apr 28, 2023
3d14b53
Merge branch 'main' of https://github.com/reworkd/AgentGPT into feat/…
Jshen123 Apr 28, 2023
39886c6
Merge branch 'main' of https://github.com/reworkd/AgentGPT into feat/…
Jshen123 Apr 29, 2023
6c58802
remove redundant code
Jshen123 Apr 29, 2023
fb15157
rename setIsAgentStopped
Jshen123 Apr 29, 2023
a832040
refactor: remove agentStatusSchema
Jshen123 Apr 29, 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
1 change: 0 additions & 1 deletion src/components/stores/agentStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const createAgentSlice: StateCreator<AgentSlice> = (set, get) => {
}));
},
setAgent: (newAgent) => {
console.log("newAgent: ", newAgent);
set(() => ({
agent: newAgent,
}));
Expand Down
2 changes: 0 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const Home: NextPage = () => {
const [name, setName] = React.useState<string>("");
const [goalInput, setGoalInput] = React.useState<string>("");
const settingsModel = useSettings();
// const [shouldAgentStop, setShouldAgentStop] = React.useState(false);

const [showHelpDialog, setShowHelpDialog] = React.useState(false);
const [showSettingsDialog, setShowSettingsDialog] = React.useState(false);
Expand Down Expand Up @@ -115,7 +114,6 @@ const Home: NextPage = () => {

const handleStopAgent = () => {
agent?.stopAgent();
setIsAgentStopped();
Copy link
Contributor Author

@Jshen123 Jshen123 Apr 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asim-shrestha removed setIsAgentStopped() since there is already a useEffect hook that update IsAgentStopped whenever agent is removed

useEffect(() => {
setIsAgentStopped();
}, [agent, setIsAgentStopped]);

};

const proTitle = (
Expand Down