1 Commits

Author SHA1 Message Date
efa471aa2e 更新至 v0.2.0_20251225 版本 2025-12-25 16:39:44 +08:00
6 changed files with 340 additions and 72 deletions

66
App.tsx
View File

@@ -1,10 +1,11 @@
import React, { useState, useEffect, useRef, useCallback } from 'react';
import {
Settings, MessageSquare, Brain, Search, Image as ImageIcon,
Settings, Brain, Search, Image as ImageIcon,
Video, Mic, Send, Upload, Download, Copy, Share2,
Menu, X, Sun, Moon, Volume2, Globe, Trash2, Plus, Info,
PanelRight, PanelRightClose, History, Home as HomeIcon,
Sparkles, Layers, Sliders, MonitorDown, AlertTriangle
Sparkles, Layers, Sliders, MonitorDown, AlertTriangle,
Sigma, Cpu, Code, Box, Network, Bot, Binary
} from 'lucide-react';
import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
@@ -49,10 +50,20 @@ const Modal: React.FC<{ isOpen: boolean; onClose: () => void; title: string; chi
// Constants for UI
const SIDEBAR_GROUPS = [
{
title: 'group.learning',
title: 'group.cs',
modules: [
{ id: AppModule.MATH, icon: Sigma, label: 'module.math', desc: 'desc.math' },
{ id: AppModule.THEORY, icon: Binary, label: 'module.theory', desc: 'desc.theory' },
{ id: AppModule.PRINCIPLES, icon: Cpu, label: 'module.principles', desc: 'desc.principles' },
{ id: AppModule.SOFT_ENG, icon: Code, label: 'module.soft_eng', desc: 'desc.soft_eng' },
{ id: AppModule.GRAPHICS, icon: Box, label: 'module.graphics', desc: 'desc.graphics' },
{ id: AppModule.NETWORK, icon: Network, label: 'module.network', desc: 'desc.network' },
{ id: AppModule.AI_LAB, icon: Bot, label: 'module.ai_lab', desc: 'desc.ai_lab' },
]
},
{
title: 'group.tools',
modules: [
{ id: AppModule.TUTOR, icon: MessageSquare, label: 'module.tutor', desc: 'desc.tutor' },
{ id: AppModule.THINKER, icon: Brain, label: 'module.thinker', desc: 'desc.thinker' },
{ id: AppModule.RESEARCH, icon: Search, label: 'module.research', desc: 'desc.research' },
]
},
@@ -85,7 +96,7 @@ export default function App() {
});
const [currentSessionId, setCurrentSessionId] = useState<string | null>(null);
const [currentModule, setCurrentModule] = useState<AppModule>(AppModule.TUTOR);
const [currentModule, setCurrentModule] = useState<AppModule>(AppModule.MATH);
const [isHome, setIsHome] = useState(true);
const [inputText, setInputText] = useState('');
@@ -96,6 +107,9 @@ export default function App() {
const [isLoading, setIsLoading] = useState(false);
const [loadingText, setLoadingText] = useState('');
// Thinking Toggle State
const [isThinkingMode, setIsThinkingMode] = useState(false);
// PWA Install Prompt
const [installPrompt, setInstallPrompt] = useState<any>(null);
@@ -318,7 +332,7 @@ export default function App() {
role: MessageRole.MODEL,
timestamp: Date.now(),
text: '',
isThinking: currentModule === AppModule.THINKER
isThinking: isThinkingMode && !isCreativeModule(currentModule)
}]);
try {
@@ -336,7 +350,7 @@ export default function App() {
}]);
} else {
// Text/Chat Generation
if (currentModule === AppModule.THINKER) setLoadingText(t('status.thinking', settings.language));
if (isThinkingMode) setLoadingText(t('status.thinking', settings.language));
else setLoadingText(t('status.generating', settings.language));
// Prepare history for API
@@ -347,7 +361,8 @@ export default function App() {
return { role: m.role, parts };
});
const stream = await geminiRef.current!.generateText(inputText, currentModule, historyParts, attachments);
// Pass isThinkingMode to the service
const stream = await geminiRef.current!.generateText(inputText, currentModule, historyParts, attachments, isThinkingMode);
let fullText = '';
let sources: any[] = [];
@@ -363,7 +378,7 @@ export default function App() {
const lastMsg = msgs[msgs.length - 1];
if (lastMsg.id === botMsgId) {
lastMsg.text = fullText;
lastMsg.isThinking = false;
lastMsg.isThinking = false; // Turn off thinking indicator once text starts arriving (simplification)
}
return { ...s, messages: msgs };
}
@@ -572,8 +587,8 @@ export default function App() {
};
const renderHome = () => (
<div className="flex flex-col items-center min-h-full p-4 animate-fade-in">
<div className="max-w-4xl w-full my-auto py-10">
<div className="h-full w-full overflow-y-auto flex flex-col items-center p-4 animate-fade-in">
<div className="max-w-4xl w-full my-auto py-10 pb-24">
<div className="text-center mb-12 animate-slide-up">
<div className="bg-blue-100 dark:bg-blue-900/30 p-6 rounded-full inline-block mb-6 shadow-lg shadow-blue-500/20">
<Brain size={64} className="text-blue-600 dark:text-blue-400" />
@@ -954,11 +969,21 @@ export default function App() {
<div className="flex-1 flex items-center justify-center p-8 text-center text-gray-400">
<div className="animate-bounce-in">
<div className="w-16 h-16 bg-gray-100 dark:bg-slate-800 rounded-2xl flex items-center justify-center mx-auto mb-4">
{AppModule.TUTOR === currentModule && <MessageSquare size={32} />}
{AppModule.THINKER === currentModule && <Brain size={32} />}
{AppModule.MATH === currentModule && <Sigma size={32} />}
{AppModule.THEORY === currentModule && <Binary size={32} />}
{AppModule.PRINCIPLES === currentModule && <Cpu size={32} />}
{AppModule.SOFT_ENG === currentModule && <Code size={32} />}
{AppModule.GRAPHICS === currentModule && <Box size={32} />}
{AppModule.NETWORK === currentModule && <Network size={32} />}
{AppModule.AI_LAB === currentModule && <Bot size={32} />}
{AppModule.RESEARCH === currentModule && <Search size={32} />}
</div>
<p>{t('prompt.placeholder', settings.language)}</p>
<h3 className="text-xl font-semibold mb-2 text-gray-800 dark:text-gray-200">
{t(`hello.${currentModule}`, settings.language)}
</h3>
<p className="text-sm max-w-sm mx-auto">
{t(`desc.${currentModule}`, settings.language)}
</p>
</div>
</div>
) : (
@@ -996,6 +1021,15 @@ export default function App() {
<Plus size={20} />
</label>
</div>
{/* Deep Thinking Toggle */}
<button
onClick={() => setIsThinkingMode(!isThinkingMode)}
className={`p-2 rounded-lg transition-colors pb-3 ${isThinkingMode ? 'text-blue-600 bg-blue-100 dark:bg-blue-900/30' : 'text-gray-400 hover:bg-gray-200 dark:hover:bg-slate-700'}`}
title={t('action.toggle_think', settings.language)}
>
<Brain size={20} />
</button>
<textarea
value={inputText}
@@ -1006,7 +1040,7 @@ export default function App() {
handleSend();
}
}}
placeholder={t('prompt.placeholder', settings.language)}
placeholder={t(`placeholder.${currentModule}`, settings.language)}
className="flex-1 bg-transparent border-none outline-none resize-none max-h-32 py-3 text-sm"
rows={1}
/>

127
README.md
View File

@@ -1,20 +1,121 @@
<div align="center">
<img width="1200" height="475" alt="GHBanner" src="https://github.com/user-attachments/assets/0aa67016-6eaf-458a-adb2-6e31a0763ed6" />
</div>
# BitSage
# Run and deploy your AI Studio app
<p align="center">
<img src="public/icon.svg" alt="BitSage Logo" width="100" />
</p>
This contains everything you need to run your app locally.
BitSage is an intelligent AI companion designed specifically for learning Computer Science and Technology. It leverages advanced Gemini models to provide expert Q&A, deep reasoning, academic research, and multimedia generation capabilities.
View your app in AI Studio: https://ai.studio/apps/drive/1wH16LSTzg8m7RgPeCzYP99HiinOHmyij
---
## Run Locally
### 🌐 Language / 语言 / 言語
- [English](#english)
- [简体中文](#简体中文)
- [繁體中文](#繁體中文)
- [日本語](#日本語)
**Prerequisites:** Node.js
---
## <a id="english"></a>English
1. Install dependencies:
`npm install`
2. Set the `GEMINI_API_KEY` in [.env.local](.env.local) to your Gemini API key
3. Run the app:
`npm run dev`
### Features
1. **Specialized CS Domains**: Dedicated modules for Mathematics, Computer Principles, Software Engineering, Computer Graphics, Computer Networks, and Artificial Intelligence.
2. **Deep Thinking Mode**: A toggleable "Thinking" mode powered by Gemini's reasoning capabilities for complex problem solving.
3. **Academic Research**: Web-grounded search for finding up-to-date papers and technical documentation.
4. **Creative Studio**:
* **Vision Lab**: Generate diagrams or analyze code screenshots.
* **Video Studio**: Create concept videos using Veo.
* **Audio Lab**: Text-to-Speech and audio transcription.
5. **PWA Support**: Installable on PC and Mobile for a native app experience.
6. **Privacy Focused**: All API keys and chat history are stored locally in your browser.
### Getting Started
1. Open the application.
2. Click "Get Started" or the Settings icon.
3. Enter your Google Gemini API Key.
4. Select a module from the sidebar and start learning!
---
## <a id="简体中文"></a>简体中文
### 功能特性
1. **计算机科学细分领域**:包含数学基础、计算机组成原理、软件工程、图形学、网络和人工智能等专属模块。
2. **深度思考模式**:在对话框中可一键开启“深度思考”,利用 Gemini 的推理能力解决复杂算法或架构问题。
3. **学术搜索**:基于网络搜索的问答,适合查找最新的技术文档和学术论文。
4. **创意工作室**
* **视觉实验室**:生成技术架构图或分析代码截图。
* **视频工作室**:使用 Veo 模型生成概念演示视频。
* **音频实验室**:文字转语音及音频转录。
5. **PWA 支持**:支持在 PC 和手机端安装,提供原生应用般的体验。
6. **隐私保护**:所有的 API Key 和聊天记录仅保存在您的浏览器本地。
### 快速开始
1. 打开应用。
2. 点击“开始体验”或设置图标。
3. 输入您的 Google Gemini API Key。
4. 在左侧栏选择一个模块,开始您的学习之旅!
---
## <a id="繁體中文"></a>繁體中文
### 功能特性
1. **計算機科學細分領域**:包含數學基礎、計算機組成原理、軟體工程、圖形學、網路和人工智慧等專屬模組。
2. **深度思考模式**:在對話框中可一鍵開啟「深度思考」,利用 Gemini 的推理能力解決複雜演算法或架構問題。
3. **學術搜尋**:基於網路搜尋的問答,適合尋找最新的技術文件和學術論文。
4. **創意工作室**
* **視覺實驗室**:生成技術架構圖或分析程式碼截圖。
* **影片工作室**:使用 Veo 模型生成概念演示影片。
* **音訊實驗室**:文字轉語音及音訊轉錄。
5. **PWA 支援**:支援在 PC 和手機端安裝,提供原生應用般的體驗。
6. **隱私保護**:所有的 API Key 和聊天記錄僅保存在您的瀏覽器本地。
### 快速開始
1. 打開應用。
2. 點擊「開始體驗」或設定圖示。
3. 輸入您的 Google Gemini API Key。
4. 在左側欄選擇一個模組,開始您的學習之旅!
---
## <a id="日本語"></a>日本語
### 機能
1. **CS専門分野**: 数学基礎、計算機原理、ソフトウェア工学、CG、ネットワーク、AIラボなど、分野ごとの専用モジュール。
2. **深い思考モード**: 会話画面で「深い思考」をオンにすると、Geminiの推論能力を使って複雑な問題を解決できます。
3. **学術検索**: 最新の技術文書や論文を見つけるためのWeb検索機能。
4. **クリエイティブスタジオ**:
* **ビジョンラボ**: 図の生成やコードのスクリーンショット分析。
* **ビデオスタジオ**: Veoモデルを使用したコンセプトビデオの生成。
* **オーディオラボ**: テキスト読み上げと音声文字起こし。
5. **PWA対応**: PCやモバイルにインストールして、ネイティブアプリのように使用できます。
6. **プライバシー重視**: APIキーとチャット履歴はブラウザにローカル保存されます。
### 始め方
1. アプリを開きます。
2. 「始める」または設定アイコンをクリックします。
3. Google Gemini APIキーを入力します。
4. サイドバーからモジュールを選択して、学習を始めましょう!
---
## Tech Stack / 技术栈
* React 18 + TypeScript
* Vite
* Tailwind CSS
* Google GenAI SDK (Gemini 2.5/3.0 Models)
* Lucide React Icons
## License
MIT

Binary file not shown.

View File

@@ -34,26 +34,14 @@ export class GeminiService {
prompt: string,
module: AppModule,
history: {role: string, parts: any[]}[],
media?: { data: string, mimeType: string }[]
media?: { data: string, mimeType: string }[],
enableThinking: boolean = false
) {
const ai = this.getClient();
let model = MODEL_CHAT_PRO;
let config: any = {};
switch (module) {
case AppModule.TUTOR:
// Use fast model for simple queries if possible, but user wants options.
// We default to Pro for quality in Tutor, but could swap.
// Requirement says: "Use Pro for complex tasks and Flash or Flash-Lite for tasks that should happen fast."
// We'll stick to Pro for general "Tutor" advice as it implies teaching.
model = MODEL_CHAT_PRO;
break;
case AppModule.THINKER:
model = MODEL_CHAT_PRO;
config.thinkingConfig = { thinkingBudget: 32768 };
// config.maxOutputTokens should NOT be set when using max thinking budget if not careful,
// but recommendation says: "Avoid setting this if not required".
break;
case AppModule.RESEARCH:
model = MODEL_RESEARCH;
config.tools = [{ googleSearch: {} }];
@@ -67,6 +55,14 @@ export class GeminiService {
case AppModule.AUDIO:
model = MODEL_AUDIO_TRANS; // For transcription/analysis
break;
default:
// Math, Principles, SoftEng, Graphics, Network, AI_LAB
// Use Pro for these complex domains
model = MODEL_CHAT_PRO;
if (enableThinking) {
config.thinkingConfig = { thinkingBudget: 32768 };
}
break;
}
// Build contents

View File

@@ -4,22 +4,55 @@ const translations: Record<Language, Record<string, string>> = {
'en': {
'app.name': 'BitSage',
'menu.home': 'Home',
'group.learning': 'Learning & Research',
'group.cs': 'Computer Science Domains',
'group.tools': 'Research Tools',
'group.creation': 'Creative Studio',
'module.tutor': 'CS Tutor',
'module.thinker': 'Deep Thinker',
'module.research': 'Research',
'module.math': 'Mathematics',
'module.theory': 'Theory of Computation',
'module.principles': 'Comp. Architecture',
'module.soft_eng': 'Software Eng.',
'module.graphics': 'Comp. Graphics',
'module.network': 'Comp. Network',
'module.ai_lab': 'AI Laboratory',
'module.research': 'Academic Search',
'module.vision': 'Vision Lab',
'module.studio': 'Video Studio',
'module.audio': 'Audio Lab',
'desc.tutor': 'Expert Q&A and coding help',
'desc.thinker': 'Deep reasoning for complex problems',
'desc.math': 'Discrete math, calculus & logic',
'desc.theory': 'Automata, computability & complexity',
'desc.principles': 'ISA, pipelining & memory hierarchy',
'desc.soft_eng': 'Design patterns & DevOps',
'desc.graphics': 'Rendering, OpenGL & WebGL',
'desc.network': 'Protocols, security & distributed systems',
'desc.ai_lab': 'ML, DL & Neural Networks',
'desc.research': 'Web-grounded academic research',
'desc.vision': 'Image analysis and generation',
'desc.studio': 'AI video generation studio',
'desc.audio': 'Speech-to-text and Text-to-speech',
// Module specific greetings
'hello.math': 'Mathematics Workspace',
'hello.theory': 'Theoretical Computer Science',
'hello.principles': 'Computer Architecture',
'hello.soft_eng': 'Software Engineering',
'hello.graphics': 'Graphics & Rendering',
'hello.network': 'Network Engineering',
'hello.ai_lab': 'AI & Machine Learning',
'hello.research': 'Academic Research',
// Module specific placeholders
'placeholder.math': 'Ask about discrete math, linear algebra, or proofs...',
'placeholder.theory': 'Ask about Turing machines, P vs NP, or automata...',
'placeholder.principles': 'Ask about RISC-V, cache coherence, or digital logic...',
'placeholder.soft_eng': 'Ask about design patterns, agile, or system architecture...',
'placeholder.graphics': 'Ask about ray tracing, shaders, or WebGL...',
'placeholder.network': 'Ask about TCP/IP, OSI model, or network security...',
'placeholder.ai_lab': 'Ask about transformers, backpropagation, or PyTorch...',
'placeholder.research': 'Search for papers, technical docs, or citations...',
'welcome.title': 'Welcome to BitSage',
'welcome.subtitle': 'Your AI companion for Computer Science & Technology.',
'welcome.setup': 'Please enter your Gemini API Key to get started.',
@@ -42,11 +75,12 @@ const translations: Record<Language, Record<string, string>> = {
'action.generate': 'Generate',
'action.new_chat': 'New Chat',
'action.install': 'Install App',
'action.toggle_think': 'Deep Thinking Mode',
'history.title': 'History',
'history.empty': 'No history for this module.',
'prompt.placeholder': 'Ask me anything about CS...',
'prompt.placeholder': 'Ask me anything about this domain...',
'status.thinking': 'Thinking deeply...',
'status.generating': 'Generating...',
'status.recording': 'Recording...',
@@ -71,7 +105,6 @@ const translations: Record<Language, Record<string, string>> = {
'audio.prompt': 'Enter text to generate speech...',
'btn.start': 'Get Started',
// New Creative Guide Strings
'guide.vision.title': 'Vision Lab',
'guide.vision.desc': 'Generate high-quality images from text or analyze uploaded images for code and diagrams.',
'guide.vision.tip1': 'Describe the scene, style, and lighting in detail.',
@@ -94,22 +127,53 @@ const translations: Record<Language, Record<string, string>> = {
'zh-CN': {
'app.name': '比特智者',
'menu.home': '首页',
'group.learning': '学习与研究',
'group.cs': '计算机科学领域',
'group.tools': '研究工具',
'group.creation': '创意工作室',
'module.tutor': 'CS 导师',
'module.thinker': '深度思考',
'module.math': '数学基础',
'module.theory': '计算理论',
'module.principles': '计算机体系结构',
'module.soft_eng': '软件工程',
'module.graphics': '计算机图形学',
'module.network': '计算机网络',
'module.ai_lab': '人工智能',
'module.research': '学术搜索',
'module.vision': '视觉实验室',
'module.studio': '视频工作室',
'module.audio': '音频实验室',
'desc.tutor': '专家级问答与代码辅助',
'desc.thinker': '针对复杂问题的深度推理',
'desc.math': '离散数学、微积分与逻辑',
'desc.theory': '自动机、可计算性与复杂性',
'desc.principles': '指令集、流水线与存储层次',
'desc.soft_eng': '设计模式与 DevOps',
'desc.graphics': '渲染、OpenGL 与 WebGL',
'desc.network': '协议、安全与分布式系统',
'desc.ai_lab': '机器学习、深度学习与神经网络',
'desc.research': '基于网络的学术研究',
'desc.vision': '图像分析与生成',
'desc.studio': 'AI 视频生成工作室',
'desc.audio': '语音转文字与文字转语音',
'hello.math': 'CS 数学基础',
'hello.theory': '计算机理论基础',
'hello.principles': '计算机体系结构',
'hello.soft_eng': '软件工程与架构',
'hello.graphics': '图形学与渲染',
'hello.network': '网络工程与安全',
'hello.ai_lab': 'AI 与深度学习',
'hello.research': '学术研究助手',
'placeholder.math': '询问关于离散数学、线性代数或证明的问题...',
'placeholder.theory': '询问关于图灵机、P vs NP 或有限自动机...',
'placeholder.principles': '询问关于RISC-V、缓存一致性或数字逻辑...',
'placeholder.soft_eng': '询问关于设计模式、敏捷开发或系统架构...',
'placeholder.graphics': '询问关于光线追踪、着色器或WebGL...',
'placeholder.network': '询问关于TCP/IP、OSI模型或网络安全...',
'placeholder.ai_lab': '询问关于Transformer、反向传播或PyTorch...',
'placeholder.research': '搜索论文、技术文档或引用...',
'welcome.title': '欢迎使用比特智者',
'welcome.subtitle': '您的计算机科学与技术学习 AI 助手。',
'welcome.setup': '请输入您的 Gemini API Key 以开始使用。',
@@ -132,11 +196,12 @@ const translations: Record<Language, Record<string, string>> = {
'action.generate': '生成',
'action.new_chat': '新会话',
'action.install': '安装应用',
'action.toggle_think': '深度思考模式',
'history.title': '历史记录',
'history.empty': '暂无该模块的历史记录',
'prompt.placeholder': '问我任何关于计算机科学的问题...',
'prompt.placeholder': '在此领域提问...',
'status.thinking': '深度思考中...',
'status.generating': '生成中...',
'status.recording': '录音中...',
@@ -183,22 +248,52 @@ const translations: Record<Language, Record<string, string>> = {
'ja': {
'app.name': 'BitSage',
'menu.home': 'ホーム',
'group.learning': '学習と研究',
'group.cs': 'コンピュータサイエンス分野',
'group.tools': '研究ツール',
'group.creation': 'クリエイティブスタジオ',
'module.tutor': 'CS 講師',
'module.thinker': '深い思考',
'module.research': '研究',
'module.math': '数学基礎',
'module.theory': '計算理論',
'module.principles': 'コンピュータ・アーキテクチャ',
'module.soft_eng': 'ソフトウェア工学',
'module.graphics': 'CG・グラフィックス',
'module.network': 'コンピュータネットワーク',
'module.ai_lab': '人工知能ラボ',
'module.research': '学術検索',
'module.vision': 'ビジョンラボ',
'module.studio': 'ビデオスタジオ',
'module.audio': 'オーディオラボ',
'desc.tutor': '専門的なQ&Aとコーディング支援',
'desc.thinker': '複雑な問題に対する深い推論',
'desc.math': '離散数学、微積分、論理学',
'desc.theory': 'オートマトン、計算可能性、複雑性',
'desc.principles': '命令セット、パイプライン、メモリ階層',
'desc.soft_eng': 'デザインパターン、DevOps',
'desc.graphics': 'レンダリング、OpenGL、WebGL',
'desc.network': 'プロトコル、セキュリティ、分散システム',
'desc.ai_lab': '機械学習、深層学習、ニューラルネットワーク',
'desc.research': 'Webに基づく学術研究',
'desc.vision': '画像分析と生成',
'desc.studio': 'AIビデオ生成スタジオ',
'desc.audio': '音声認識と音声合成',
'hello.math': 'CS 数学',
'hello.theory': '計算機科学の理論',
'hello.principles': 'コンピュータ・アーキテクチャ',
'hello.soft_eng': 'CG & レンダリング',
'hello.graphics': 'CG & レンダリング',
'hello.network': 'ネットワーク工学',
'hello.ai_lab': 'AI & 機械学習',
'hello.research': '学術研究アシスタント',
'placeholder.math': '離散数学、線形代数、証明について質問する...',
'placeholder.theory': 'チューリングマシン、P vs NP、有限オートマトンについて質問する...',
'placeholder.principles': 'RISC-V、キャッシュコヒーレンス、デジタル論理について質問する...',
'placeholder.soft_eng': 'デザインパターン、アジャイル、システムアーキテクチャについて質問する...',
'placeholder.graphics': 'レイトレーシング、シェーダー、WebGLについて質問する...',
'placeholder.network': 'TCP/IP、OSIモデル、ネットワークセキュリティについて質問する...',
'placeholder.ai_lab': 'Transformer、バックプロパゲーション、PyTorchについて質問する...',
'placeholder.research': '論文、技術文書、引用を検索...',
'welcome.title': 'BitSageへようこそ',
'welcome.subtitle': 'コンピュータサイエンス学習のためのAIパートナー。',
'welcome.setup': '開始するにはGemini APIキーを入力してください。',
@@ -221,11 +316,12 @@ const translations: Record<Language, Record<string, string>> = {
'action.generate': '生成',
'action.new_chat': '新しいチャット',
'action.install': 'アプリをインストール',
'action.toggle_think': '深い思考モード',
'history.title': '履歴',
'history.empty': 'このモジュールの履歴はありません。',
'prompt.placeholder': 'CSについて何でも聞いてください...',
'prompt.placeholder': 'この分野について質問してください...',
'status.thinking': '深く考えています...',
'status.generating': '生成中...',
'status.recording': '録音中...',
@@ -272,22 +368,52 @@ const translations: Record<Language, Record<string, string>> = {
'zh-TW': {
'app.name': '比特智者',
'menu.home': '首頁',
'group.learning': '學習與研究',
'group.cs': '計算機科學領域',
'group.tools': '研究工具',
'group.creation': '創意工作室',
'module.tutor': 'CS 導師',
'module.thinker': '深度思考',
'module.math': '數學基礎',
'module.theory': '計算理論',
'module.principles': '電腦體系結構',
'module.soft_eng': '軟體工程',
'module.graphics': '計算機圖形學',
'module.network': '計算機網路',
'module.ai_lab': '人工智慧',
'module.research': '學術搜尋',
'module.vision': '視覺實驗室',
'module.studio': '影片工作室',
'module.audio': '音訊實驗室',
'desc.tutor': '專家級問答與程式碼輔助',
'desc.thinker': '針對複雜問題的深度推理',
'desc.math': '離散數學、微積分與邏輯',
'desc.theory': '自動機、可計算性與複雜性',
'desc.principles': '指令集、管線化與儲存層次',
'desc.soft_eng': '設計模式與 DevOps',
'desc.graphics': '渲染、OpenGL 與 WebGL',
'desc.network': '通訊協定、資安與分散式系統',
'desc.ai_lab': '機器學習、深度學習與神經網路',
'desc.research': '基於網路的學術研究',
'desc.vision': '圖像分析與生成',
'desc.studio': 'AI 影片生成工作室',
'desc.audio': '語音轉文字與文字轉語音',
'hello.math': 'CS 數學基礎',
'hello.theory': '電腦理論基礎',
'hello.principles': '電腦體系結構',
'hello.soft_eng': '軟體工程與架構',
'hello.graphics': '圖形學與渲染',
'hello.network': '網路工程與資安',
'hello.ai_lab': 'AI 與深度學習',
'hello.research': '學術研究助手',
'placeholder.math': '詢問關於離散數學、線性代數或證明的問題...',
'placeholder.theory': '詢問關於圖靈機、P vs NP 或有限自動機...',
'placeholder.principles': '詢問關於RISC-V、快取一致性或數位邏輯...',
'placeholder.soft_eng': '詢問關於設計模式、敏捷開發或系統架構...',
'placeholder.graphics': '詢問關於光線追蹤、著色器或WebGL...',
'placeholder.network': '詢問關於TCP/IP、OSI模型或網路安全...',
'placeholder.ai_lab': '詢問關於Transformer、反向傳播或PyTorch...',
'placeholder.research': '搜尋論文、技術文件或引用...',
'welcome.title': '歡迎使用比特智者',
'welcome.subtitle': '您的計算機科學與技術學習 AI 助手。',
'welcome.setup': '請輸入您的 Gemini API Key 以開始使用。',
@@ -310,11 +436,12 @@ const translations: Record<Language, Record<string, string>> = {
'action.generate': '生成',
'action.new_chat': '新對話',
'action.install': '安裝應用',
'action.toggle_think': '深度思考模式',
'history.title': '歷史記錄',
'history.empty': '暫無該模組的歷史記錄',
'prompt.placeholder': '問我任何關於計算機科學的問題...',
'prompt.placeholder': '在此領域提問...',
'status.thinking': '深度思考中...',
'status.generating': '生成中...',
'status.recording': '錄音中...',

View File

@@ -1,7 +1,17 @@
export enum AppModule {
TUTOR = 'tutor', // Q&A
THINKER = 'thinker', // Deep Thinking
// CS Domains
MATH = 'math', // Mathematics
THEORY = 'theory', // Theory of Computation
PRINCIPLES = 'principles', // Computer Architecture (formerly Principles)
SOFT_ENG = 'soft_eng', // Software Engineering
GRAPHICS = 'graphics', // Computer Graphics
NETWORK = 'network', // Computer Networks
AI_LAB = 'ai_lab', // Artificial Intelligence
// Tools
RESEARCH = 'research', // Search Grounding
// Creative
VISION = 'vision', // Image Gen & Analysis
STUDIO = 'studio', // Video Gen & Analysis
AUDIO = 'audio' // TTS & Transcribe