Skip to content

Commit

Permalink
functional
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx committed Feb 8, 2025
1 parent a0f7f2e commit 419ef32
Show file tree
Hide file tree
Showing 98 changed files with 490 additions and 275 deletions.
Binary file added web/public/logo-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/public/logotype-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions web/src/app/admin/add-connector/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ function SourceTile({
w-40
cursor-pointer
shadow-md
hover:bg-hover
${preSelect ? "bg-hover subtle-pulse" : "bg-hover-light"}
hover:bg-accent-background-hovered
${
preSelect
? "bg-accent-background-hovered subtle-pulse"
: "bg-accent-background"
}
`}
href={sourceMetadata.adminUrl}
>
Expand Down
6 changes: 3 additions & 3 deletions web/src/app/admin/api-key/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function NewApiKeyModal({
<div className="flex mt-2">
<b className="my-auto break-all">{apiKey}</b>
<div
className="ml-2 my-auto p-2 hover:bg-hover rounded cursor-pointer"
className="ml-2 my-auto p-2 hover:bg-accent-background-hovered rounded cursor-pointer"
onClick={() => {
setCopyClicked(true);
navigator.clipboard.writeText(apiKey);
Expand Down Expand Up @@ -179,7 +179,7 @@ function Main() {
flex
mb-1
w-fit
hover:bg-hover cursor-pointer
hover:bg-accent-background-hovered cursor-pointer
p-2
rounded-lg
border-border
Expand All @@ -203,7 +203,7 @@ function Main() {
flex
mb-1
w-fit
hover:bg-hover cursor-pointer
hover:bg-accent-background-hovered cursor-pointer
p-2
rounded-lg
border-border
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/admin/assistants/AssistantEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ export function AssistantEditor({
setFieldValue("label_ids", newLabelIds);
}}
itemComponent={({ option }) => (
<div className="flex items-center justify-between px-4 py-3 text-sm hover:bg-hover cursor-pointer border-b border-border last:border-b-0">
<div className="flex items-center justify-between px-4 py-3 text-sm hover:bg-accent-background-hovered cursor-pointer border-b border-border last:border-b-0">
<div
className="flex-grow"
onClick={() => {
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/admin/assistants/HidableSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function HidableSection({
return (
<div>
<div
className="flex hover:bg-hover-light rounded cursor-pointer p-2"
className="flex hover:bg-accent-background rounded cursor-pointer p-2"
onClick={() => setIsHidden(!isHidden)}
>
<SectionHeader includeMargin={false}>{sectionTitle}</SectionHeader>
Expand Down
6 changes: 4 additions & 2 deletions web/src/app/admin/assistants/PersonaTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ export function PersonasTable() {
}
}}
className={`px-1 py-0.5 rounded flex ${
isEditable ? "hover:bg-hover cursor-pointer" : ""
isEditable
? "hover:bg-accent-background-hovered cursor-pointer"
: ""
} select-none w-fit`}
>
<div className="my-auto w-12">
Expand All @@ -205,7 +207,7 @@ export function PersonasTable() {
<div className="mr-auto my-auto">
{!persona.builtin_persona && isEditable ? (
<div
className="hover:bg-hover rounded p-1 cursor-pointer"
className="hover:bg-accent-background-hovered rounded p-1 cursor-pointer"
onClick={() => openDeleteModal(persona)}
>
<TrashIcon />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function LLMProviderDisplay({
return (
<div>
{popup}
<div className="border border-border p-3 rounded w-96 flex shadow-md">
<div className="border border-border p-3 dark:bg-neutral-800 rounded w-96 flex shadow-md">
<div className="my-auto">
<div className="font-bold">{providerName} </div>
<div className="text-xs italic">({existingLlmProvider.provider})</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export function CustomLLMProviderUpdateForm({
</div>
<div className="my-auto">
<FiX
className="my-auto w-10 h-10 cursor-pointer hover:bg-hover rounded p-2"
className="my-auto w-10 h-10 cursor-pointer hover:bg-accent-background-hovered rounded p-2"
onClick={() => arrayHelpers.remove(index)}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/admin/configuration/llm/LLMConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function DefaultLLMProviderDisplay({
return (
<div>
{popup}
<div className="border border-border p-3 rounded w-96 flex shadow-md">
<div className="border border-border p-3 dark:bg-neutral-800 rounded w-96 flex shadow-md">
<div className="my-auto">
<div className="font-bold">{providerName} </div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion web/src/app/admin/configuration/llm/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
OpenSourceIcon,
AnthropicSVG,
IconProps,
OpenAIISVG,
} from "@/components/icons/icons";
import { FaRobot } from "react-icons/fa";

Expand Down Expand Up @@ -104,7 +105,7 @@ export const getProviderIcon = (providerName: string, modelName?: string) => {
switch (providerName) {
case "openai":
// Special cases for openai based on modelName
return modelNameToIcon(modelName || "", OpenAIIcon);
return modelNameToIcon(modelName || "", OpenAIISVG);
case "anthropic":
return AnthropicSVG;
case "bedrock":
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/admin/connector/[ccPairId]/ConfigDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function AdvancedConfigDisplay({
<>
<Title className="mt-8 mb-2">Advanced Configuration</Title>
<CardSection>
<ul className="w-full text-sm divide-y divide-background-200 dark:divide-background-700">
<ul className="w-full text-sm divide-y divide-neutral-200 dark:divide-neutral-700">
{pruneFreq && (
<li
key={0}
Expand Down
4 changes: 1 addition & 3 deletions web/src/app/admin/connectors/[connector]/NavigationRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ const NavigationRow = ({
</SquareNavigationButton>
)}
</div>

<div className="flex justify-center">
{(formStep > 0 || noCredentials) && (
<SquareNavigationButton
className="bg-accent text-white py-2.5 px-3.5 disabled:opacity-50"
className="bg-agent text-white py-2.5 px-3.5 disabled:opacity-50"
disabled={!isValid}
onClick={onSubmit}
>
Expand All @@ -63,7 +62,6 @@ const NavigationRow = ({
</SquareNavigationButton>
)}
</div>

<div className="flex justify-end">
{formStep === 0 && (
<SquareNavigationButton
Expand Down
4 changes: 2 additions & 2 deletions web/src/app/admin/documents/explorer/Explorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const DocumentDisplay = ({
</a>
</div>
<div className="flex flex-wrap gap-x-2 mt-1 text-xs">
<div className="px-1 py-0.5 bg-hover rounded flex">
<div className="px-1 py-0.5 bg-accent-background-hovered rounded flex">
<p className="mr-1 my-auto">Boost:</p>
<ScoreSection
documentId={document.document_id}
Expand All @@ -77,7 +77,7 @@ const DocumentDisplay = ({
});
}
}}
className="px-1 py-0.5 bg-hover hover:bg-hover-light rounded flex cursor-pointer select-none"
className="px-1 py-0.5 bg-accent-background-hovered hover:bg-accent-background rounded flex cursor-pointer select-none"
>
<div className="my-auto">
{document.hidden ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const IsVisibleSection = ({
);
onUpdate(response);
}}
className="flex text-error cursor-pointer hover:bg-hover py-1 px-2 w-fit rounded-full"
className="flex text-error cursor-pointer hover:bg-accent-background-hovered py-1 px-2 w-fit rounded-full"
>
<div className="select-none">Hidden</div>
<div className="ml-1 my-auto">
Expand All @@ -53,7 +53,7 @@ const IsVisibleSection = ({
);
onUpdate(response);
}}
className="flex cursor-pointer hover:bg-hover py-1 px-2 w-fit rounded-full"
className="flex cursor-pointer hover:bg-accent-background-hovered py-1 px-2 w-fit rounded-full"
>
<div className="my-auto select-none">Visible</div>
<div className="ml-1 my-auto">
Expand Down
4 changes: 2 additions & 2 deletions web/src/app/admin/documents/sets/DocumentSetCreationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export const DocumentSetCreationForm = ({
cursor-pointer ` +
(isSelected
? " bg-background-strong"
: " hover:bg-hover")
: " hover:bg-accent-background-hovered")
}
onClick={() => {
if (isSelected) {
Expand Down Expand Up @@ -305,7 +305,7 @@ export const DocumentSetCreationForm = ({
cursor-pointer ` +
(isSelected
? " bg-background-strong"
: " hover:bg-hover")
: " hover:bg-accent-background-hovered")
}
onClick={() => {
if (isSelected) {
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/admin/documents/sets/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const EditRow = ({
<TooltipTrigger asChild>
<div
className={`
text-text-darkerfont-medium my-auto p-1 hover:bg-hover-light flex items-center select-none
text-text-darkerfont-medium my-auto p-1 hover:bg-accent-background flex items-center select-none
${documentSet.is_up_to_date ? "cursor-pointer" : "cursor-default"}
`}
style={{ wordBreak: "normal", overflowWrap: "break-word" }}
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/admin/embeddings/pages/CloudEmbeddingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ export function CloudModelCard({
className={`w-full p-2 rounded-lg text-sm ${
enabled
? "bg-background-125 border border-border cursor-not-allowed"
: "bg-background border border-border hover:bg-hover cursor-pointer"
: "bg-background border border-border hover:bg-accent-background-hovered cursor-pointer"
}`}
onClick={() => {
if (enabled) {
Expand Down
4 changes: 2 additions & 2 deletions web/src/app/admin/indexing/[id]/IndexAttemptErrorsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ export function CustomModal({
setCopyClicked(true);
setTimeout(() => setCopyClicked(false), 2000);
}}
className="flex w-fit cursor-pointer hover:bg-hover-light p-2 border-border border rounded"
className="flex w-fit cursor-pointer hover:bg-accent-background p-2 border-border border rounded"
>
Copy full content
<CopyIcon className="ml-2 my-auto" />
</div>
) : (
<div className="flex w-fit hover:bg-hover-light p-2 border-border border rounded cursor-default">
<div className="flex w-fit hover:bg-accent-background p-2 border-border border rounded cursor-default">
Copied to clipboard
<CheckmarkIcon
className="my-auto ml-2 flex flex-shrink-0 text-success"
Expand Down
22 changes: 16 additions & 6 deletions web/src/app/admin/indexing/status/CCPairIndexingStatusTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,16 @@ function SummaryRow({
</TableCell>

<TableCell>
<div className="text-sm text-text-500">Total Connectors</div>
<div className="text-sm text-neutral-500 dark:text-neutral-300">
Total Connectors
</div>
<div className="text-xl font-semibold">{summary.count}</div>
</TableCell>

<TableCell>
<div className="text-sm text-text-500">Active Connectors</div>
<div className="text-sm text-neutral-500 dark:text-neutral-300">
Active Connectors
</div>
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
Expand All @@ -106,22 +110,28 @@ function SummaryRow({

{isPaidEnterpriseFeaturesEnabled && (
<TableCell>
<div className="text-sm text-text-500">Public Connectors</div>
<div className="text-sm text-neutral-500 dark:text-neutral-300">
Public Connectors
</div>
<p className="flex text-xl mx-auto font-semibold items-center text-lg mt-1">
{summary.public}/{summary.count}
</p>
</TableCell>
)}

<TableCell>
<div className="text-sm text-text-500">Total Docs Indexed</div>
<div className="text-sm text-neutral-500 dark:text-neutral-300">
Total Docs Indexed
</div>
<div className="text-xl font-semibold">
{summary.totalDocsIndexed.toLocaleString()}
</div>
</TableCell>

<TableCell>
<div className="text-sm text-text-500">Errors</div>
<div className="text-sm text-neutral-500 dark:text-neutral-300">
Errors
</div>

<div className="flex items-center text-lg gap-x-1 font-semibold">
{summary.errors > 0 && <Warning className="text-error h-6 w-6" />}
Expand Down Expand Up @@ -193,7 +203,7 @@ function ConnectorRow({

return (
<TableRow
className={`hover:bg-hover-light ${
className={`hover:bg-accent-background ${
invisible
? "invisible !h-0 !-mb-10 !border-none"
: "!border !border-border"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const TokenRateLimitTable = ({
}
className={`px-1 py-0.5 rounded select-none w-24 ${
isAdmin
? "hover:bg-hover-light cursor-pointer"
? "hover:bg-accent-background cursor-pointer"
: "opacity-50"
}`}
>
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/admin/tools/ToolEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function ToolForm({
py-1
px-3
text-sm
hover:bg-hover-light
hover:bg-accent-background
"
onClick={() => {
const definition = values.definition;
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/admin/tools/ToolsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function ToolsTable({ tools }: { tools: ToolSnapshot[] }) {
{tool.in_code_tool_id === null ? (
<div className="my-auto">
<div
className="hover:bg-hover rounded p-1 cursor-pointer"
className="hover:bg-accent-background-hovered rounded p-1 cursor-pointer"
onClick={async () => {
const response = await deleteCustomTool(tool.id);
if (response.data) {
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/assistants/LargeBackButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function LargeBackButton() {
return (
<div className="cursor-pointer" onClick={() => router.back()}>
<FiChevronLeft
className="mr-1 my-auto p-1 hover:bg-hover rounded cursor-pointer"
className="mr-1 my-auto p-1 hover:bg-accent-background-hovered rounded cursor-pointer"
size={32}
/>
</div>
Expand Down
8 changes: 4 additions & 4 deletions web/src/app/assistants/mine/AssistantCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const AssistantCard: React.FC<{
}, [persona.name]);

return (
<div className="w-full p-2 overflow-visible pb-4 pt-3 bg-neutral-100 dark:bg-neutral-800/80 rounded shadow-[0px_0px_4px_0px_rgba(0,0,0,0.25)] flex flex-col">
<div className="w-full text-text-800 p-2 overflow-visible pb-4 pt-3 bg-transparent dark:bg-neutral-800/80 rounded shadow-[0px_0px_4px_0px_rgba(0,0,0,0.25)] flex flex-col">
<div className="w-full flex">
<div className="ml-2 flex-none mr-2 mt-1 w-10 h-10">
<AssistantIcon assistant={persona} size="large" />
Expand Down Expand Up @@ -257,7 +257,7 @@ const AssistantCard: React.FC<{

<div className="flex flex-col ">
<div className="my-1.5">
<p className="flex items-center text-neutral-600 dark:text-neutral-400 text-xs opacity-50">
<p className="flex items-center text-neutral-800 dark:text-neutral-200 text-xs opacity-50">
{persona.owner?.email || persona.builtin_persona ? (
<>
<span className="truncate">
Expand Down Expand Up @@ -302,7 +302,7 @@ const AssistantCard: React.FC<{
router.push(`/chat?assistantId=${persona.id}`);
closeModal();
}}
className="hover:bg-neutral-200 dark:hover:bg-neutral-700 hover:text-neutral-900 dark:hover:text-neutral-100 px-2 py-1 gap-x-1 rounded border border-neutral-400 dark:border-neutral-600 flex items-center"
className="hover:bg-neutral-100 dark:hover:bg-neutral-700 dark:bg-[#2E2E2D] hover:text-neutral-900 dark:hover:text-neutral-100 px-2 py-1 gap-x-1 rounded border border-neutral-400 dark:border-neutral-600 flex items-center"
>
<PencilIcon size={12} className="flex-none" />
<span className="text-xs">Start Chat</span>
Expand All @@ -324,7 +324,7 @@ const AssistantCard: React.FC<{
!pinned
);
}}
className="hover:bg-neutral-200 dark:hover:bg-neutral-700 px-2 group cursor-pointer py-1 gap-x-1 relative rounded border border-neutral-400 dark:border-neutral-600 flex items-center w-[65px]"
className="hover:bg-neutral-100 dark:hover:bg-neutral-700 dark:bg-[#2E2E2D] px-2 group cursor-pointer py-1 gap-x-1 relative rounded border border-neutral-400 dark:border-neutral-600 flex items-center w-[65px]"
>
<PinnedIcon size={12} />
{!pinned ? (
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/assistants/mine/AssistantModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function AssistantModal({
</button>
</div>
<div className="px-2 flex py-4 items-center gap-x-2 flex-wrap">
<FilterIcon size={16} />
<FilterIcon className="text-text-800" size={16} />
<AssistantBadgeSelector
text="Pinned"
selected={assistantFilters[AssistantFilter.Pinned]}
Expand Down
Loading

0 comments on commit 419ef32

Please sign in to comment.