Third revision: web search, MCP sign-in, exams, intelligent UI, clarifying questions
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 1m0s
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 1m0s
- Built-in Parallel web search (keyless; optional sign-in for higher limits and research) with its own settings page; OAuth sign-in (RFC 9728/8414/7591, PKCE, RFC 8707) for any MCP server, with token refresh and pre-registered client support - Friendly tool steps (icon, name, status; details on click) and ids stripped from results; per-chat tool switches; taller thinking box - Exams within classes: exam tabs, scoped lists, uploads, imports and Generate; exam-only material for generation; class setting for what the groups are called - Assistant can ask clarifying questions in an inline form before generating - OpenUI blocks (charts, questions, flashcards, inputs) in assistant, Explain and share chats - Explain beside the quiz on wide screens, grounded in the cited source pages - Quiz results: percentage ring coloured by score band, rainbow at 100 - Share links: assistant button like the owner's, hidden during quizzes; documents readable in the browser - Live draft and library updates over server-sent events Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
60cf2322f7
commit
c595e0ff2c
54 changed files with 4710 additions and 387 deletions
|
|
@ -6,11 +6,11 @@ import { toast } from 'sonner';
|
|||
import { CLASS_COLORS, type ClassColor } from '@shared/content';
|
||||
import { api, errorMessage } from '@/lib/api';
|
||||
import { assistant, useAssistantState } from '@/lib/assistantStore';
|
||||
import { qk, useClasses, useOverview, useRefresh } from '@/lib/queries';
|
||||
import { qk, useClasses, useLiveChanges, useOverview, useRefresh } from '@/lib/queries';
|
||||
import type { ClassInfo, SearchHit } from '@/lib/types';
|
||||
import { cx, useDebounced, useHotkeys, useIsDesktop, useTheme, type ThemeChoice } from '@/lib/util';
|
||||
import { Brand } from '@/pages/Auth';
|
||||
import { Button, ClassDot, Dialog, Field, IconButton, Input, Menu, MenuItem, MenuLabel, MenuSeparator, Spinner, Textarea, Tooltip } from '@/ui';
|
||||
import { Button, ClassDot, Dialog, Field, IconButton, Input, Menu, MenuItem, MenuLabel, MenuSeparator, Spinner, Textarea, Tooltip, Select } from '@/ui';
|
||||
import { SidebarDrafts, useDraftNotifications } from '@/features/DraftsTray';
|
||||
|
||||
const AssistantPanel = lazy(() => import('@/features/AssistantPanel'));
|
||||
|
|
@ -24,6 +24,7 @@ export function ClassDialog({ open, onOpenChange, existing }: { open: boolean; o
|
|||
const [code, setCode] = useState('');
|
||||
const [description, setDescription] = useState('');
|
||||
const [color, setColor] = useState<ClassColor | null>(null);
|
||||
const [groupLabel, setGroupLabel] = useState('Exam');
|
||||
const [busy, setBusy] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -32,6 +33,7 @@ export function ClassDialog({ open, onOpenChange, existing }: { open: boolean; o
|
|||
setCode(existing?.code ?? '');
|
||||
setDescription(existing?.description ?? '');
|
||||
setColor(existing?.color ?? null);
|
||||
setGroupLabel(existing?.groupLabel ?? 'Exam');
|
||||
}, [open, existing]);
|
||||
|
||||
const save = async () => {
|
||||
|
|
@ -39,10 +41,10 @@ export function ClassDialog({ open, onOpenChange, existing }: { open: boolean; o
|
|||
setBusy(true);
|
||||
try {
|
||||
if (existing) {
|
||||
await api.patch(`/api/classes/${existing.id}`, { name, code, description, color: color ?? existing.color });
|
||||
await api.patch(`/api/classes/${existing.id}`, { name, code, description, color: color ?? existing.color, groupLabel });
|
||||
toast.success('Class updated');
|
||||
} else {
|
||||
const res = await api.post<{ class: ClassInfo }>('/api/classes', { name, code, description, color: color ?? undefined });
|
||||
const res = await api.post<{ class: ClassInfo }>('/api/classes', { name, code, description, color: color ?? undefined, groupLabel });
|
||||
navigate(`/classes/${res.class.id}`);
|
||||
}
|
||||
await refresh();
|
||||
|
|
@ -89,6 +91,15 @@ export function ClassDialog({ open, onOpenChange, existing }: { open: boolean; o
|
|||
<Field label="Description" optional>
|
||||
<Textarea value={description} onChange={(e) => setDescription(e.target.value)} rows={2} maxLength={2000} />
|
||||
</Field>
|
||||
<Field label="Divided into" hint="Each one keeps its own documents, quizzes and flashcards, and generating uses only its material.">
|
||||
<Select value={groupLabel} onChange={(e) => setGroupLabel(e.target.value)}>
|
||||
{['Exam', 'Unit', 'Module', 'Week', 'Topic', 'Folder'].map((l) => (
|
||||
<option key={l} value={l}>
|
||||
{l}s
|
||||
</option>
|
||||
))}
|
||||
</Select>
|
||||
</Field>
|
||||
<div>
|
||||
<div className="mb-2 text-[13px] font-medium">Colour</div>
|
||||
<div className="flex flex-wrap gap-2" role="radiogroup" aria-label="Class colour">
|
||||
|
|
@ -530,6 +541,7 @@ export function Shell() {
|
|||
const location = useLocation();
|
||||
const { open: assistantOpen, seed } = useAssistantState();
|
||||
useDraftNotifications();
|
||||
useLiveChanges();
|
||||
const onAssistantPage = location.pathname.startsWith('/assistant');
|
||||
// Study screens lay themselves out edge to edge and bring their own header and footer.
|
||||
const immersive = location.pathname === '/review' || /^\/decks\/[^/]+\/cram$/.test(location.pathname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue