Datasets:

text
stringlengths
367
5.14M
id
stringlengths
19
24
metadata
dict
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("APlayer",[],t):"object"==typeof exports?exports.APlayer=t():e.APlayer=t()}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,export...
train_000.parquet/200
{ "file_path": "themes/bluf/static/js/APlayer.min.js", "repo_id": "0000cd/wolf-set", "size": 59325, "token_count": 27320 }
import React, { useState, useEffect } from 'react'; import { invoke } from '@tauri-apps/api/core'; import { ProblemCard, SearchRequest, SearchResult, CreateCardRequest, GraphConfig, Recommendation, RecommendationRequest, Tag } from '../types/cogni-graph'; import GraphVisualization from './GraphVis...
train_000.parquet/201
{ "file_path": "src/components/KnowledgeGraphManagement.tsx", "repo_id": "000haoji/deep-student", "size": 16604, "token_count": 5180 }
var JSConfetti=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,i,n){ret...
train_000.parquet/202
{ "file_path": "themes/bluf/static/js/js-confetti.js", "repo_id": "0000cd/wolf-set", "size": 6469, "token_count": 2872 }
import React, { useState, useEffect } from 'react'; import { ReviewSessionTask, MistakeConsolidationData, ConsolidatedMistakeData } from '../types/index'; import type { MistakeItem } from '../utils/tauriApi'; import { useNotification } from '../hooks/useNotification'; import { TauriAPI } from '../utils/tauriApi'; impor...
train_000.parquet/203
{ "file_path": "src/components/CreateReviewAnalysisView.tsx", "repo_id": "000haoji/deep-student", "size": 46167, "token_count": 17533 }
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).GLightbox=t()}(this,(function(){"use strict";function e(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t...
train_000.parquet/204
{ "file_path": "themes/bluf/static/js/glightbox.min.js", "repo_id": "0000cd/wolf-set", "size": 56300, "token_count": 25286 }
.aplayer{background:#fff;font-family:Arial,Helvetica,sans-serif;margin:5px;box-shadow:0 2px 2px 0 rgba(0,0,0,.07),0 1px 5px 0 rgba(0,0,0,.1);border-radius:2px;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:normal;position:relative}.aplayer *{box-sizing:c...
train_000.parquet/205
{ "file_path": "themes/bluf/static/css/APlayer.min.css", "repo_id": "0000cd/wolf-set", "size": 12528, "token_count": 5027 }
import React, { useState, useRef, useEffect } from 'react'; import { invoke } from '@tauri-apps/api/core'; import { listen } from '@tauri-apps/api/event'; import { AnkiCard, AnkiGenerationOptions, AnkiCardTemplate, CustomAnkiTemplate, CreateTemplateRequest, FieldExtractionRule, FieldType } from '../type...
train_000.parquet/206
{ "file_path": "src/components/AnkiCardGeneration.tsx", "repo_id": "000haoji/deep-student", "size": 58557, "token_count": 20558 }
#ifdef __has_include #if __has_include("lvgl.h") #ifndef LV_LVGL_H_INCLUDE_SIMPLE #define LV_LVGL_H_INCLUDE_SIMPLE #endif #endif #endif #if defined(LV_LVGL_H_INCLUDE_SIMPLE) #include "lvgl.h" #else #include "lvgl/lvgl.h" #endif #ifndef LV_ATTRIBUTE_MEM_ALIGN #define LV_ATT...
train_000.parquet/207
{ "file_path": "main/ui_resources/notes.c", "repo_id": "0015/StickiNote", "size": 1181912, "token_count": 1126009 }
.modern-select { position: relative; font-size: 0.9rem; user-select: none; } .modern-select.full-width { width: 100%; } .select-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 1rem; border: 2px solid #e2e8f0; border-radiu...
train_000.parquet/208
{ "file_path": "src/components/ModernSelect.css", "repo_id": "000haoji/deep-student", "size": 1644, "token_count": 821 }
.glightbox-container{width:100%;height:100%;position:fixed;top:0;left:0;z-index:999999!important;overflow:hidden;-ms-touch-action:none;touch-action:none;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;...
train_000.parquet/209
{ "file_path": "themes/bluf/static/css/glightbox.min.css", "repo_id": "0000cd/wolf-set", "size": 13749, "token_count": 5813 }
// Isotope let buttonFilters = {}; // Update all buttons matching the filter function updateButtons(filterValue, isAdd) { // Select all buttons that match the filter value const buttons = document.querySelectorAll(`.filter-btn[data-filter="${filterValue}"]`); // Update class for all matching buttons bu...
train_000.parquet/210
{ "file_path": "themes/bluf/assets/js/script.new.js", "repo_id": "0000cd/wolf-set", "size": 10402, "token_count": 3315 }
:root { --primary-color: {{ .Site.Params.lightColor }}; --text-color: #020617; --text-secondary: #52525b; --bg-primary: #f3f4f6; --bg-primary-top: #f3f4f6E6; --cards-white: #fafafa; --shadow-color: rgba(0, 0, 0, 0.1); } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"...
train_000.parquet/211
{ "file_path": "themes/bluf/assets/css/style.css", "repo_id": "0000cd/wolf-set", "size": 9361, "token_count": 4183 }
/* 增强知识库管理样式 */ .knowledge-base-management { padding: 20px; max-width: 1400px; margin: 0 auto; background: #f8fafc; min-height: 100vh; } /* 头部样式 */ .management-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 20px; background: white; bor...
train_000.parquet/212
{ "file_path": "src/components/EnhancedKnowledgeBaseManagement.css", "repo_id": "000haoji/deep-student", "size": 8404, "token_count": 4349 }
.graph-visualization-container { display: flex; flex-direction: column; height: 100%; padding: 20px; background: #f8f9fa; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); } .graph-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padd...
train_000.parquet/213
{ "file_path": "src/components/GraphVisualization.css", "repo_id": "000haoji/deep-student", "size": 4899, "token_count": 2380 }
import React from 'react'; import '../styles/modern-sidebar.css'; import { FileText, Layers, Target, BookOpen, Brain, Search, CreditCard, Palette, Image, BarChart3, Package, Settings, FlaskConical, ChevronLeft, ChevronRight, Network } from 'lucide-react'; type CurrentView = 'analysis' |...
train_000.parquet/214
{ "file_path": "src/components/ModernSidebar.tsx", "repo_id": "000haoji/deep-student", "size": 4684, "token_count": 1720 }
<!DOCTYPE html> <html lang="{{ .Site.LanguageCode }}"> <head> {{ partial "head.html" . }} <title>{{ .Title }} - {{ .Site.Title }}</title> </head> <body> <div class="top-bar"> <div class="top-bar-inner" style="width: 80%;"> <div class="top-bar-title"> <a href="...
train_000.parquet/215
{ "file_path": "themes/bluf/layouts/_default/single.html", "repo_id": "0000cd/wolf-set", "size": 1736, "token_count": 607 }
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Meting Music</title> <meta name="robots" content="noindex, nofollow"> <link rel="stylesheet" href="/css/APlayer.min.css"> <script src="/js/APlayer.min.js"></script> <script src="/js/Meting.min.js"></script>...
train_000.parquet/216
{ "file_path": "themes/bluf/layouts/_default/met.html", "repo_id": "0000cd/wolf-set", "size": 2917, "token_count": 819 }
{{- $hex := . -}} {{- if eq (substr $hex 0 1) "#" -}} {{/* 检查是否以 "#" 开头 */}} {{- $hex = substr $hex 1 -}} {{/* 去掉 "#" */}} {{- end -}} {{/* 将 HEX 转换为 RGB */}} {{- $r := printf "0x%s" (substr $hex 0 2) | int -}} {{- $g := printf "0x%s" (substr $hex 2 2) | int -}} {{- $b := printf "0x%s" (substr $hex 4 2) | int...
train_000.parquet/217
{ "file_path": "themes/bluf/layouts/partials/getColorCategory.html", "repo_id": "0000cd/wolf-set", "size": 2132, "token_count": 1118 }
import React, { useState, useEffect, useCallback } from 'react'; import { TauriAPI } from '../utils/tauriApi'; import { useNotification } from '../hooks/useNotification'; import type { RagDocument, KnowledgeBaseStatusPayload, RagProcessingEvent, RagDocumentStatusEvent } from '../types'; import { listen } f...
train_000.parquet/218
{ "file_path": "src/components/KnowledgeBaseManagement.tsx", "repo_id": "000haoji/deep-student", "size": 37889, "token_count": 13309 }
import React, { useState, useEffect } from 'react'; import { invoke } from '@tauri-apps/api/core'; import { Tag, TagType, CreateTagRequest, TagHierarchy } from '../types/cogni-graph'; import './TagManagement.css'; interface TagManagementProps { isInitialized: boolean; } const TagManagement: React.FC<Ta...
train_000.parquet/219
{ "file_path": "src/components/TagManagement.tsx", "repo_id": "000haoji/deep-student", "size": 9811, "token_count": 3146 }
<meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="author" content="{{ .Site.Params.author }}"> <meta name="template" content="bluf"> <meta name="theme-color" content="#0000cd"> <meta name="license" content="{{ .Site.Params.license }}"> <link rel="apple-touch-icon...
train_000.parquet/220
{ "file_path": "themes/bluf/layouts/partials/head.html", "repo_id": "0000cd/wolf-set", "size": 1667, "token_count": 628 }
.anki-card-generation { padding: 20px; max-width: 1400px; margin: 0 auto; background: #f8fafc; min-height: 100vh; } /* 文档处理状态样式 */ .document-processing-status { background: white; padding: 20px; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); border-left: 4px s...
train_000.parquet/221
{ "file_path": "src/components/AnkiCardGeneration.css", "repo_id": "000haoji/deep-student", "size": 19032, "token_count": 9690 }
import { useState, useEffect } from 'react'; import { TauriAPI } from '../utils/tauriApi'; interface DataStatsProps { className?: string; } export const DataStats: React.FC<DataStatsProps> = ({ className }) => { const [mistakeCount, setMistakeCount] = useState(0); const [loading, setLoading] = useState(true); ...
train_000.parquet/222
{ "file_path": "src/components/DataStats.tsx", "repo_id": "000haoji/deep-student", "size": 1224, "token_count": 437 }
import React, { useState } from 'react'; import { TauriAPI } from '../utils/tauriApi'; import { DataStats } from './DataStats'; import { Upload, Download, BarChart3, AlertTriangle, Trash2, Lightbulb, FileText, Calendar, HardDrive, Settings } from 'lucide-react'; interface DataImportExportProps { onClose?: () => void...
train_000.parquet/223
{ "file_path": "src/components/DataImportExport.tsx", "repo_id": "000haoji/deep-student", "size": 38208, "token_count": 13316 }
/* UnifiedAnalysisView 组件样式 */ .unified-analysis-loading { display: flex; justify-content: center; align-items: center; min-height: 400px; } .loading-spinner { font-size: 1.1rem; color: #6c757d; } .unified-analysis-error { display: flex; flex-direction: column; justify-content: center; align-item...
train_000.parquet/224
{ "file_path": "src/components/UnifiedAnalysisView.css", "repo_id": "000haoji/deep-student", "size": 6505, "token_count": 3167 }
import { useState, useEffect } from 'react'; interface ImageViewerProps { images: string[]; currentIndex: number; isOpen: boolean; onClose: () => void; onNext?: () => void; onPrev?: () => void; } export const ImageViewer: React.FC<ImageViewerProps> = ({ images, currentIndex, isOpen, onClose, onN...
train_000.parquet/225
{ "file_path": "src/components/ImageViewer.tsx", "repo_id": "000haoji/deep-student", "size": 6130, "token_count": 2130 }
import { useState, useEffect, useCallback, useRef } from 'react'; import { MessageWithThinking } from '../chat-core'; import { ImageViewer } from './ImageViewer'; import { ChatMessage, AnalysisResponse, ContinueChatResponse } from '../types/index'; // 移除不再使用的streamHandler import import { TauriAPI } from '../u...
train_000.parquet/226
{ "file_path": "src/components/UniversalAppChatHost.tsx", "repo_id": "000haoji/deep-student", "size": 93037, "token_count": 33998 }
/** * Custom hook for managing system settings * Extracted from Settings component to reduce complexity */ import { useState, useEffect, useCallback } from 'react'; import { invoke as tauriInvoke } from '@tauri-apps/api/core'; // 系统设置接口 export interface SystemSettings { autoSave: boolean; theme: string; lang...
train_000.parquet/227
{ "file_path": "src/hooks/useSystemSettings.ts", "repo_id": "000haoji/deep-student", "size": 6153, "token_count": 2234 }
/** * Custom hook for managing notifications and messages * Extracted from various components to reduce complexity */ import { useState, useCallback, useRef, useEffect } from 'react'; export interface NotificationMessage { id: string; type: 'success' | 'error' | 'warning' | 'info'; title?: string; text: st...
train_000.parquet/228
{ "file_path": "src/hooks/useNotification.ts", "repo_id": "000haoji/deep-student", "size": 5277, "token_count": 1815 }
/** * Custom hook for managing API configurations * Extracted from Settings component to reduce complexity */ import { useState, useEffect, useCallback } from 'react'; import { invoke as tauriInvoke } from '@tauri-apps/api/core'; // API配置接口 export interface ApiConfig { id: string; name: string; apiKey: strin...
train_000.parquet/229
{ "file_path": "src/hooks/useApiConfig.ts", "repo_id": "000haoji/deep-student", "size": 7273, "token_count": 2618 }
declare module 'neovis.js' { export interface Neo4jConfig { serverUrl: string; serverUser: string; serverPassword: string; serverDatabase?: string; driverConfig?: { encrypted?: string; trust?: string; }; } export interface NeovisConfig { containerId: string; neo4j: Neo...
train_000.parquet/230
{ "file_path": "src/types/neovis.d.ts", "repo_id": "000haoji/deep-student", "size": 1715, "token_count": 578 }
export interface ProblemCard { id: string; content_problem: string; content_insight: string; status: 'unsolved' | 'solved'; embedding?: number[]; created_at: string; last_accessed_at: string; access_count: number; source_excalidraw_path?: string; } export interface Tag { id: string; name: string;...
train_000.parquet/231
{ "file_path": "src/types/cogni-graph.ts", "repo_id": "000haoji/deep-student", "size": 3357, "token_count": 1195 }
/** * Unified Type Definitions * * Consolidates all TypeScript interfaces and types used throughout the application * to improve maintainability and consistency. */ // ============================================================================ // Core Data Models (matching backend Rust structs) // =============...
train_000.parquet/232
{ "file_path": "src/types/index.ts", "repo_id": "000haoji/deep-student", "size": 24458, "token_count": 8159 }
import { listen } from '@tauri-apps/api/event'; export interface StreamChunk { content: string; is_complete: boolean; chunk_id: string; } export class StreamHandler { private listeners: Map<string, (chunk: StreamChunk) => void> = new Map(); private unlistenFunctions: Map<string, () => void> = new Map(); ...
train_000.parquet/233
{ "file_path": "src/utils/streamHandler.ts", "repo_id": "000haoji/deep-student", "size": 2365, "token_count": 908 }
/** * Chat Message Converter * * Utilities for converting between different chat message formats. * Single responsibility: Message format conversion. */ export interface ChatMessage { id: string; role: 'user' | 'assistant' | 'system'; content: string; thinking_content?: string; timestamp?: string; } e...
train_000.parquet/234
{ "file_path": "src/utils/chatMessageConverter.ts", "repo_id": "000haoji/deep-student", "size": 1983, "token_count": 637 }
/** * Simplified API Adapter * * Replaces the complex aiSdkAdapter.ts with a simpler implementation * that leverages the unified stream handler. */ import { invoke } from '@tauri-apps/api/core'; import { unifiedStreamHandler, StreamRequest, StreamOptions, StreamMessage as _StreamMessage } from './unifiedStreamHa...
train_000.parquet/235
{ "file_path": "src/utils/simplifiedApiAdapter.ts", "repo_id": "000haoji/deep-student", "size": 5384, "token_count": 1772 }
/** * 调试日志记录模块 * 用于追踪RAG内容显示、聊天记录保存、聊天记录串号等关键问题 */ import { invoke } from '@tauri-apps/api/core'; export type LogLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'TRACE'; export interface LogEntry { timestamp: string; level: LogLevel; module: string; operation: string; data: any; context?: { userId?:...
train_000.parquet/236
{ "file_path": "src/utils/debugLogger.ts", "repo_id": "000haoji/deep-student", "size": 11423, "token_count": 4147 }
/** * AI SDK Adapter for Tauri Backend * * Simplified adapter focused on AI SDK integration. * Uses separated modules for stream handling and API communication. */ import { createAnalysisStream, createChatStream } from './tauriStreamAdapter'; import { tauriApiClient } from './tauriApiClient'; import { convertToT...
train_000.parquet/237
{ "file_path": "src/utils/aiSdkAdapter.ts", "repo_id": "000haoji/deep-student", "size": 3037, "token_count": 993 }
// Tauri API调用模块 - 真实的后端API调用 import { invoke } from '@tauri-apps/api/core'; import { MistakeItem, ChatMessage, RagSourceInfo } from '../types'; // 重新导出类型以保持兼容性 export type { MistakeItem, ChatMessage, RagSourceInfo }; // 回顾分析相关类型 - 复用错题分析结构 export interface ReviewAnalysisItem { id: string; name: string; subject...
train_000.parquet/238
{ "file_path": "src/utils/tauriApi.ts", "repo_id": "000haoji/deep-student", "size": 41446, "token_count": 14620 }
/** * 数据整合引擎 - 回顾分析功能的核心数据处理模块 * * 负责将多个错题的信息整合成统一的文本格式,供AI分析使用 */ import { MistakeItem, MistakeConsolidationData, ConsolidatedMistakeData, ChatMessage } from '../types/index'; export class DataConsolidationEngine { /** * 从错题对象中提取关键信息用于整合 */ static extractMistakeData(mistake: MistakeItem): MistakeConso...
train_000.parquet/239
{ "file_path": "src/utils/dataConsolidationEngine.ts", "repo_id": "000haoji/deep-student", "size": 8373, "token_count": 3119 }
// 数据管理模块 - 模拟本地数据存储 export interface MistakeItem { id: string; subject: string; created_at: string; question_images: string[]; analysis_images: string[]; user_question: string; ocr_text: string; tags: string[]; mistake_type: string; status: string; chat_history?: ChatMessage[]; } export interfac...
train_000.parquet/240
{ "file_path": "src/utils/dataManager.ts", "repo_id": "000haoji/deep-student", "size": 14377, "token_count": 6294 }
/** * 统一流式处理管理器 * * 替代项目中的多种流式处理实现,提供统一、一致的流式数据处理方案 * 支持所有现有的流式场景:分析、对话、回顾分析等 */ import { listen } from '@tauri-apps/api/event'; import React from 'react'; export interface StreamChunk { content: string; is_complete: boolean; chunk_id: string; } export interface StreamMessage { id: string; role: 'use...
train_000.parquet/241
{ "file_path": "src/utils/unifiedStreamManager.ts", "repo_id": "000haoji/deep-student", "size": 10969, "token_count": 3786 }
/** * Tauri Stream Adapter * * Focused adapter for converting Tauri backend streaming to standard streaming protocols. * Single responsibility: Stream protocol conversion. */ import { invoke } from '@tauri-apps/api/core'; import { listen } from '@tauri-apps/api/event'; export interface StreamControllerManager {...
train_000.parquet/242
{ "file_path": "src/utils/tauriStreamAdapter.ts", "repo_id": "000haoji/deep-student", "size": 6043, "token_count": 1927 }
/** * Unified Streaming Handler * * Consolidates all streaming approaches in the project into a single, * consistent implementation that can be used across all components. */ import { listen } from '@tauri-apps/api/event'; import { invoke } from '@tauri-apps/api/core'; export interface StreamChunk { content:...
train_000.parquet/243
{ "file_path": "src/utils/unifiedStreamHandler.ts", "repo_id": "000haoji/deep-student", "size": 13011, "token_count": 3991 }
/** * Tauri API Client * * Simple client for direct Tauri API calls without streaming. * Single responsibility: Non-streaming API communication. */ import { invoke } from '@tauri-apps/api/core'; export interface ChatMessage { id: string; role: 'user' | 'assistant' | 'system'; content: string; thinking_c...
train_000.parquet/244
{ "file_path": "src/utils/tauriApiClient.ts", "repo_id": "000haoji/deep-student", "size": 2908, "token_count": 1019 }
import { AnkiCardTemplate, CustomAnkiTemplate, FieldExtractionRule, FieldType } from '../types'; // 将预置模板转换为CustomAnkiTemplate格式,实现统一管理 const createBuiltInTemplate = (template: AnkiCardTemplate): CustomAnkiTemplate => { // 生成字段提取规则 const fieldExtractionRules: Record<string, FieldExtractionRule> = {}; template.fi...
train_000.parquet/245
{ "file_path": "src/data/ankiTemplates.ts", "repo_id": "000haoji/deep-student", "size": 23133, "token_count": 10921 }
/** * Chat Core Module - 聊天核心模块 * * 统一导出所有聊天相关的组件、工具函数、类型定义和样式 * 便于独立开发和迭代 */ // 导出所有组件 export * from './components'; // 导出工具函数(避免重复导出) export { // 统一API api, simplifiedApi, directApi, // 流式处理 streamHandler, unifiedStreamManager, useUnifiedStream, // 消息转换 convertToBackendFormat, conv...
train_000.parquet/246
{ "file_path": "src/chat-core/index.ts", "repo_id": "000haoji/deep-student", "size": 1265, "token_count": 559 }
import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; import { TauriAPI } from '../utils/tauriApi'; interface SubjectConfig { id: string; subject_name: string; display_name: string; description: string; is_enabled: boolean; prompts: any; mistake_types: string[]; defa...
train_000.parquet/247
{ "file_path": "src/contexts/SubjectContext.tsx", "repo_id": "000haoji/deep-student", "size": 3344, "token_count": 1135 }
/* Modern Sidebar Styles */ /* 导入现代字体 */ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); /* CSS 变量定义 */ :root { --sidebar-bg: #ffffff; --sidebar-border: rgba(226, 232, 240, 0.8); --sidebar-shadow: 0 0 30px rgba(0, 0, 0, 0.08), 0 0 60px rgba(59, 130, 246, 0.03); ...
train_000.parquet/248
{ "file_path": "src/styles/modern-sidebar.css", "repo_id": "000haoji/deep-student", "size": 13210, "token_count": 6444 }
/** * API Configuration Section Component * Split from the large Settings component */ import React, { useState } from 'react'; import { useApiConfig, ApiConfig } from '../../hooks/useApiConfig'; import { useNotification } from '../../hooks/useNotification'; import { ApiConfigModal } from './ApiConfigModal'; expor...
train_000.parquet/249
{ "file_path": "src/components/settings/ApiConfigSection.tsx", "repo_id": "000haoji/deep-student", "size": 9847, "token_count": 3227 }
/** * System Settings Section Component * Split from the large Settings component */ import React from 'react'; import { useSystemSettings } from '../../hooks/useSystemSettings'; import { useNotification } from '../../hooks/useNotification'; import { Settings as SettingsIcon, CheckCircle, XCircle } from 'lucide-rea...
train_000.parquet/250
{ "file_path": "src/components/settings/SystemSettingsSection.tsx", "repo_id": "000haoji/deep-student", "size": 6776, "token_count": 2233 }
/** * API Configuration Modal Component * Split from the large Settings component for better maintainability */ import React, { useState, useEffect } from 'react'; import { ApiConfig } from '../../hooks/useApiConfig'; interface ApiConfigModalProps { config: ApiConfig | null; // null for new config onSave: (con...
train_000.parquet/251
{ "file_path": "src/components/settings/ApiConfigModal.tsx", "repo_id": "000haoji/deep-student", "size": 8918, "token_count": 3117 }
import React, { useState, useEffect } from 'react'; import { invoke } from '@tauri-apps/api/core'; interface TestResult { name: string; status: 'pending' | 'success' | 'error'; message: string; duration?: number; } interface ApiTest { name: string; command: string; params?: any; description: string; }...
train_000.parquet/252
{ "file_path": "src/components/archived/BackendTest.tsx", "repo_id": "000haoji/deep-student", "size": 19440, "token_count": 7168 }
# 归档组件说明 本目录包含被统一组件 `UnifiedAnalysisView` 替换的原有组件备份。 ## 归档时间 2024年6月5日 ## 归档原因 为了提高代码复用性和可维护性,将三个功能相似的分析组件统一为一个通用组件,并新增了图片追问功能。 ## 归档的组件 ### 1. MistakeDetail.tsx - **原用途**: 单条错题的详细分析和追问 - **替换为**: `UnifiedAnalysisView` 组件,使用 `analysisType="singleMistake"` - **主要功能**: - 错题信息编辑 - 图片查看 - AI分析对话 - 错题删除 ### 2...
train_000.parquet/253
{ "file_path": "src/components/archived/README.md", "repo_id": "000haoji/deep-student", "size": 1627, "token_count": 967 }
.unified-subject-selector { position: relative; display: inline-block; } /* 现代圆角下拉框样式 */ .unified-subject-selector .custom-select { position: relative; width: 100%; } .unified-subject-selector .select-selected { background-color: #ffffff; border-radius: 12px; border: 1px solid #e0e0e0; padding: 12px 1...
train_000.parquet/254
{ "file_path": "src/components/shared/UnifiedSubjectSelector.css", "repo_id": "000haoji/deep-student", "size": 8018, "token_count": 3737 }
import React, { useEffect, useState, useRef } from 'react'; import { useSubject } from '../../contexts/SubjectContext'; import './UnifiedSubjectSelector.css'; interface UnifiedSubjectSelectorProps { mode?: 'enabled' | 'all' | 'existing'; includeAllOption?: boolean; placeholder?: string; disabled?: boolean; c...
train_000.parquet/255
{ "file_path": "src/components/shared/UnifiedSubjectSelector.tsx", "repo_id": "000haoji/deep-student", "size": 7910, "token_count": 2749 }
import React, { useState } from 'react'; import { MarkdownRenderer } from './MarkdownRenderer'; import { StreamingMarkdownRenderer } from './StreamingMarkdownRenderer'; import { SummaryBox } from '../../components/SummaryBox'; import { ChatMessageContentPart } from '../types/chat'; import { ChatMessage } from '../../ty...
train_000.parquet/256
{ "file_path": "src/chat-core/components/MessageWithThinking.tsx", "repo_id": "000haoji/deep-student", "size": 8593, "token_count": 2672 }
/** * Simplified Chat Interface * * Replaces the complex AI SDK implementation with a simpler approach * that uses the unified stream handler directly. */ import React, { useState, useRef, useEffect } from 'react'; import { useUnifiedStream, StreamMessage } from '../utils/unifiedStreamHandler'; import { Markdown...
train_000.parquet/257
{ "file_path": "src/chat-core/components/SimplifiedChatInterface.tsx", "repo_id": "000haoji/deep-student", "size": 9488, "token_count": 2757 }
import React from 'react'; import ReactMarkdown from 'react-markdown'; import remarkGfm from 'remark-gfm'; import remarkMath from 'remark-math'; import rehypeKatex from 'rehype-katex'; interface MarkdownRendererProps { content: string; className?: string; } // 预处理函数:处理LaTeX和空行 const preprocessContent = (content: ...
train_000.parquet/258
{ "file_path": "src/chat-core/components/MarkdownRenderer.tsx", "repo_id": "000haoji/deep-student", "size": 3085, "token_count": 1249 }
/** * AI Chat Interface using Vercel AI SDK * * This component replaces the custom streaming implementation with * Vercel AI SDK's useChat hook for better performance and reliability. */ import React, { useState, useMemo } from 'react'; import { useChat } from '@ai-sdk/react'; import { createAISdkFetch } from '....
train_000.parquet/259
{ "file_path": "src/chat-core/components/AIChatInterface.tsx", "repo_id": "000haoji/deep-student", "size": 8234, "token_count": 2525 }
/** * Streaming Chat Interface for AI SDK Analysis * * A simplified chat interface optimized for handling Tauri streaming events * with proper thinking chain support and real-time rendering. */ import React, { useState, useImperativeHandle, useEffect, useRef } from 'react'; import { MessageWithThinking } from '....
train_000.parquet/260
{ "file_path": "src/chat-core/components/StreamingChatInterface.tsx", "repo_id": "000haoji/deep-student", "size": 10206, "token_count": 3221 }
import React, { useState, useEffect, useMemo } from 'react'; import { MarkdownRenderer } from './MarkdownRenderer'; interface StreamingMarkdownRendererProps { content: string; isStreaming: boolean; chainOfThought?: { enabled: boolean; details?: any; }; } type ParsedContent = { thinkingContent: strin...
train_000.parquet/261
{ "file_path": "src/chat-core/components/StreamingMarkdownRenderer.tsx", "repo_id": "000haoji/deep-student", "size": 4446, "token_count": 1595 }
import os from pipeline_demo import StableDiffusionXLPipelineLoraGuidance def inference( pipeline: StableDiffusionXLPipelineLoraGuidance, prompt: str, content_image_lora_path: str = None, style_image_lora_path: str = None, add_positive_content_prompt: str = None, add_negative_content_prompt: ...
train_000.parquet/262
{ "file_path": "inference.py", "repo_id": "000linlin/ConsisLoRA", "size": 5801, "token_count": 1921 }
/** * Chat Core Type Definitions * * 聊天核心模块的类型定义 */ // RAG知识库来源信息 export interface RagSourceInfo { document_id: string; file_name: string; chunk_text: string; score: number; chunk_index: number; } // 多模态内容块类型 export type ChatMessageContentPart = | { type: 'text'; text: string } | { type: 'image_ur...
train_000.parquet/263
{ "file_path": "src/chat-core/types/chat.ts", "repo_id": "000haoji/deep-student", "size": 1929, "token_count": 766 }
import { listen } from '@tauri-apps/api/event'; export interface StreamChunk { content: string; is_complete: boolean; chunk_id: string; } export class StreamHandler { private listeners: Map<string, (chunk: StreamChunk) => void> = new Map(); private unlistenFunctions: Map<string, () => void> = new Map(); ...
train_000.parquet/264
{ "file_path": "src/chat-core/utils/streamHandler.ts", "repo_id": "000haoji/deep-student", "size": 2365, "token_count": 908 }
/** * Chat Message Converter * * Utilities for converting between different chat message formats. * Single responsibility: Message format conversion. */ export interface ChatMessage { id: string; role: 'user' | 'assistant' | 'system'; content: string; thinking_content?: string; timestamp?: string; } e...
train_000.parquet/265
{ "file_path": "src/chat-core/utils/chatMessageConverter.ts", "repo_id": "000haoji/deep-student", "size": 1983, "token_count": 637 }
/** * Simplified API Adapter * * Replaces the complex aiSdkAdapter.ts with a simpler implementation * that leverages the unified stream handler. */ import { invoke } from '@tauri-apps/api/core'; import { unifiedStreamHandler, StreamRequest, StreamOptions, StreamMessage as _StreamMessage } from './unifiedStreamHa...
train_000.parquet/266
{ "file_path": "src/chat-core/utils/simplifiedApiAdapter.ts", "repo_id": "000haoji/deep-student", "size": 5384, "token_count": 1772 }
/** * AI SDK Adapter for Tauri Backend * * Simplified adapter focused on AI SDK integration. * Uses separated modules for stream handling and API communication. */ import { createAnalysisStream, createChatStream } from './tauriStreamAdapter'; import { tauriApiClient } from './tauriApiClient'; import { convertToT...
train_000.parquet/267
{ "file_path": "src/chat-core/utils/aiSdkAdapter.ts", "repo_id": "000haoji/deep-student", "size": 3037, "token_count": 993 }
# IDF component for using rLottie in ESP32 projects ## Disclaimer **This project is a forked version of the Samsung/rlottie project. Therefore, the source code used in this project also follows the original license. For more details, check this out. (https://github.com/Samsung/rlottie/)** ### What is Lottie? Lottie i...
train_000.parquet/268
{ "file_path": "README.md", "repo_id": "0015/esp_rlottie", "size": 5975, "token_count": 1830 }
project('rlottie', 'cpp', default_options : ['cpp_std=c++14', 'optimization=s'], version : '0.2', license : 'MIT', meson_version : '>=0.49', ) add_project_arguments('-DDEMO_DIR="@0@/example/resource/"'.format(meson.current_source_dir()), language : 'cpp') inc = [include...
train_000.parquet/269
{ "file_path": "rlottie/meson.build", "repo_id": "0015/esp_rlottie", "size": 2984, "token_count": 1142 }
/** * 统一流式处理管理器 * * 替代项目中的多种流式处理实现,提供统一、一致的流式数据处理方案 * 支持所有现有的流式场景:分析、对话、回顾分析等 */ import { listen } from '@tauri-apps/api/event'; import React from 'react'; export interface StreamChunk { content: string; is_complete: boolean; chunk_id: string; } export interface StreamMessage { id: string; role: 'use...
train_000.parquet/270
{ "file_path": "src/chat-core/utils/unifiedStreamManager.ts", "repo_id": "000haoji/deep-student", "size": 10969, "token_count": 3786 }
/** * Tauri Stream Adapter * * Focused adapter for converting Tauri backend streaming to standard streaming protocols. * Single responsibility: Stream protocol conversion. */ import { invoke } from '@tauri-apps/api/core'; import { listen } from '@tauri-apps/api/event'; export interface StreamControllerManager {...
train_000.parquet/271
{ "file_path": "src/chat-core/utils/tauriStreamAdapter.ts", "repo_id": "000haoji/deep-student", "size": 6043, "token_count": 1927 }
/** * Unified Streaming Handler * * Consolidates all streaming approaches in the project into a single, * consistent implementation that can be used across all components. */ import { listen } from '@tauri-apps/api/event'; import { invoke } from '@tauri-apps/api/core'; export interface StreamChunk { content:...
train_000.parquet/272
{ "file_path": "src/chat-core/utils/unifiedStreamHandler.ts", "repo_id": "000haoji/deep-student", "size": 13011, "token_count": 3991 }
# rlottie [![Build Status](https://travis-ci.org/Samsung/rlottie.svg?branch=master)](https://travis-ci.org/Samsung/rlottie) [![Build status](https://ci.appveyor.com/api/projects/status/n3xonxk1ooo6s7nr?svg=true&passingText=windows%20-%20passing)](https://ci.appveyor.com/project/smohantty/rlottie-mliua) [![Gitter](htt...
train_000.parquet/273
{ "file_path": "rlottie/README.md", "repo_id": "0015/esp_rlottie", "size": 10721, "token_count": 3765 }
--- Language: Cpp BasedOnStyle: Google AccessModifierOffset: -4 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: true AlignEscapedNewlinesLeft: true AlignOperands: true AlignTrailingComments: true AllowAllParametersOfDeclarationOnNextLine: true AllowShortBlocksOnAS...
train_000.parquet/274
{ "file_path": "rlottie/.clang-format", "repo_id": "0015/esp_rlottie", "size": 2592, "token_count": 949 }
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Inference for ConsisLoRA" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "98476b7830664...
train_000.parquet/275
{ "file_path": "inference_demo.ipynb", "repo_id": "000linlin/ConsisLoRA", "size": 1607768, "token_count": 1258494 }
/** * Tauri API Client * * Simple client for direct Tauri API calls without streaming. * Single responsibility: Non-streaming API communication. */ import { invoke } from '@tauri-apps/api/core'; export interface ChatMessage { id: string; role: 'user' | 'assistant' | 'system'; content: string; thinking_c...
train_000.parquet/276
{ "file_path": "src/chat-core/utils/tauriApiClient.ts", "repo_id": "000haoji/deep-student", "size": 2908, "token_count": 1019 }
/** * Markdown & RAG Styles - Markdown渲染和RAG相关样式 * 提取自原项目中所有Markdown和知识库相关的样式 */ /* ============================================================================ Markdown基础样式 - Markdown Base Styles ============================================================================ */ .markdown-content { line-heigh...
train_000.parquet/277
{ "file_path": "src/chat-core/styles/markdown.css", "repo_id": "000haoji/deep-student", "size": 12291, "token_count": 5396 }
#include <gtest/gtest.h> #include "vrect.h" class VRectFTest : public ::testing::Test { public: void SetUp() { conersionRect = rect; } void TearDown() { } public: VRectF Empty; VRectF illigal{0, 0, -100, 200}; VRectF conersionRect; VRect rect{0, 0, 100, 100}; }; class VRectTe...
train_000.parquet/278
{ "file_path": "rlottie/test/test_vrect.cpp", "repo_id": "0015/esp_rlottie", "size": 1149, "token_count": 626 }
from PIL import Image import torch from torchvision import transforms BLOCKS = { 'content': ['unet.up_blocks.0.attentions.0'], 'style': ['unet.up_blocks.0.attentions.1'], } def is_belong_to_blocks(key, blocks): try: for g in blocks: if g in key: return True ret...
train_000.parquet/279
{ "file_path": "utils.py", "repo_id": "000linlin/ConsisLoRA", "size": 3304, "token_count": 1108 }
# ConsisLoRA: Enhancing Content and Style Consistency for LoRA-based Style Transfer <a href='https://ConsisLoRA.github.io/'><img src='https://img.shields.io/badge/Project-Page-green'></a> <a href='https://arxiv.org/abs/2503.10614'><img src='https://img.shields.io/badge/arXiv-2503.10614-b31b1b.svg'></a> This repositor...
train_000.parquet/280
{ "file_path": "README.md", "repo_id": "000linlin/ConsisLoRA", "size": 3474, "token_count": 1263 }
/** * Chat Core Styles - 聊天界面核心样式 * 提取自原项目中所有聊天相关的样式 */ /* ============================================================================ 聊天容器 - Chat Container ============================================================================ */ .chat-container { display: flex; flex-direction: column; height: ...
train_000.parquet/281
{ "file_path": "src/chat-core/styles/chat.css", "repo_id": "000haoji/deep-student", "size": 11707, "token_count": 5124 }
/** * Analysis Styles - 分析相关样式 * 从ReviewAnalysis.css中提取与聊天分析相关的样式 */ /* ============================================================================ 分析容器 - Analysis Container ============================================================================ */ .analysis-container { width: 100%; display: flex; ...
train_000.parquet/282
{ "file_path": "src/chat-core/styles/analysis.css", "repo_id": "000haoji/deep-student", "size": 16106, "token_count": 6810 }
/* Chat Core Styles - 统一样式入口 */ /* 从现有CSS文件中提取和整理的聊天核心样式集合 */ /* 导入核心聊天样式 */ @import './chat.css'; /* 导入Markdown渲染样式 */ @import './markdown.css'; /* 导入分析相关样式 */ @import './analysis.css'; /* ===== 全局聊天相关CSS变量 ===== */ :root { /* 聊天主色调 */ --chat-primary: #667eea; --chat-primary-dark: #5a6fd8; --chat-secondary...
train_000.parquet/283
{ "file_path": "src/chat-core/styles/index.css", "repo_id": "000haoji/deep-student", "size": 9781, "token_count": 4910 }
# Chat Core Styles 这个目录包含了从现有CSS文件中提取和整理的聊天相关样式,提供了一套完整的聊天界面样式系统。 ## 文件结构 ``` styles/ ├── index.css # 主入口文件,导入所有样式和定义CSS变量 ├── chat.css # 聊天界面核心样式 ├── markdown.css # Markdown渲染和思维链样式 ├── analysis.css # 分析相关样式(回顾分析、错题选择等) └── README.md # 本文档 ``` ## 样式文件说明 ### 1. index.css - ...
train_000.parquet/284
{ "file_path": "src/chat-core/styles/README.md", "repo_id": "000haoji/deep-student", "size": 3565, "token_count": 2233 }
#include <gtest/gtest.h> #include "vpath.h" class VPathTest : public ::testing::Test { public: void SetUp() { pathRect.addRect({-10, -20, 100, 100}); pathRoundRect.addRoundRect({0, 0, 100, 100}, 5, 5); pathRoundRectZeroCorner.addRoundRect({0, 0, 100, 100}, 0, 0); pathRoundRectHa...
train_000.parquet/285
{ "file_path": "rlottie/test/test_vpath.cpp", "repo_id": "0015/esp_rlottie", "size": 7171, "token_count": 2999 }
<!doctype html> <html> <canvas id="rlottie" width="100" height="100"></canvas> <script> var Module = { onRuntimeInitialized: function() { class Animator { constructor(){ this.instance = new Module.RlottieWasm(); this.canvas = document.getElementById("rlottie"); ...
train_000.parquet/286
{ "file_path": "rlottie/test/wasm_test.html", "repo_id": "0015/esp_rlottie", "size": 1131, "token_count": 374 }
override_default = ['warning_level=2', 'werror=false'] gtest_dep = dependency('gtest') vector_test_sources = [ 'testsuite.cpp', 'test_vrect.cpp', 'test_vpath.cpp', ] vector_testsuite = executable('vectorTestSuite', vector_test_sources, inc...
train_000.parquet/287
{ "file_path": "rlottie/test/meson.build", "repo_id": "0015/esp_rlottie", "size": 1113, "token_count": 312 }
from typing import Any, Callable, Dict, List, Optional, Tuple, Union import torch from diffusers import StableDiffusionXLPipeline from diffusers.pipelines.stable_diffusion_xl import StableDiffusionXLPipelineOutput from diffusers.image_processor import PipelineImageInput from diffusers.callbacks import PipelineCallback...
train_000.parquet/288
{ "file_path": "pipeline_demo.py", "repo_id": "000linlin/ConsisLoRA", "size": 44336, "token_count": 13000 }
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <Filter Include="inc"> <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> <Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions> <...
train_000.parquet/289
{ "file_path": "rlottie/vs2019/rlottie.vcxproj.filters", "repo_id": "0015/esp_rlottie", "size": 14830, "token_count": 6180 }
/* * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved. * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights *...
train_000.parquet/290
{ "file_path": "rlottie/inc/rlottie_capi.h", "repo_id": "0015/esp_rlottie", "size": 11630, "token_count": 3886 }
/* * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved. * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights *...
train_000.parquet/291
{ "file_path": "rlottie/inc/rlottiecommon.h", "repo_id": "0015/esp_rlottie", "size": 5193, "token_count": 1889 }
/* * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved. * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights *...
train_000.parquet/292
{ "file_path": "rlottie/inc/rlottie.h", "repo_id": "0015/esp_rlottie", "size": 17630, "token_count": 5577 }
// // gif.h // by Charlie Tangora // Public domain. // Email me : ctangora -at- gmail -dot- com // // This file offers a simple, very limited way to create animated GIFs directly in code. // // Those looking for particular cleverness are likely to be disappointed; it's pretty // much a straight-ahead implementation of ...
train_000.parquet/293
{ "file_path": "rlottie/example/gif.h", "repo_id": "0015/esp_rlottie", "size": 27441, "token_count": 10215 }
#include <memory> #include <vector> #include <dirent.h> #include <algorithm> #include <chrono> #include <iostream> #include <cstring> #include <rlottie.h> static bool isJsonFile(const char *filename) { const char *dot = strrchr(filename, '.'); if(!dot || dot == filename) return false; return !strcmp(dot + 1, "j...
train_000.parquet/294
{ "file_path": "rlottie/example/lottieperf.cpp", "repo_id": "0015/esp_rlottie", "size": 4938, "token_count": 1795 }
/* * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved. * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights *...
train_000.parquet/295
{ "file_path": "rlottie/example/uxsampletest.cpp", "repo_id": "0015/esp_rlottie", "size": 3952, "token_count": 1461 }
override_default = ['warning_level=2', 'werror=false'] common_source = files('evasapp.cpp') common_source += files('lottieview.cpp') demo_sources = files('demo.cpp') demo_sources += common_source executable('lottie2gif', 'lottie2gif.cpp', include_directories : inc, override_options...
train_000.parquet/296
{ "file_path": "rlottie/example/meson.build", "repo_id": "0015/esp_rlottie", "size": 2107, "token_count": 678 }
/* * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved. * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights *...
train_000.parquet/297
{ "file_path": "rlottie/example/demo.cpp", "repo_id": "0015/esp_rlottie", "size": 9226, "token_count": 3120 }
/* * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved. * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights *...
train_000.parquet/298
{ "file_path": "rlottie/example/lottieviewtest.cpp", "repo_id": "0015/esp_rlottie", "size": 5437, "token_count": 2019 }
/* * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved. * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights *...
train_000.parquet/299
{ "file_path": "rlottie/example/evasapp.h", "repo_id": "0015/esp_rlottie", "size": 2957, "token_count": 1100 }