diff --git a/web/src/app/admin/assistants/AssistantEditor.tsx b/web/src/app/admin/assistants/AssistantEditor.tsx index 5ff57470ba5..0b26a63402f 100644 --- a/web/src/app/admin/assistants/AssistantEditor.tsx +++ b/web/src/app/admin/assistants/AssistantEditor.tsx @@ -47,6 +47,7 @@ import { useToast } from "@/hooks/use-toast"; import { Label } from "@/components/ui/label"; import { CustomTooltip } from "@/components/CustomTooltip"; import { Divider } from "@/components/Divider"; +import { Combobox } from "@/components/Combobox"; function findSearchTool(tools: ToolSnapshot[]) { return tools.find((tool) => tool.in_code_tool_id === "SearchTool"); @@ -871,45 +872,26 @@ export function AssistantEditor({ teamspaces.length > 0 && !values.is_public && (
-

+

Select which Teamspaces should have access to this Assistant. -

-
- {teamspaces.map((teamspace) => { - const isSelected = values.groups.includes( - teamspace.id - ); - return ( - { - if (isSelected) { - setFieldValue( - "groups", - values.groups.filter( - (id) => id !== teamspace.id - ) - ); - } else { - setFieldValue("groups", [ - ...values.groups, - teamspace.id, - ]); - } - }} - > -
- -
- {teamspace.name} -
-
-
- ); - })} -
+

+ + ({ + value: teamspace.id.toString(), + label: teamspace.name, + }))} + onSelect={(selectedTeamspaceIds) => { + const selectedIds = + selectedTeamspaceIds.map((val) => + parseInt(val, 10) + ); + setFieldValue("groups", selectedIds); + }} + placeholder="Select teamspaces" + label="Teamspaces" + />
)} diff --git a/web/src/app/admin/documents/sets/DocumentSetCreationForm.tsx b/web/src/app/admin/documents/sets/DocumentSetCreationForm.tsx index 3bf385611b5..8a57d2090d2 100644 --- a/web/src/app/admin/documents/sets/DocumentSetCreationForm.tsx +++ b/web/src/app/admin/documents/sets/DocumentSetCreationForm.tsx @@ -17,6 +17,7 @@ import { useState } from "react"; import { Input } from "@/components/ui/input"; import { Users } from "lucide-react"; import { Divider } from "@/components/Divider"; +import { Combobox } from "@/components/Combobox"; interface SetCreationPopupProps { ccPairs: ConnectorIndexingStatus[]; @@ -42,6 +43,11 @@ export const DocumentSetCreationForm = ({ ccPair.name!.toLowerCase().includes(searchTerm.toLowerCase()) ); + const connectorItems = filteredCcPairs.map((ccPair) => ({ + value: ccPair.cc_pair_id.toString(), + label: ccPair.name || `Connector ${ccPair.cc_pair_id}`, + })); + return (
- {({ isSubmitting, values }) => ( + {({ isSubmitting, values, setFieldValue }) => (

Pick your connectors:

-

- All documents indexed by the selected connectors will be a part - of this document set. -

- setSearchTerm(e.target.value)} - /> - - ( -
- {filteredCcPairs.map((ccPair) => { - const ind = values.cc_pair_ids.indexOf(ccPair.cc_pair_id); - const isSelected = ind !== -1; - - return ( - { - if (isSelected) { - arrayHelpers.remove(ind); - } else { - arrayHelpers.push(ccPair.cc_pair_id); - } - }} - > -
- -
-
- ); - })} -
- )} + { + const selectedIds = selectedValues.map((val) => + parseInt(val, 10) + ); + setFieldValue("cc_pair_ids", selectedIds); + }} + placeholder="Search connectors" + label="Select connectors" />
diff --git a/web/src/app/admin/documents/sets/page.tsx b/web/src/app/admin/documents/sets/page.tsx index 041d656548a..6b3a9dde22e 100644 --- a/web/src/app/admin/documents/sets/page.tsx +++ b/web/src/app/admin/documents/sets/page.tsx @@ -61,9 +61,9 @@ const EditRow = ({ documentSet }: { documentSet: DocumentSet }) => { } asChild > -
- Cannot update while syncing! Wait for the sync to finish, - then try again. +
+ Cannot update while + syncing! Wait for the sync to finish, then try again.
diff --git a/web/src/app/ee/admin/teams/TeamspaceSidebarContent.tsx b/web/src/app/ee/admin/teams/TeamspaceSidebarContent.tsx index cc0ff06881b..70d2f27666e 100644 --- a/web/src/app/ee/admin/teams/TeamspaceSidebarContent.tsx +++ b/web/src/app/ee/admin/teams/TeamspaceSidebarContent.tsx @@ -51,7 +51,7 @@ export const TeamspaceSidebarContent = ({ ? `${tokenRate.token_budget} Token Rate` : "No Token Rate"} -

+

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Perferendis omnis nesciunt est saepe sequi nam cum ratione aspernatur reprehenderit, ducimus illo eveniet et quidem itaque diff --git a/web/src/app/globals.css b/web/src/app/globals.css index 98ac2e3d4df..aa2e4752448 100644 --- a/web/src/app/globals.css +++ b/web/src/app/globals.css @@ -119,5 +119,5 @@ h3 { } .container { - @apply mx-auto max-w-[1400px] px-6 lg:px-14 xl:px-10 2xl:px-24 py-24 md:py-32 lg:pt-16; + @apply mx-auto max-w-[1400px] px-6 lg:px-14 xl:px-10 2xl:px-24 py-24 md:py-32 lg:pt-16 bg-background; } diff --git a/web/src/components/Combobox.tsx b/web/src/components/Combobox.tsx index 80957fe5f61..c063be015b7 100644 --- a/web/src/components/Combobox.tsx +++ b/web/src/components/Combobox.tsx @@ -71,7 +71,7 @@ export function Combobox({ variant="outline" role="combobox" aria-expanded={open} - className="w-full justify-between" + className="w-full justify-between text-subtle border border-input" > {selectedItems.length > 0 ? `${selectedItems.length} selected` diff --git a/web/src/components/ui/badge.tsx b/web/src/components/ui/badge.tsx index 3d0a0fd8585..b680b4b4615 100644 --- a/web/src/components/ui/badge.tsx +++ b/web/src/components/ui/badge.tsx @@ -9,7 +9,7 @@ const badgeVariants = cva( variants: { variant: { default: "border-transparent bg-primary text-inverted", - secondary: "border-transparent bg-secondary text-secondary-foreground", + secondary: "border-transparent bg-secondary text-default", warning: "border-transparent bg-warning", destructive: "border-transparent bg-destructive text-dark-900", outline: "text-foreground", diff --git a/web/tsconfig.json b/web/tsconfig.json index 8f385e0dec5..247454fb4b0 100644 --- a/web/tsconfig.json +++ b/web/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -16,7 +12,7 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "preserve", + "jsx": "react-jsx", "incremental": true, "plugins": [ { @@ -24,9 +20,7 @@ } ], "paths": { - "@/*": [ - "./src/*" - ] + "@/*": ["./src/*"] } }, "include": [ @@ -36,7 +30,5 @@ ".next/types/**/*.ts", "tailwind-themes/tailwind.config.ts" ], - "exclude": [ - "node_modules" - ] + "exclude": ["node_modules"] }