Spaces:
Sleeping
Sleeping
changed generalist to maths mode
Browse files- web/src/App.tsx +5 -5
- web/src/Login.tsx +8 -8
web/src/App.tsx
CHANGED
|
@@ -838,7 +838,7 @@ function App() {
|
|
| 838 |
const [showMathSymbols, setShowMathSymbols] = useState(false);
|
| 839 |
const [webSearchEnabled, setWebSearchEnabled] = useState(true);
|
| 840 |
const [selectedModel, setSelectedModel] = useState<string>('deepseek-chat');
|
| 841 |
-
const [assistantMode, setAssistantMode] = useState<'
|
| 842 |
const [sidebarOpen, setSidebarOpen] = useState(true);
|
| 843 |
const [conversations, setConversations] = useState<ConversationItem[]>([]);
|
| 844 |
const [currentConvId, setCurrentConvId] = useState<string | null>(null);
|
|
@@ -868,7 +868,7 @@ function App() {
|
|
| 868 |
{ id: 'deepseek-chat', label: 'DeepSeek V3', title: 'DeepSeek V3 (fast)' },
|
| 869 |
{ id: 'deepseek-reasoner', label: 'DeepSeek R1', title: 'DeepSeek R1 (deep reasoning)' },
|
| 870 |
];
|
| 871 |
-
const currentModeLabel = assistantMode === 'legal-support' ? 'Legal Support' : '
|
| 872 |
const legalExamples = [
|
| 873 |
{
|
| 874 |
label: 'ACL remedies for major failure',
|
|
@@ -887,7 +887,7 @@ function App() {
|
|
| 887 |
prompt: 'List likely legal issues and governing Australian authorities for an online subscription cancellation dispute.',
|
| 888 |
},
|
| 889 |
];
|
| 890 |
-
const
|
| 891 |
{
|
| 892 |
label: 'Prove $\\sqrt{2}$ is irrational (Lean 4)',
|
| 893 |
prompt: 'Prove that sqrt(2) is irrational using first principles in Lean 4.',
|
|
@@ -1557,7 +1557,7 @@ function App() {
|
|
| 1557 |
const handleLogin = (
|
| 1558 |
sessionId: string,
|
| 1559 |
userData: User,
|
| 1560 |
-
selectedAssistantMode: '
|
| 1561 |
) => {
|
| 1562 |
// Keep session only in memory - will be lost on refresh
|
| 1563 |
if (sessionId) {
|
|
@@ -1783,7 +1783,7 @@ function App() {
|
|
| 1783 |
</h2>
|
| 1784 |
<p className="welcome-sub">Explicit-assumption 路 Verification 路 Orchestrator</p>
|
| 1785 |
<div className="examples">
|
| 1786 |
-
{(assistantMode === 'legal-support' ? legalExamples :
|
| 1787 |
<button key={example.label} className="example-btn" onClick={() => setInput(example.prompt)}>
|
| 1788 |
<ReactMarkdown
|
| 1789 |
remarkPlugins={[remarkMath]}
|
|
|
|
| 838 |
const [showMathSymbols, setShowMathSymbols] = useState(false);
|
| 839 |
const [webSearchEnabled, setWebSearchEnabled] = useState(true);
|
| 840 |
const [selectedModel, setSelectedModel] = useState<string>('deepseek-chat');
|
| 841 |
+
const [assistantMode, setAssistantMode] = useState<'maths' | 'legal-support'>('maths');
|
| 842 |
const [sidebarOpen, setSidebarOpen] = useState(true);
|
| 843 |
const [conversations, setConversations] = useState<ConversationItem[]>([]);
|
| 844 |
const [currentConvId, setCurrentConvId] = useState<string | null>(null);
|
|
|
|
| 868 |
{ id: 'deepseek-chat', label: 'DeepSeek V3', title: 'DeepSeek V3 (fast)' },
|
| 869 |
{ id: 'deepseek-reasoner', label: 'DeepSeek R1', title: 'DeepSeek R1 (deep reasoning)' },
|
| 870 |
];
|
| 871 |
+
const currentModeLabel = assistantMode === 'legal-support' ? 'Legal Support' : 'Maths';
|
| 872 |
const legalExamples = [
|
| 873 |
{
|
| 874 |
label: 'ACL remedies for major failure',
|
|
|
|
| 887 |
prompt: 'List likely legal issues and governing Australian authorities for an online subscription cancellation dispute.',
|
| 888 |
},
|
| 889 |
];
|
| 890 |
+
const mathsExamples = [
|
| 891 |
{
|
| 892 |
label: 'Prove $\\sqrt{2}$ is irrational (Lean 4)',
|
| 893 |
prompt: 'Prove that sqrt(2) is irrational using first principles in Lean 4.',
|
|
|
|
| 1557 |
const handleLogin = (
|
| 1558 |
sessionId: string,
|
| 1559 |
userData: User,
|
| 1560 |
+
selectedAssistantMode: 'maths' | 'legal-support'
|
| 1561 |
) => {
|
| 1562 |
// Keep session only in memory - will be lost on refresh
|
| 1563 |
if (sessionId) {
|
|
|
|
| 1783 |
</h2>
|
| 1784 |
<p className="welcome-sub">Explicit-assumption 路 Verification 路 Orchestrator</p>
|
| 1785 |
<div className="examples">
|
| 1786 |
+
{(assistantMode === 'legal-support' ? legalExamples : mathsExamples).map((example) => (
|
| 1787 |
<button key={example.label} className="example-btn" onClick={() => setInput(example.prompt)}>
|
| 1788 |
<ReactMarkdown
|
| 1789 |
remarkPlugins={[remarkMath]}
|
web/src/Login.tsx
CHANGED
|
@@ -107,15 +107,15 @@ interface LoginProps {
|
|
| 107 |
onLogin: (
|
| 108 |
token: string,
|
| 109 |
user: { username: string; name: string },
|
| 110 |
-
assistantMode: '
|
| 111 |
) => void;
|
| 112 |
}
|
| 113 |
|
| 114 |
const Login: React.FC<LoginProps> = ({ onLogin }) => {
|
| 115 |
const [username, setUsername] = useState('');
|
| 116 |
const [password, setPassword] = useState('');
|
| 117 |
-
const [assistantMode, setAssistantMode] = useState<'
|
| 118 |
-
const assistantModeRef = useRef<'
|
| 119 |
|
| 120 |
const [error, setError] = useState('');
|
| 121 |
const [loading, setLoading] = useState(false);
|
|
@@ -221,14 +221,14 @@ const Login: React.FC<LoginProps> = ({ onLogin }) => {
|
|
| 221 |
</button>
|
| 222 |
<button
|
| 223 |
type="button"
|
| 224 |
-
className={`login-mode-btn${assistantMode === '
|
| 225 |
onClick={() => {
|
| 226 |
-
assistantModeRef.current = '
|
| 227 |
-
setAssistantMode('
|
| 228 |
}}
|
| 229 |
-
title="
|
| 230 |
>
|
| 231 |
-
|
| 232 |
</button>
|
| 233 |
</div>
|
| 234 |
</div>
|
|
|
|
| 107 |
onLogin: (
|
| 108 |
token: string,
|
| 109 |
user: { username: string; name: string },
|
| 110 |
+
assistantMode: 'maths' | 'legal-support'
|
| 111 |
) => void;
|
| 112 |
}
|
| 113 |
|
| 114 |
const Login: React.FC<LoginProps> = ({ onLogin }) => {
|
| 115 |
const [username, setUsername] = useState('');
|
| 116 |
const [password, setPassword] = useState('');
|
| 117 |
+
const [assistantMode, setAssistantMode] = useState<'maths' | 'legal-support'>('maths');
|
| 118 |
+
const assistantModeRef = useRef<'maths' | 'legal-support'>('maths');
|
| 119 |
|
| 120 |
const [error, setError] = useState('');
|
| 121 |
const [loading, setLoading] = useState(false);
|
|
|
|
| 221 |
</button>
|
| 222 |
<button
|
| 223 |
type="button"
|
| 224 |
+
className={`login-mode-btn${assistantMode === 'maths' ? ' login-mode-btn--active' : ''}`}
|
| 225 |
onClick={() => {
|
| 226 |
+
assistantModeRef.current = 'maths';
|
| 227 |
+
setAssistantMode('maths');
|
| 228 |
}}
|
| 229 |
+
title="Math-focused mode"
|
| 230 |
>
|
| 231 |
+
Maths
|
| 232 |
</button>
|
| 233 |
</div>
|
| 234 |
</div>
|