From c74ba35023ac2f7fd11745a629a28f66b8f0fe17 Mon Sep 17 00:00:00 2001 From: timothycarambat Date: Wed, 12 Jun 2024 09:36:35 -0700 Subject: [PATCH 01/46] fix readme typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bc3e9fdd8..8039d69a0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@

AnythingLLM: The all-in-one AI app you were looking for.
- Chat with your docs, use AI Agents, hyper-configurable, multi-user, & no fustrating set up required. + Chat with your docs, use AI Agents, hyper-configurable, multi-user, & no frustrating set up required.

From 9c3014de703ad8e1e8c34e4d66ad6a5caf2241ad Mon Sep 17 00:00:00 2001 From: Sean Hatfield Date: Wed, 12 Jun 2024 10:52:32 -0700 Subject: [PATCH 02/46] [FEAT] Agent skills UI redesign (#1565) * WIP agent settings redesign * WIP rework new agent skill UI * WIP save bar/agent styles * WIP update settings fix * desktop agent config UI implementation * remove unneeded files * fix sql and web browsing plugins not starting & add default badges * fix serply merge conflict * review: cleanup unused files/folders/components * refactor components * refactor components * fix order of customized skills --------- Co-authored-by: timothycarambat --- frontend/jsconfig.json | 6 +- frontend/src/App.jsx | 5 + .../components/ContextualSaveBar/index.jsx | 32 +++ .../src/components/SettingsSidebar/index.jsx | 10 + frontend/src/media/agents/generate-charts.png | Bin 0 -> 173315 bytes .../src/media/agents/generate-save-files.png | Bin 0 -> 176165 bytes frontend/src/media/agents/rag-memory.png | Bin 0 -> 174685 bytes frontend/src/media/agents/scrape-websites.png | Bin 0 -> 175137 bytes frontend/src/media/agents/sql-agent.png | Bin 0 -> 175546 bytes frontend/src/media/agents/view-summarize.png | Bin 0 -> 174253 bytes .../src/pages/Admin/Agents/Badges/default.jsx | 25 ++ .../Admin/Agents/DefaultSkillPanel/index.jsx | 29 +++ .../Agents/GenericSkillPanel}/index.jsx | 24 +- .../SQLConnectorSelection/DBConnection.jsx | 0 .../NewConnectionModal.jsx | 4 +- .../SQLConnectorSelection/icons/mssql.png | Bin .../SQLConnectorSelection/icons/mysql.png | Bin .../icons/postgresql.png | Bin .../Agents/SQLConnectorSelection/index.jsx | 117 +++++++++ .../SearchProviderItem/index.jsx | 0 .../SearchProviderOptions/index.jsx | 0 .../Agents}/WebSearchSelection/icons/bing.png | Bin .../WebSearchSelection/icons/google.png | Bin .../WebSearchSelection/icons/serper.png | Bin .../WebSearchSelection/icons/serply.png | Bin .../Admin/Agents/WebSearchSelection/index.jsx | 227 +++++++++++++++++ frontend/src/pages/Admin/Agents/index.jsx | 232 ++++++++++++++++++ frontend/src/pages/Admin/Agents/skills.js | 73 ++++++ .../SQLConnectorSelection/index.jsx | 111 --------- .../AgentConfig/WebSearchSelection/index.jsx | 214 ---------------- .../WorkspaceSettings/AgentConfig/index.jsx | 121 ++------- frontend/src/utils/paths.js | 3 + server/endpoints/admin.js | 6 +- 33 files changed, 800 insertions(+), 439 deletions(-) create mode 100644 frontend/src/components/ContextualSaveBar/index.jsx create mode 100644 frontend/src/media/agents/generate-charts.png create mode 100644 frontend/src/media/agents/generate-save-files.png create mode 100644 frontend/src/media/agents/rag-memory.png create mode 100644 frontend/src/media/agents/scrape-websites.png create mode 100644 frontend/src/media/agents/sql-agent.png create mode 100644 frontend/src/media/agents/view-summarize.png create mode 100644 frontend/src/pages/Admin/Agents/Badges/default.jsx create mode 100644 frontend/src/pages/Admin/Agents/DefaultSkillPanel/index.jsx rename frontend/src/pages/{WorkspaceSettings/AgentConfig/GenericSkill => Admin/Agents/GenericSkillPanel}/index.jsx (69%) rename frontend/src/pages/{WorkspaceSettings/AgentConfig => Admin/Agents}/SQLConnectorSelection/DBConnection.jsx (100%) rename frontend/src/pages/{WorkspaceSettings/AgentConfig => Admin/Agents}/SQLConnectorSelection/NewConnectionModal.jsx (98%) rename frontend/src/pages/{WorkspaceSettings/AgentConfig => Admin/Agents}/SQLConnectorSelection/icons/mssql.png (100%) rename frontend/src/pages/{WorkspaceSettings/AgentConfig => Admin/Agents}/SQLConnectorSelection/icons/mysql.png (100%) rename frontend/src/pages/{WorkspaceSettings/AgentConfig => Admin/Agents}/SQLConnectorSelection/icons/postgresql.png (100%) create mode 100644 frontend/src/pages/Admin/Agents/SQLConnectorSelection/index.jsx rename frontend/src/pages/{WorkspaceSettings/AgentConfig => Admin/Agents}/WebSearchSelection/SearchProviderItem/index.jsx (100%) rename frontend/src/pages/{WorkspaceSettings/AgentConfig => Admin/Agents}/WebSearchSelection/SearchProviderOptions/index.jsx (100%) rename frontend/src/pages/{WorkspaceSettings/AgentConfig => Admin/Agents}/WebSearchSelection/icons/bing.png (100%) rename frontend/src/pages/{WorkspaceSettings/AgentConfig => Admin/Agents}/WebSearchSelection/icons/google.png (100%) rename frontend/src/pages/{WorkspaceSettings/AgentConfig => Admin/Agents}/WebSearchSelection/icons/serper.png (100%) rename frontend/src/pages/{WorkspaceSettings/AgentConfig => Admin/Agents}/WebSearchSelection/icons/serply.png (100%) create mode 100644 frontend/src/pages/Admin/Agents/WebSearchSelection/index.jsx create mode 100644 frontend/src/pages/Admin/Agents/index.jsx create mode 100644 frontend/src/pages/Admin/Agents/skills.js delete mode 100644 frontend/src/pages/WorkspaceSettings/AgentConfig/SQLConnectorSelection/index.jsx delete mode 100644 frontend/src/pages/WorkspaceSettings/AgentConfig/WebSearchSelection/index.jsx diff --git a/frontend/jsconfig.json b/frontend/jsconfig.json index e21fc3764..4cc516706 100644 --- a/frontend/jsconfig.json +++ b/frontend/jsconfig.json @@ -4,7 +4,9 @@ "target": "esnext", "jsx": "react", "paths": { - "@/*": ["./src/*"] + "@/*": [ + "./src/*" + ] } } -} +} \ No newline at end of file diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index b29e6eea9..627b8341e 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -21,6 +21,7 @@ const AdminInvites = lazy(() => import("@/pages/Admin/Invitations")); const AdminWorkspaces = lazy(() => import("@/pages/Admin/Workspaces")); const AdminSystem = lazy(() => import("@/pages/Admin/System")); const AdminLogs = lazy(() => import("@/pages/Admin/Logging")); +const AdminAgents = lazy(() => import("@/pages/Admin/Agents")); const GeneralChats = lazy(() => import("@/pages/GeneralSettings/Chats")); const GeneralAppearance = lazy( () => import("@/pages/GeneralSettings/Appearance") @@ -106,6 +107,10 @@ export default function App() { path="/settings/vector-database" element={} /> + } + /> } diff --git a/frontend/src/components/ContextualSaveBar/index.jsx b/frontend/src/components/ContextualSaveBar/index.jsx new file mode 100644 index 000000000..056bf739b --- /dev/null +++ b/frontend/src/components/ContextualSaveBar/index.jsx @@ -0,0 +1,32 @@ +import { Warning } from "@phosphor-icons/react"; + +export default function ContextualSaveBar({ + showing = false, + onSave, + onCancel, +}) { + if (!showing) return null; + + return ( +

+
+ +

Unsaved Changes

+
+
+ + +
+
+ ); +} diff --git a/frontend/src/components/SettingsSidebar/index.jsx b/frontend/src/components/SettingsSidebar/index.jsx index 41fa60ea4..6049d83fb 100644 --- a/frontend/src/components/SettingsSidebar/index.jsx +++ b/frontend/src/components/SettingsSidebar/index.jsx @@ -22,6 +22,7 @@ import { EyeSlash, SplitVertical, Microphone, + Robot, } from "@phosphor-icons/react"; import useUser from "@/hooks/useUser"; import { USER_BACKGROUND_COLOR } from "@/utils/constants"; @@ -258,6 +259,15 @@ const SidebarOptions = ({ user = null }) => ( flex={true} allowedRole={["admin", "manager"]} /> + +