Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove authentication #1

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ dist-ssr
*.njsproj
*.sln
*.sw?

/.cache
/build
.env*
*.vars
.wrangler
_worker.bundle
16 changes: 0 additions & 16 deletions .vscode/launch.json

This file was deleted.

9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,10 @@ pnpm install
ANTHROPIC_API_KEY=XXX
```

Optionally, you an set the debug level or disable authentication:
Optionally, you an set the debug level:

```
VITE_LOG_LEVEL=debug
VITE_DISABLE_AUTH=1
```

If you want to run authentication against a local StackBlitz instance, add:

```
VITE_CLIENT_ORIGIN=https://local.stackblitz.com:3000
```

**Important**: Never commit your `.env.local` file to version control. It's already included in .gitignore.
Expand Down
3 changes: 0 additions & 3 deletions app/components/chat/BaseChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { Messages } from './Messages.client';
import { SendButton } from './SendButton.client';

import styles from './BaseChat.module.scss';
import { useLoaderData } from '@remix-run/react';

interface BaseChatProps {
textareaRef?: React.RefObject<HTMLTextAreaElement> | undefined;
Expand Down Expand Up @@ -59,7 +58,6 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
ref,
) => {
const TEXTAREA_MAX_HEIGHT = chatStarted ? 400 : 200;
const { avatar } = useLoaderData<{ avatar?: string }>();

return (
<div
Expand Down Expand Up @@ -96,7 +94,6 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
className="flex flex-col w-full flex-1 max-w-chat px-4 pb-6 mx-auto z-1"
messages={messages}
isStreaming={isStreaming}
avatar={avatar}
/>
) : null;
}}
Expand Down
9 changes: 2 additions & 7 deletions app/components/chat/Messages.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ interface MessagesProps {
className?: string;
isStreaming?: boolean;
messages?: Message[];
avatar?: string;
}

export const Messages = React.forwardRef<HTMLDivElement, MessagesProps>((props: MessagesProps, ref) => {
const { id, isStreaming = false, messages = [], avatar } = props;
const { id, isStreaming = false, messages = [] } = props;

return (
<div id={id} ref={ref} className={props.className}>
Expand All @@ -36,11 +35,7 @@ export const Messages = React.forwardRef<HTMLDivElement, MessagesProps>((props:
>
{isUserMessage && (
<div className="flex items-center justify-center w-[34px] h-[34px] overflow-hidden bg-white text-gray-600 rounded-full shrink-0 self-start">
{avatar ? (
<img className="w-full h-full object-cover" src={avatar} />
) : (
<div className="i-ph:user-fill text-xl"></div>
)}
<div className="i-ph:user-fill text-xl"></div>
</div>
)}
<div className="grid grid-col-1 w-full">
Expand Down
41 changes: 0 additions & 41 deletions app/lib/.server/auth.ts

This file was deleted.

240 changes: 0 additions & 240 deletions app/lib/.server/sessions.ts

This file was deleted.

Loading
Loading