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
|
|
@ -104,6 +104,10 @@ function toolArgs(name: string, userText: string, all: string): Record<string, u
|
|||
const m = /(delete|rename)\s+(quiz|deck|note|document)\s+([\w-]{8,})/i.exec(userText);
|
||||
return { reason: 'Requested by the user.', changes: [{ op: m?.[1]?.toLowerCase() ?? 'delete', kind: m?.[2]?.toLowerCase() ?? 'quiz', id: m?.[3] ?? 'missing', title: 'Renamed by mock' }] };
|
||||
}
|
||||
case 'ask_user':
|
||||
return { questions: [{ id: 'exam', question: 'Which exam is this for?', options: [{ label: 'Exam 1' }, { label: 'Exam 2' }], defaults: ['Exam 2'] }, { id: 'count', question: 'How many questions?', input: 'number', defaults: ['20'] }] };
|
||||
case 'web_search':
|
||||
return { objective: 'Current sepsis bundle guidance', search_queries: ['sepsis bundle 2026', 'surviving sepsis hour-1 bundle'] };
|
||||
default:
|
||||
return name.startsWith('mcp_') ? { drug: 'furosemide' } : {};
|
||||
}
|
||||
|
|
@ -111,8 +115,12 @@ function toolArgs(name: string, userText: string, all: string): Record<string, u
|
|||
|
||||
function chooseTool(userText: string, names: string[]): string | null {
|
||||
const pick = (name: string) => (names.includes(name) ? name : null);
|
||||
// "the web" in the message: the built-in web search.
|
||||
if (/\bthe web\b/i.test(userText) && names.includes('web_search')) return 'web_search';
|
||||
// "mcp" in the message: use the first tool from an MCP server.
|
||||
if (/\bmcp\b/i.test(userText)) return names.find((n) => n.startsWith('mcp_')) ?? null;
|
||||
// "ask me" in the message: clarifying questions first.
|
||||
if (/\bask me\b/i.test(userText)) return pick('ask_user');
|
||||
if (/\b(delete|rename)\b/i.test(userText)) return pick('propose_changes');
|
||||
if (/flashcard/i.test(userText)) return pick('generate_flashcards');
|
||||
if (/\bquiz\b|practice questions/i.test(userText)) return pick('generate_quiz');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue