MCPcopy Create free account

hub / github.com/HaeMarcus/MindMirror / functions

Functions138 in github.com/HaeMarcus/MindMirror

↓ 23 callersFunctionget_db
()
backend/app/database.py:110
↓ 8 callersFunction_get
(row: dict, canonical: str, default: str = "")
backend/app/parsers/csv_parser.py:119
↓ 8 callersFunctionpolarToXY
(angle: number, r: number)
frontend/components/RadarChart.tsx:29
↓ 4 callersFunction_get_current_round
Get current conversation round count (each round = one user + one assistant message).
backend/app/memory.py:38
↓ 4 callersFunctionget_recent_messages
(limit: int = 30, user_id: str = "default")
backend/app/database.py:234
↓ 4 callersFunctionhandleSend
(text?: string)
frontend/components/ChatWindow.tsx:130
↓ 4 callersFunctionstripMarkdown
(text: string)
frontend/components/MessageBubble.tsx:31
↓ 3 callersFunction_index_path
Get the FAISS index file path for a user (hash nickname for safe filenames).
backend/app/embedding.py:17
↓ 3 callersFunctionget_index
Get or load the FAISS index for a specific user.
backend/app/embedding.py:41
↓ 3 callersFunctionget_memory
(key: str, user_id: str)
backend/app/database.py:250
↓ 3 callersFunctionget_rolling_summary
Get the current rolling summary.
backend/app/memory.py:12
↓ 3 callersFunctionget_user_profile
Get the long-term user profile.
backend/app/memory.py:17
↓ 3 callersFunctionset_memory
(key: str, value: str, user_id: str)
backend/app/database.py:256
↓ 2 callersFunction_get_counter
(user_id: str, key: str)
backend/app/memory.py:43
↓ 2 callersFunction_set_counter
(user_id: str, key: str, value: int)
backend/app/memory.py:48
↓ 2 callersFunction_system_blocks
Build system prompt with cache_control for Anthropic prompt caching.
backend/app/llm.py:90
↓ 2 callersFunctionadd_message
(role: str, content: str, user_id: str)
backend/app/database.py:228
↓ 2 callersFunctionbuild_messages
Build the message list for Claude API.
backend/app/llm.py:54
↓ 2 callersFunctionencode
(texts: list[str])
backend/app/embedding.py:30
↓ 2 callersFunctiongetGridPoints
(level: number)
frontend/components/RadarChart.tsx:46
↓ 2 callersFunctionget_model
()
backend/app/embedding.py:23
↓ 2 callersFunctionhandleFiles
(files: FileList | null)
frontend/components/UploadPanel.tsx:29
↓ 2 callersFunctionsave_index
Persist a user's FAISS index to disk.
backend/app/embedding.py:78
↓ 2 callersFunctionuser_exists
(nickname: str)
backend/app/database.py:127
↓ 1 callersFunction_build_column_map
Map actual CSV column names to canonical names via alias matching. Returns dict: canonical_name -> actual_column_name
backend/app/parsers/csv_parser.py:31
↓ 1 callersFunction_build_source_attribution_context
Build source_attribution_context JSON for LLM.
backend/app/retriever.py:75
↓ 1 callersFunction_clean_amount
Parse amount string, handling ¥/¥ symbols, commas, +/- signs.
backend/app/parsers/csv_parser.py:53
↓ 1 callersFunction_extract_month
Extract YYYY-MM from time string like '2025/12/31 15:53' or '2025年12月31日'.
backend/app/parsers/csv_parser.py:360
↓ 1 callersFunction_generate_summaries
(doc_id: str, source_name: str, rows: list[dict])
backend/app/parsers/csv_parser.py:207
↓ 1 callersFunction_hash_id
(*parts: str)
backend/app/parsers/csv_parser.py:374
↓ 1 callersFunction_hash_id
(*parts: str)
backend/app/parsers/flomo_parser.py:80
↓ 1 callersFunction_hash_id
(*parts: str)
backend/app/parsers/md_parser.py:152
↓ 1 callersFunction_infer_time_range
Infer time range from frontmatter, filename, or content.
backend/app/parsers/md_parser.py:102
↓ 1 callersFunction_infer_type
Normalize transaction type to '收入' or '支出'. Falls back to amount sign if type column is missing or unrecognized.
backend/app/parsers/csv_parser.py:68
↓ 1 callersFunction_migrate_add_user_id
Add user_id columns to existing tables if missing (migration from single-user).
backend/app/database.py:69
↓ 1 callersFunction_migrate_feedback_columns
Add user_id, app_version, source_types columns to feedback if missing.
backend/app/database.py:98
↓ 1 callersFunction_normalize_time
Normalize time string to YYYY-MM-DD HH:MM for correct sorting. Handles: 2025/12/31 15:53, 2025-12-31 15:53, 2025年12月31日 etc.
backend/app/parsers/csv_parser.py:334
↓ 1 callersFunction_source_aware_rerank
Boost scores based on query-source relevance.
backend/app/retriever.py:45
↓ 1 callersFunction_split_by_headings
(content: str)
backend/app/parsers/md_parser.py:55
↓ 1 callersFunction_split_by_paragraphs
(content: str)
backend/app/parsers/md_parser.py:87
↓ 1 callersFunction_split_if_long
Split text that exceeds embedding model's effective window (~512 tokens ≈ 300-400 Chinese chars).
backend/app/parsers/flomo_parser.py:62
↓ 1 callersFunction_split_if_long
Split text that exceeds embedding model's effective window (~512 tokens ≈ 300-400 Chinese chars).
backend/app/parsers/md_parser.py:134
↓ 1 callersFunctionadd_feedback
(message_id: int, rating: str, user_id: str = "", app_version: str = "", source_types: str =
backend/app/database.py:264
↓ 1 callersFunctionadd_vectors
Add vectors to a user's FAISS index, return assigned IDs.
backend/app/embedding.py:54
↓ 1 callersFunctionchat_stream
Stream chat response from Claude.
backend/app/llm.py:101
↓ 1 callersFunctionclear_all_data
Clear all data for a specific user, including their FAISS index.
backend/app/database.py:359
↓ 1 callersFunctioncreate_user
(nickname: str)
backend/app/database.py:122
↓ 1 callersFunctiondelete_document
(doc_id: str)
backend/app/database.py:175
↓ 1 callersFunctiondelete_user_index
Delete a user's FAISS index from disk and cache.
backend/app/embedding.py:93
↓ 1 callersFunctionencode_batch
Encode a small batch — same as encode but named for clarity in progress tracking.
backend/app/embedding.py:36
↓ 1 callersFunctionfetchProfile
()
frontend/components/Sidebar.tsx:43
↓ 1 callersFunctionformatTime
(ts?: string)
frontend/components/MessageBubble.tsx:17
↓ 1 callersFunctiongenerate
()
backend/app/routers/ingest.py:42
↓ 1 callersFunctiongenerate
()
backend/app/routers/chat.py:69
↓ 1 callersFunctiongenerate_rolling_summary
Generate updated rolling summary.
backend/app/llm.py:149
↓ 1 callersFunctiongetAnalytics
(days: number = 30)
frontend/lib/api.ts:204
↓ 1 callersFunctiongetDaysAgo
(dateStr: string | null)
frontend/components/Sidebar.tsx:18
↓ 1 callersFunctiongetDocuments
(nickname: string)
frontend/lib/api.ts:229
↓ 1 callersFunctiongetMessages
(nickname: string)
frontend/lib/api.ts:211
↓ 1 callersFunctiongetPoints
(values: number[])
frontend/components/RadarChart.tsx:35
↓ 1 callersFunctiongetProfile
(nickname: string)
frontend/lib/api.ts:260
↓ 1 callersFunctionget_all_documents
(user_id: str)
backend/app/database.py:160
↓ 1 callersFunctionget_chunk_count_by_doc
(doc_id: str)
backend/app/database.py:169
↓ 1 callersFunctionget_chunks_by_faiss_ids
(faiss_ids: list[int], user_id: str)
backend/app/database.py:214
↓ 1 callersFunctionget_feedback_analytics
Rich analytics for the developer dashboard.
backend/app/database.py:279
↓ 1 callersFunctionget_feedback_stats
()
backend/app/database.py:273
↓ 1 callersFunctionget_message_count
(user_id: str)
backend/app/database.py:242
↓ 1 callersFunctionget_short_memory
Get recent N rounds of conversation (each round = user + assistant).
backend/app/memory.py:7
↓ 1 callersFunctionget_user_created_at
(nickname: str)
backend/app/database.py:133
↓ 1 callersFunctionhandleFeedback
(index: number, rating: "accurate" | "inaccurate")
frontend/components/ChatWindow.tsx:174
↓ 1 callersFunctionhandleSubmit
()
frontend/components/NicknamePrompt.tsx:15
↓ 1 callersFunctioninit_db
()
backend/app/database.py:62
↓ 1 callersFunctioninsert_chunks
(chunks: list[dict])
backend/app/database.py:183
↓ 1 callersFunctioninsert_document
(doc_id: str, source_type: str, source_name: str, user_id: str, time_r
backend/app/database.py:141
↓ 1 callersFunctionmark_profile_updated
Record that user profile was just updated at the current round.
backend/app/memory.py:88
↓ 1 callersFunctionmark_summary_updated
Record that rolling summary was just updated at the current round.
backend/app/memory.py:64
↓ 1 callersFunctionparseInsightSections
(content: string)
frontend/components/MessageBubble.tsx:43
↓ 1 callersFunctionparse_flomo_html
Parse Flomo exported HTML, return document + chunks.
backend/app/parsers/flomo_parser.py:6
↓ 1 callersFunctionparse_ledger_csv
Parse ledger CSV with flexible column matching. Supports: 钱迹, 随手记, 微信支付, 支付宝, and other common formats.
backend/app/parsers/csv_parser.py:92
↓ 1 callersFunctionparse_markdown
Parse a markdown file, return document + chunks.
backend/app/parsers/md_parser.py:6
↓ 1 callersFunctionregisterNickname
(nickname: string)
frontend/lib/api.ts:5
↓ 1 callersFunctionresetAll
(nickname: string)
frontend/lib/api.ts:235
↓ 1 callersFunctionretrieve
Full RAG pipeline: embed → search → rerank → compress → build context.
backend/app/retriever.py:16
↓ 1 callersFunctionsave_rolling_summary
(summary: str, user_id: str)
backend/app/memory.py:28
↓ 1 callersFunctionsave_user_profile
(profile: dict, user_id: str)
backend/app/memory.py:32
↓ 1 callersFunctionsearch
Search a user's FAISS index, return list of (faiss_id, score).
backend/app/embedding.py:65
↓ 1 callersFunctionsendMessage
( message: string, nickname: string, onChunk: (text: string) => void, onDone: (messageId: number | nul
frontend/lib/api.ts:92
↓ 1 callersFunctionshould_update_profile
Check if user profile needs updating. Progressive strategy: update every round for the first 5 rounds (fast convergence), then every ROLLING_S
backend/app/memory.py:71
↓ 1 callersFunctionshould_update_summary
Check if rolling summary needs updating. Triggers on first round (bootstrap) or every ROLLING_SUMMARY_INTERVAL rounds.
backend/app/memory.py:52
↓ 1 callersFunctionsubmitFeedback
( messageId: number, rating: "accurate" | "inaccurate", nickname: string = "", sourceTypes: string = "
frontend/lib/api.ts:170
↓ 1 callersFunctionupdate_user_profile
Update user profile based on accumulated evidence.
backend/app/llm.py:198
↓ 1 callersFunctionuploadFile
( file: File, nickname: string, onProgress?: (p: UploadProgress) => void, )
frontend/lib/api.ts:29
FunctionAnalyticsDashboard
({ data }: { data: AnalyticsData })
frontend/components/AnalyticsDashboard.tsx:19
FunctionAnalyticsPage
()
frontend/app/analytics/page.tsx:9
FunctionChatWindow
()
frontend/components/ChatWindow.tsx:54
FunctionClaudeAvatar
()
frontend/components/MessageBubble.tsx:140
FunctionDataPanel
({ isOpen, onClose, nickname }: DataPanelProps)
frontend/components/DataPanel.tsx:24
FunctionFeedbackButtons
({ feedbackGiven, onFeedback, }: { feedbackGiven?: "accurate" | "inaccurate" | null; onFeedback?: (rat
frontend/components/MessageBubble.tsx:150
FunctionHome
()
frontend/app/page.tsx:3
FunctionMessageBubble
({ role, content, isStreaming, timestamp, feedbackGiven, sources, onFeedback }: MessageBubbleProps)
frontend/components/MessageBubble.tsx:193
next →1–100 of 138, ranked by callers