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

Feature: Chatbot Tournament Updater #260

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
137 changes: 130 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"nexus": "^1.3.0",
"nostr-relaypool": "^0.6.16",
"nostr-tools": "^1.2.0",
"openai": "^3.3.0",
"qrcode.react": "^3.0.2",
"react": "^18.0.0",
"react-accessible-accordion": "^5.0.0",
Expand Down Expand Up @@ -96,6 +97,7 @@
"web-vitals": "^2.1.4",
"webln": "^0.3.0",
"websocket-polyfill": "^0.0.3",
"yaml": "^2.3.1",
"yup": "^0.32.11"
},
"scripts": {
Expand Down
33 changes: 33 additions & 0 deletions src/features/Dashboard/Chatbot/Chatbot.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { useSearchParams } from "react-router-dom";
import OgTags from "src/Components/OgTags/OgTags";
import Chat from "./components/Chat";
import TournamentPreview from "./components/TournamentPreview";
import { TournamentContextProvider } from "./contexts/tournament.context";
import { TournamentChatbotContextProvider } from "./contexts/tournamentChatbot.context";

export default function ChatbotPage() {
const [searchParams] = useSearchParams();

const tournamentIdOrSlug = searchParams.get("tournament");

if (!tournamentIdOrSlug) return <p>No tournament selected</p>;

return (
<>
<OgTags
title="Chatbot Commander"
description="Update stuff using chatbot"
/>
<div className="h-[90vh] py-16 border-2 border-gray-200 rounded m-8">
<div className="h-full grid grid-cols-2 items-center">
<TournamentContextProvider idOrSlug={tournamentIdOrSlug}>
<TournamentChatbotContextProvider>
<Chat />
</TournamentChatbotContextProvider>
<TournamentPreview />
</TournamentContextProvider>
</div>
</div>
</>
);
}
11 changes: 11 additions & 0 deletions src/features/Dashboard/Chatbot/components/Chat.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import MessagesContainer from "./MessagesContainer";

export default function Chat() {
return (
<div className="overflow-auto h-full w-full mx-auto px-16">
<div className="h-full bg-gray-300 bg-opacity-30 rounded p-16 flex flex-col overflow-auto">
<MessagesContainer />
</div>
</div>
);
}
Loading