fraudTech commited on
Commit
8351b7d
·
1 Parent(s): a65fb93

web enable/disable button

Browse files
Files changed (1) hide show
  1. web/src/App.tsx +13 -0
web/src/App.tsx CHANGED
@@ -799,6 +799,7 @@ function App() {
799
  const [statusMessage, setStatusMessage] = useState('');
800
  const [activeSymbolCategory, setActiveSymbolCategory] = useState('greek');
801
  const [showMathSymbols, setShowMathSymbols] = useState(false);
 
802
  const [selectedModel, setSelectedModel] = useState<string>('deepseek-reasoner');
803
  const [sidebarOpen, setSidebarOpen] = useState(true);
804
  const [conversations, setConversations] = useState<ConversationItem[]>([]);
@@ -951,6 +952,7 @@ function App() {
951
  body: JSON.stringify({
952
  message: currentInput,
953
  model: selectedModel,
 
954
  }),
955
  signal: abortControllerRef.current.signal,
956
  });
@@ -1767,6 +1769,17 @@ function App() {
1767
  disabled={isGenerating}
1768
  />
1769
  <div className="input-actions">
 
 
 
 
 
 
 
 
 
 
 
1770
  <button
1771
  onClick={() => setShowMathSymbols(!showMathSymbols)}
1772
  className={`action-icon-btn${showMathSymbols ? ' action-icon-btn--active' : ''}`}
 
799
  const [statusMessage, setStatusMessage] = useState('');
800
  const [activeSymbolCategory, setActiveSymbolCategory] = useState('greek');
801
  const [showMathSymbols, setShowMathSymbols] = useState(false);
802
+ const [webSearchEnabled, setWebSearchEnabled] = useState(true);
803
  const [selectedModel, setSelectedModel] = useState<string>('deepseek-reasoner');
804
  const [sidebarOpen, setSidebarOpen] = useState(true);
805
  const [conversations, setConversations] = useState<ConversationItem[]>([]);
 
952
  body: JSON.stringify({
953
  message: currentInput,
954
  model: selectedModel,
955
+ webSearchEnabled,
956
  }),
957
  signal: abortControllerRef.current.signal,
958
  });
 
1769
  disabled={isGenerating}
1770
  />
1771
  <div className="input-actions">
1772
+ <button
1773
+ onClick={() => setWebSearchEnabled(v => !v)}
1774
+ className={`action-icon-btn${webSearchEnabled ? ' action-icon-btn--active' : ''}`}
1775
+ title={webSearchEnabled ? 'Web search enabled (click to disable)' : 'Web search disabled (click to enable)'}
1776
+ >
1777
+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
1778
+ <circle cx="12" cy="12" r="10"/>
1779
+ <line x1="2" y1="12" x2="22" y2="12"/>
1780
+ <path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>
1781
+ </svg>
1782
+ </button>
1783
  <button
1784
  onClick={() => setShowMathSymbols(!showMathSymbols)}
1785
  className={`action-icon-btn${showMathSymbols ? ' action-icon-btn--active' : ''}`}