Skip to content

Commit

Permalink
Merge pull request #66 from polywrap/nerfzael-evo-fixes
Browse files Browse the repository at this point in the history
Fixed upload and goal
  • Loading branch information
dOrgJelli authored Aug 21, 2023
2 parents 03f24dc + 1a2c8b5 commit 02fca90
Show file tree
Hide file tree
Showing 3 changed files with 535 additions and 14 deletions.
3 changes: 2 additions & 1 deletion apps/browser/src/components/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const Chat: React.FC<ChatProps> = ({ evo, onMessage, messages }: ChatProps) => {

// Create a new iteration thread
if (!evoItr) {
setEvoItr(evo.run(message));
const goal = messages.filter((msg) => msg.user === "user")[0].text;
setEvoItr(evo.run(goal));
return Promise.resolve();
}

Expand Down
9 changes: 1 addition & 8 deletions apps/browser/src/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ export interface SidebarProps {
}

const Sidebar = ({ onSettingsClick, scripts, userFiles, uploadUserFiles }: SidebarProps) => {
const [files, setFiles] = React.useState<InMemoryFile[]>([]);
const [uploadedFiles, setUploadedFiles] = React.useState<InMemoryFile[]>([]);

useEffect(() => {
setFiles((old) => [...old, ...uploadedFiles]);
}, [uploadedFiles]);

return (
<div className="Sidebar">
<div className="Content">
Expand All @@ -44,7 +37,7 @@ const Sidebar = ({ onSettingsClick, scripts, userFiles, uploadUserFiles }: Sideb
<h3>
<FontAwesomeIcon icon={faFolder} style={{ marginRight: "10px" }} /> WORKSPACE
</h3>
{files.map((file, i) => (
{userFiles.map((file, i) => (
<File file={file} />
))}
</Upload>
Expand Down
Loading

0 comments on commit 02fca90

Please sign in to comment.