Skip to content

Commit

Permalink
Merge pull request #36 from enMedD/new-main
Browse files Browse the repository at this point in the history
revert back to stable release
  • Loading branch information
SchadenKai authored Aug 1, 2024
2 parents 360305c + 5875a3e commit fe52a9e
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 39 deletions.
2 changes: 1 addition & 1 deletion backend/danswer/server/danswer_api/ingestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
logger = setup_logger()

# not using /api to avoid confusion with nginx api path routing
router = APIRouter(prefix="/danswer-api")
router = APIRouter(prefix="/enmedd-api")


@router.get("/connector-docs/{cc_pair_id}")
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/chat/ChatIntro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function ChatIntro({
{selectedPersona?.name || "How can I help you today?"}
</div>
{selectedPersona && (
<div className="px-6 mt-1 text-center">
<div className="mt-1 text-center">
{selectedPersona.description}
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions web/src/app/chat/ChatPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ export function ChatPage({
<ChatBanner />

{livePersona && (
<div className="sticky top-0 z-10 flex w-full lg:left-80 bg-background">
<div className="sticky top-0 z-10 flex w-full left-80 bg-background">
<div className="flex w-full mt-2">
<div className="flex items-center w-full gap-3 p-1 ml-2 rounded">
<FiMenu
Expand Down Expand Up @@ -1237,7 +1237,7 @@ export function ChatPage({

<div
className={
"mt-4 pt-12 sm:pt-0 mx-6 sm:mx-8" +
"mt-4 pt-12 sm:pt-0 mx-8" +
(hasPerformedInitialScroll ? "" : " invisible")
}
>
Expand Down
36 changes: 18 additions & 18 deletions web/src/app/chat/message/Messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const AIMessage = ({
const shouldShowLoader =
!toolCall || (toolCall.tool_name === SEARCH_TOOL_NAME && !content);
const defaultLoader = shouldShowLoader ? (
<div className="my-auto text-sm">
<div className="text-sm my-auto">
<ThreeDots
height="30"
width="50"
Expand All @@ -168,15 +168,15 @@ export const AIMessage = ({

return (
<div className={"py-5 px-5 flex -mr-6 w-full"}>
<div className="relative mx-auto w-searchbar-xs 2xl:w-searchbar-sm 3xl:w-searchbar">
<div className="mx-auto w-searchbar-xs 2xl:w-searchbar-sm 3xl:w-searchbar relative">
<div className="ml-8">
<div className="flex">
<AssistantIcon
size="small"
assistant={alternativeAssistant || currentPersona}
/>

<div className="my-auto ml-2 font-bold text-emphasis">
<div className="font-bold text-emphasis ml-2 my-auto">
{personaName || "enMedD CHP"}
</div>

Expand All @@ -185,7 +185,7 @@ export const AIMessage = ({
handleShowRetrieved !== undefined &&
isCurrentlyShowingRetrieved !== undefined &&
!retrievalDisabled && (
<div className="absolute flex ml-8 w-message-xs 2xl:w-message-sm 3xl:w-message-default">
<div className="flex w-message-xs 2xl:w-message-sm 3xl:w-message-default absolute ml-8">
<div className="ml-auto">
<ShowHideDocsButton
messageId={messageId}
Expand All @@ -197,7 +197,7 @@ export const AIMessage = ({
)}
</div>

<div className="mt-1 ml-8 break-words w-message-xs 2xl:w-message-sm 3xl:w-message-default">
<div className="w-message-xs 2xl:w-message-sm 3xl:w-message-default break-words mt-1 ml-8">
{(!toolCall || toolCall.tool_name === SEARCH_TOOL_NAME) && (
<>
{query !== undefined &&
Expand Down Expand Up @@ -263,7 +263,7 @@ export const AIMessage = ({
{typeof content === "string" ? (
<ReactMarkdown
key={messageId}
className="max-w-full prose"
className="prose max-w-full"
components={{
a: (props) => {
const { node, ...rest } = props;
Expand Down Expand Up @@ -315,8 +315,8 @@ export const AIMessage = ({
.filter(([_, document]) => document.semantic_identifier)
.map(([citationKey, document], ind) => {
const display = (
<div className="flex px-2 py-1 text-sm border rounded max-w-350 text-ellipsis border-border">
<div className="my-auto mr-1">
<div className="max-w-350 text-ellipsis flex text-sm border border-border py-1 px-2 rounded flex">
<div className="mr-1 my-auto">
<SourceIcon
sourceType={document.source_type}
iconSize={16}
Expand Down Expand Up @@ -387,7 +387,7 @@ function MessageSwitcher({
icon={FiChevronLeft}
onClick={currentPage === 1 ? undefined : handlePrevious}
/>
<span className="select-none text-emphasis text-medium">
<span className="text-emphasis text-medium select-none">
{currentPage} / {totalPages}
</span>
<Hoverable
Expand Down Expand Up @@ -448,23 +448,23 @@ export const HumanMessage = ({

return (
<div
className="relative flex w-full pt-5 pb-1 -mr-6 lg:px-5"
className="pt-5 pb-1 px-5 flex -mr-6 w-full relative"
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
<div className="w-full mx-auto 2xl:w-searchbar-sm 3xl:w-searchbar">
<div className="lg:ml-8">
<div className="mx-auto w-searchbar-xs 2xl:w-searchbar-sm 3xl:w-searchbar">
<div className="ml-8">
<div className="flex">
<div className="p-1 bg-blue-400 rounded-lg h-fit">
<div className="text-inverted">
<FiUser size={16} className="mx-auto my-auto" />
<FiUser size={16} className="my-auto mx-auto" />
</div>
</div>

<div className="my-auto ml-2 font-bold text-emphasis">You</div>
<div className="font-bold text-emphasis ml-2 my-auto">You</div>
</div>
<div className="flex flex-wrap mx-auto mt-1 ml-8 w-searchbar-xs 2xl:w-searchbar-sm 3xl:w-searchbar-default">
<div className="break-words w-message-xs 2xl:w-message-sm 3xl:w-message-default">
<div className="mx-auto mt-1 ml-8 w-searchbar-xs 2xl:w-searchbar-sm 3xl:w-searchbar-default flex flex-wrap">
<div className="w-message-xs 2xl:w-message-sm 3xl:w-message-default break-words">
<FileDisplay files={files || []} />

{isEditing ? (
Expand Down Expand Up @@ -525,7 +525,7 @@ export const HumanMessage = ({
}
}}
/>
<div className="flex justify-end gap-2 pr-4 mt-2">
<div className="flex justify-end mt-2 gap-2 pr-4">
<button
className={`
w-fit
Expand Down Expand Up @@ -561,7 +561,7 @@ export const HumanMessage = ({
</div>
</div>
) : typeof content === "string" ? (
<div className="flex flex-col max-w-full prose preserve-lines">
<div className="flex flex-col preserve-lines prose max-w-full">
{content}
</div>
) : (
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/ee/admin/api-key/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { deleteApiKey, regenerateApiKey } from "./lib";
import { DanswerApiKeyForm } from "./DanswerApiKeyForm";

const API_KEY_TEXT = `
API Keys allow you to access Danswer APIs programmatically. Click the button below to generate a new API Key.
API Keys allow you to access enMedD CHP APIs programmatically. Click the button below to generate a new API Key.
`;

function NewApiKeyModal({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function CustomAnalyticsUpdateForm() {
For security reasons, you must provide a secret key to update this
script. This should be the value of the{" "}
<i>CUSTOM_ANALYTICS_SECRET_KEY</i> environment variable set when
initially setting up Danswer.
initially setting up enMedD CHP.
</>
</SubLabel>
<input
Expand Down
4 changes: 2 additions & 2 deletions web/src/app/ee/admin/performance/custom-analytics/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Main() {
<div className="mt-4">
<Callout title="Custom Analytics is not enabled." color="red">
To set up custom analytics scripts, please work with the team who
setup Danswer in your organization to set the{" "}
setup enMedD CHP in your organization to set the{" "}
<i>CUSTOM_ANALYTICS_SECRET_KEY</i> environment variable.
</Callout>
</div>
Expand All @@ -22,7 +22,7 @@ function Main() {
return (
<div>
<Text className="mb-8">
This allows you to bring your own analytics tool to Danswer! Copy the
This allows you to bring your own analytics tool to enMedD CHP! Copy the
Web snippet from your analytics provider into the box below, and
we&apos;ll start sending usage events.
</Text>
Expand Down
8 changes: 4 additions & 4 deletions web/src/app/ee/admin/whitelabeling/WhitelabelingForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ export function WhitelabelingForm() {
<TextFormField
label="Application Name"
name="application_name"
subtext={`The custom name you are giving Danswer for your organization. This will replace 'Danswer' everywhere in the UI.`}
placeholder="Custom name which will replace 'Danswer'"
subtext={`The custom name you are giving enMedD CHP for your organization. This will replace 'enMedD CHP' everywhere in the UI.`}
placeholder="Custom name which will replace 'enMedD CHP'"
disabled={isSubmitting}
/>

Expand Down Expand Up @@ -135,7 +135,7 @@ export function WhitelabelingForm() {
</div>
) : (
<SubLabel>
Specify your own logo to replace the standard Danswer logo.
Specify your own logo to replace the standard enMedD CHP logo.
</SubLabel>
)}

Expand Down Expand Up @@ -164,7 +164,7 @@ export function WhitelabelingForm() {
name="custom_popup_header"
subtext={`The title for the popup that will be displayed for each user on their initial visit
to the application. If left blank AND Custom Popup Content is specified, will use "Welcome to ${
values.application_name || "Danswer"
values.application_name || "enMedD CHP"
}!".`}
placeholder="Initial Popup Header"
disabled={isSubmitting}
Expand Down
9 changes: 0 additions & 9 deletions web/src/components/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,6 @@ export const SideBar: React.FC<SideBarProps> = ({ isHeader, handleClose }) => {
),
link: "/admin/performance/query-history",
},
{
name: (
<div className="flex">
<FiBarChart2 size={18} />
<div className="ml-1">Custom Analytics</div>
</div>
),
link: "/admin/performance/custom-analytics",
},
],
},
]
Expand Down

0 comments on commit fe52a9e

Please sign in to comment.