repo_id stringlengths 6 101 | size int64 367 5.14M | file_path stringlengths 1 269 | content stringlengths 367 5.14M |
|---|---|---|---|
0000cd/wolf-set | 59,325 | themes/bluf/static/js/APlayer.min.js | !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... |
000haoji/deep-student | 16,604 | src/components/KnowledgeGraphManagement.tsx | 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... |
0000cd/wolf-set | 6,469 | themes/bluf/static/js/js-confetti.js | 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... |
000haoji/deep-student | 46,167 | src/components/CreateReviewAnalysisView.tsx | 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... |
0000cd/wolf-set | 56,300 | themes/bluf/static/js/glightbox.min.js | !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... |
0000cd/wolf-set | 12,528 | themes/bluf/static/css/APlayer.min.css | .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... |
000haoji/deep-student | 58,557 | src/components/AnkiCardGeneration.tsx | 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... |
0015/StickiNote | 1,181,912 | main/ui_resources/notes.c | #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... |
000haoji/deep-student | 1,644 | src/components/ModernSelect.css | .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... |
0000cd/wolf-set | 13,749 | themes/bluf/static/css/glightbox.min.css | .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;... |
0000cd/wolf-set | 10,402 | themes/bluf/assets/js/script.new.js | // 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... |
0000cd/wolf-set | 9,361 | themes/bluf/assets/css/style.css | :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"... |
000haoji/deep-student | 8,404 | src/components/EnhancedKnowledgeBaseManagement.css | /* 增强知识库管理样式 */
.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... |
000haoji/deep-student | 4,899 | src/components/GraphVisualization.css | .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... |
000haoji/deep-student | 4,684 | src/components/ModernSidebar.tsx | 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' |... |
0000cd/wolf-set | 1,736 | themes/bluf/layouts/_default/single.html | <!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="... |
0000cd/wolf-set | 2,917 | themes/bluf/layouts/_default/met.html | <!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>... |
0000cd/wolf-set | 2,132 | themes/bluf/layouts/partials/getColorCategory.html | {{- $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... |
000haoji/deep-student | 37,889 | src/components/KnowledgeBaseManagement.tsx | 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... |
000haoji/deep-student | 9,811 | src/components/TagManagement.tsx | 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... |
0000cd/wolf-set | 1,667 | themes/bluf/layouts/partials/head.html | <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... |
000haoji/deep-student | 19,032 | src/components/AnkiCardGeneration.css | .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... |
000haoji/deep-student | 1,224 | src/components/DataStats.tsx | 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);
... |
000haoji/deep-student | 38,208 | src/components/DataImportExport.tsx | 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... |
000haoji/deep-student | 6,505 | src/components/UnifiedAnalysisView.css | /* 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... |
000haoji/deep-student | 6,130 | src/components/ImageViewer.tsx | 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... |
000haoji/deep-student | 93,037 | src/components/UniversalAppChatHost.tsx | 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... |
000haoji/deep-student | 6,153 | src/hooks/useSystemSettings.ts | /**
* 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... |
000haoji/deep-student | 5,277 | src/hooks/useNotification.ts | /**
* 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... |
000haoji/deep-student | 7,273 | src/hooks/useApiConfig.ts | /**
* 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... |
000haoji/deep-student | 1,715 | src/types/neovis.d.ts | 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... |
000haoji/deep-student | 3,357 | src/types/cogni-graph.ts | 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;... |
000haoji/deep-student | 24,458 | src/types/index.ts | /**
* 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)
// =============... |
000haoji/deep-student | 2,365 | src/utils/streamHandler.ts | 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();
... |
000haoji/deep-student | 1,983 | src/utils/chatMessageConverter.ts | /**
* 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... |
000haoji/deep-student | 5,384 | src/utils/simplifiedApiAdapter.ts | /**
* 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... |
000haoji/deep-student | 11,423 | src/utils/debugLogger.ts | /**
* 调试日志记录模块
* 用于追踪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?:... |
000haoji/deep-student | 3,037 | src/utils/aiSdkAdapter.ts | /**
* 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... |
000haoji/deep-student | 41,446 | src/utils/tauriApi.ts | // 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... |
000haoji/deep-student | 8,373 | src/utils/dataConsolidationEngine.ts | /**
* 数据整合引擎 - 回顾分析功能的核心数据处理模块
*
* 负责将多个错题的信息整合成统一的文本格式,供AI分析使用
*/
import { MistakeItem, MistakeConsolidationData, ConsolidatedMistakeData, ChatMessage } from '../types/index';
export class DataConsolidationEngine {
/**
* 从错题对象中提取关键信息用于整合
*/
static extractMistakeData(mistake: MistakeItem): MistakeConso... |
000haoji/deep-student | 14,377 | src/utils/dataManager.ts | // 数据管理模块 - 模拟本地数据存储
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... |
000haoji/deep-student | 10,969 | src/utils/unifiedStreamManager.ts | /**
* 统一流式处理管理器
*
* 替代项目中的多种流式处理实现,提供统一、一致的流式数据处理方案
* 支持所有现有的流式场景:分析、对话、回顾分析等
*/
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... |
000haoji/deep-student | 6,043 | src/utils/tauriStreamAdapter.ts | /**
* 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 {... |
000haoji/deep-student | 13,011 | src/utils/unifiedStreamHandler.ts | /**
* 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:... |
000haoji/deep-student | 2,908 | src/utils/tauriApiClient.ts | /**
* 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... |
000haoji/deep-student | 23,133 | src/data/ankiTemplates.ts | import { AnkiCardTemplate, CustomAnkiTemplate, FieldExtractionRule, FieldType } from '../types';
// 将预置模板转换为CustomAnkiTemplate格式,实现统一管理
const createBuiltInTemplate = (template: AnkiCardTemplate): CustomAnkiTemplate => {
// 生成字段提取规则
const fieldExtractionRules: Record<string, FieldExtractionRule> = {};
template.fi... |
000haoji/deep-student | 1,265 | src/chat-core/index.ts | /**
* Chat Core Module - 聊天核心模块
*
* 统一导出所有聊天相关的组件、工具函数、类型定义和样式
* 便于独立开发和迭代
*/
// 导出所有组件
export * from './components';
// 导出工具函数(避免重复导出)
export {
// 统一API
api,
simplifiedApi,
directApi,
// 流式处理
streamHandler,
unifiedStreamManager,
useUnifiedStream,
// 消息转换
convertToBackendFormat,
conv... |
000haoji/deep-student | 3,344 | src/contexts/SubjectContext.tsx | 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... |
000haoji/deep-student | 13,210 | src/styles/modern-sidebar.css | /* 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);
... |
000haoji/deep-student | 9,847 | src/components/settings/ApiConfigSection.tsx | /**
* 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... |
000haoji/deep-student | 6,776 | src/components/settings/SystemSettingsSection.tsx | /**
* 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... |
000haoji/deep-student | 8,918 | src/components/settings/ApiConfigModal.tsx | /**
* 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... |
000haoji/deep-student | 19,440 | src/components/archived/BackendTest.tsx | 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;
}... |
000haoji/deep-student | 1,627 | src/components/archived/README.md | # 归档组件说明
本目录包含被统一组件 `UnifiedAnalysisView` 替换的原有组件备份。
## 归档时间
2024年6月5日
## 归档原因
为了提高代码复用性和可维护性,将三个功能相似的分析组件统一为一个通用组件,并新增了图片追问功能。
## 归档的组件
### 1. MistakeDetail.tsx
- **原用途**: 单条错题的详细分析和追问
- **替换为**: `UnifiedAnalysisView` 组件,使用 `analysisType="singleMistake"`
- **主要功能**:
- 错题信息编辑
- 图片查看
- AI分析对话
- 错题删除
### 2... |
000haoji/deep-student | 8,018 | src/components/shared/UnifiedSubjectSelector.css | .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... |
000haoji/deep-student | 7,910 | src/components/shared/UnifiedSubjectSelector.tsx | 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... |
000haoji/deep-student | 8,593 | src/chat-core/components/MessageWithThinking.tsx | 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... |
000haoji/deep-student | 9,488 | src/chat-core/components/SimplifiedChatInterface.tsx | /**
* 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... |
000haoji/deep-student | 3,085 | src/chat-core/components/MarkdownRenderer.tsx | 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: ... |
000haoji/deep-student | 8,234 | src/chat-core/components/AIChatInterface.tsx | /**
* 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 '.... |
000haoji/deep-student | 10,206 | src/chat-core/components/StreamingChatInterface.tsx | /**
* 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 '.... |
000haoji/deep-student | 4,446 | src/chat-core/components/StreamingMarkdownRenderer.tsx | 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... |
000linlin/ConsisLoRA | 5,801 | inference.py | 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: ... |
000haoji/deep-student | 1,929 | src/chat-core/types/chat.ts | /**
* 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... |
000haoji/deep-student | 2,365 | src/chat-core/utils/streamHandler.ts | 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();
... |
000haoji/deep-student | 1,983 | src/chat-core/utils/chatMessageConverter.ts | /**
* 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... |
000haoji/deep-student | 5,384 | src/chat-core/utils/simplifiedApiAdapter.ts | /**
* 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... |
000haoji/deep-student | 3,037 | src/chat-core/utils/aiSdkAdapter.ts | /**
* 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... |
0015/esp_rlottie | 5,975 | README.md | # 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... |
0015/esp_rlottie | 2,984 | rlottie/meson.build | 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... |
000haoji/deep-student | 10,969 | src/chat-core/utils/unifiedStreamManager.ts | /**
* 统一流式处理管理器
*
* 替代项目中的多种流式处理实现,提供统一、一致的流式数据处理方案
* 支持所有现有的流式场景:分析、对话、回顾分析等
*/
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... |
000haoji/deep-student | 6,043 | src/chat-core/utils/tauriStreamAdapter.ts | /**
* 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 {... |
000haoji/deep-student | 13,011 | src/chat-core/utils/unifiedStreamHandler.ts | /**
* 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:... |
0015/esp_rlottie | 10,721 | rlottie/README.md |
# rlottie
[](https://travis-ci.org/Samsung/rlottie)
[](https://ci.appveyor.com/project/smohantty/rlottie-mliua)
[
{
conersionRect = rect;
}
void TearDown()
{
}
public:
VRectF Empty;
VRectF illigal{0, 0, -100, 200};
VRectF conersionRect;
VRect rect{0, 0, 100, 100};
};
class VRectTe... |
000linlin/ConsisLoRA | 3,304 | utils.py | 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... |
000linlin/ConsisLoRA | 3,474 | README.md | # 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... |
000haoji/deep-student | 11,707 | src/chat-core/styles/chat.css | /**
* Chat Core Styles - 聊天界面核心样式
* 提取自原项目中所有聊天相关的样式
*/
/* ============================================================================
聊天容器 - Chat Container
============================================================================ */
.chat-container {
display: flex;
flex-direction: column;
height: ... |
000haoji/deep-student | 16,106 | src/chat-core/styles/analysis.css | /**
* Analysis Styles - 分析相关样式
* 从ReviewAnalysis.css中提取与聊天分析相关的样式
*/
/* ============================================================================
分析容器 - Analysis Container
============================================================================ */
.analysis-container {
width: 100%;
display: flex;
... |
000haoji/deep-student | 9,781 | src/chat-core/styles/index.css | /* 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... |
000haoji/deep-student | 3,565 | src/chat-core/styles/README.md | # Chat Core Styles
这个目录包含了从现有CSS文件中提取和整理的聊天相关样式,提供了一套完整的聊天界面样式系统。
## 文件结构
```
styles/
├── index.css # 主入口文件,导入所有样式和定义CSS变量
├── chat.css # 聊天界面核心样式
├── markdown.css # Markdown渲染和思维链样式
├── analysis.css # 分析相关样式(回顾分析、错题选择等)
└── README.md # 本文档
```
## 样式文件说明
### 1. index.css
- ... |
0015/esp_rlottie | 7,171 | rlottie/test/test_vpath.cpp | #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... |
0015/esp_rlottie | 1,131 | rlottie/test/wasm_test.html | <!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");
... |
0015/esp_rlottie | 1,113 | rlottie/test/meson.build |
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... |
000linlin/ConsisLoRA | 44,336 | pipeline_demo.py | 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... |
0015/esp_rlottie | 14,830 | rlottie/vs2019/rlottie.vcxproj.filters | <?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>
<... |
0015/esp_rlottie | 11,630 | rlottie/inc/rlottie_capi.h | /*
* 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
*... |
0015/esp_rlottie | 5,193 | rlottie/inc/rlottiecommon.h | /*
* 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
*... |
0015/esp_rlottie | 17,630 | rlottie/inc/rlottie.h | /*
* 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
*... |
0015/esp_rlottie | 27,441 | rlottie/example/gif.h | //
// 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 ... |
0015/esp_rlottie | 4,938 | rlottie/example/lottieperf.cpp | #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... |
0015/esp_rlottie | 3,952 | rlottie/example/uxsampletest.cpp | /*
* 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
*... |
0015/esp_rlottie | 2,107 | rlottie/example/meson.build |
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... |
0015/esp_rlottie | 9,226 | rlottie/example/demo.cpp | /*
* 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
*... |
0015/esp_rlottie | 5,437 | rlottie/example/lottieviewtest.cpp | /*
* 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
*... |
0015/esp_rlottie | 2,957 | rlottie/example/evasapp.h | /*
* 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
*... |