Skip to content

Commit 436ba11

Browse files
Remove AI chat feature to eliminate API costs
- Delete ChatPanel component, chat routes, and chatService - Uninstall openai and @azure/identity packages - Remove chat CSS, rename chat-send to btn-primary - Remove Ask nav link, keep all static features and Watch Mode Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent bccebc9 commit 436ba11

11 files changed

Lines changed: 12 additions & 812 deletions

File tree

client/src/App.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import Dashboard from "./components/Dashboard";
44
import ContestantExplorer from "./components/ContestantExplorer";
55
import ContestantDetail from "./components/ContestantDetail";
66
import SeasonView from "./components/SeasonView";
7-
import ChatPanel from "./components/ChatPanel";
87
import WatchMode from "./components/WatchMode";
98

10-
type Page = "dashboard" | "contestants" | "seasons" | "chat" | "watch";
9+
type Page = "dashboard" | "contestants" | "seasons" | "watch";
1110

1211
function App() {
1312
const [page, setPage] = useState<Page>("dashboard");
@@ -22,7 +21,6 @@ function App() {
2221
<a href="#" className={page === "contestants" ? "active" : ""} onClick={() => setPage("contestants")}>Contestants</a>
2322
<a href="#" className={page === "seasons" ? "active" : ""} onClick={() => setPage("seasons")}>Seasons</a>
2423
<a href="#" className={page === "watch" ? "active" : ""} onClick={() => setPage("watch")}>🎬 Watch</a>
25-
<a href="#" className={page === "chat" ? "active" : ""} onClick={() => setPage("chat")}>💬 Ask</a>
2624
</nav>
2725
</header>
2826

@@ -33,7 +31,6 @@ function App() {
3331
)}
3432
{page === "seasons" && <SeasonView />}
3533
{page === "watch" && <WatchMode />}
36-
{page === "chat" && <ChatPanel />}
3734
</main>
3835

3936
{selectedContestant && (

client/src/components/ChatPanel.tsx

Lines changed: 0 additions & 98 deletions
This file was deleted.

client/src/components/WatchMode.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export default function WatchMode() {
135135
onChange={(e) => setNewName(e.target.value)}
136136
onKeyDown={(e) => e.key === "Enter" && handleAddProfile()}
137137
/>
138-
<button className="chat-send" onClick={handleAddProfile}>Add</button>
138+
<button className="btn-primary" onClick={handleAddProfile}>Add</button>
139139
</div>
140140

141141
<h3>Select Episode</h3>
@@ -153,7 +153,7 @@ export default function WatchMode() {
153153
</div>
154154

155155
<button
156-
className="chat-send"
156+
className="btn-primary"
157157
style={{ width: "100%", padding: "1rem", fontSize: "1.1rem" }}
158158
onClick={startGame}
159159
disabled={!selectedSeason || profiles.length === 0}

client/src/components/WatchModeScorer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export default function WatchModeScorer({ tasks, players, seasonNumber, onComple
166166
</div>
167167

168168
<button
169-
className="chat-send"
169+
className="btn-primary"
170170
style={{ width: "100%", marginTop: "1rem", padding: "0.75rem" }}
171171
onClick={handleNext}
172172
disabled={!allContestantsScored}
@@ -316,7 +316,7 @@ function ResultsView({
316316
</div>
317317

318318
<button
319-
className="chat-send"
319+
className="btn-primary"
320320
style={{ width: "100%", marginTop: "1rem", padding: "1rem", fontSize: "1.1rem" }}
321321
onClick={onDone}
322322
>

client/src/hooks/useData.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,3 @@ export async function fetchAnalysis() {
1919
const res = await fetch(`${API_BASE}/analysis`);
2020
return res.json();
2121
}
22-
23-
export interface ChatMessage {
24-
role: "user" | "assistant";
25-
content: string;
26-
}
27-
28-
export async function sendChatMessage(
29-
message: string,
30-
history: ChatMessage[]
31-
): Promise<string> {
32-
const res = await fetch(`${API_BASE}/chat`, {
33-
method: "POST",
34-
headers: { "Content-Type": "application/json" },
35-
body: JSON.stringify({ message, history }),
36-
});
37-
const data = await res.json();
38-
return data.response;
39-
}

client/src/styles/theme.css

Lines changed: 5 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -248,71 +248,8 @@ nav a.active {
248248
margin-left: 0.5rem;
249249
}
250250

251-
/* Chat — brown board style */
252-
.chat-container {
253-
display: flex;
254-
flex-direction: column;
255-
height: calc(100vh - 180px);
256-
max-height: 700px;
257-
}
258-
259-
.chat-messages {
260-
flex: 1;
261-
overflow-y: auto;
262-
padding: 1rem;
263-
display: flex;
264-
flex-direction: column;
265-
gap: 1rem;
266-
background: rgba(0,0,0,0.03);
267-
border-radius: 4px;
268-
}
269-
270-
.chat-message {
271-
max-width: 80%;
272-
padding: 0.75rem 1rem;
273-
border-radius: 8px;
274-
line-height: 1.5;
275-
white-space: pre-wrap;
276-
}
277-
278-
.chat-message.user {
279-
align-self: flex-end;
280-
background: var(--tm-brown);
281-
color: var(--tm-text-light);
282-
border-bottom-right-radius: 2px;
283-
box-shadow: 2px 2px 4px var(--tm-shadow);
284-
}
285-
286-
.chat-message.assistant {
287-
align-self: flex-start;
288-
background: white;
289-
border: 1px solid var(--tm-cream-dark);
290-
color: var(--tm-text-dark);
291-
border-bottom-left-radius: 2px;
292-
box-shadow: 2px 2px 4px var(--tm-shadow);
293-
}
294-
295-
.chat-input-area {
296-
display: flex;
297-
gap: 0.5rem;
298-
padding: 1rem;
299-
border-top: 2px dashed var(--tm-cream-dark);
300-
}
301-
302-
.chat-input {
303-
flex: 1;
304-
padding: 0.75rem 1rem;
305-
border-radius: 6px;
306-
border: 2px solid var(--tm-cream-dark);
307-
background: white;
308-
color: var(--tm-text-dark);
309-
font-size: 0.95rem;
310-
outline: none;
311-
}
312-
313-
.chat-input:focus { border-color: var(--tm-red); }
314-
315-
.chat-send {
251+
/* Buttons */
252+
.btn-primary {
316253
padding: 0.75rem 1.5rem;
317254
background: var(--tm-red-bright);
318255
color: white;
@@ -325,16 +262,10 @@ nav a.active {
325262
box-shadow: 2px 2px 4px var(--tm-shadow);
326263
}
327264

328-
.chat-send:hover { background: var(--tm-link-hover); }
329-
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
265+
.btn-primary:hover { background: var(--tm-link-hover); }
266+
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
330267

331-
/* Suggested questions */
332-
.suggestions {
333-
display: flex;
334-
flex-wrap: wrap;
335-
gap: 0.5rem;
336-
padding: 0.5rem 1rem;
337-
}
268+
/* Pill selector buttons */
338269

339270
.suggestion-btn {
340271
padding: 0.4rem 0.8rem;

0 commit comments

Comments
 (0)