MCPcopy Create free account

hub / github.com/coleam00/dark-factory-experiment / functions

Functions964 in github.com/coleam00/dark-factory-experiment

↓ 3 callersFunctionuseToast
()
app/frontend/src/hooks/useToast.ts:19
↓ 2 callersFunction_as_uuid
(user_id: UUID | str)
app/backend/rate_limit.py:56
↓ 2 callersFunction_fetch_chunks_and_embeddings
Fetch transcript via Supadata, chunk, embed. Raises HTTPException on failure.
app/backend/routes/admin.py:83
↓ 2 callersFunction_get_client
Return the module-level Supadata singleton. The client is created once on first call and reused for all subsequent calls. This mirrors t
app/backend/services/supadata.py:26
↓ 2 callersFunction_get_client
()
app/backend/rag/embeddings.py:28
↓ 2 callersFunction_hydrate_chunks
Enrich raw repository chunks (id, video_id, content, ts...) with video title/url and reshape to the canonical citation-chunk dict. Fetches vi
app/backend/rag/tools.py:170
↓ 2 callersFunction_insert
(c: asyncpg.Connection)
app/backend/db/users_repo.py:31
↓ 2 callersFunction_miss_result
Return a 'miss' result dict for a case that could not be evaluated.
app/backend/scripts/eval_retrieval.py:158
↓ 2 callersMethod_run
(self, tokens: list[str])
app/backend/tests/test_citations.py:71
↓ 2 callersFunction_set_session_cookie
Mint a JWT and attach it to the response as an httpOnly session cookie.
app/backend/routes/auth.py:69
↓ 2 callersFunction_slugify
(s: str)
scripts/transcribe_all.py:70
↓ 2 callersFunction_split_text
Split *text* into pieces each ≤ max_chars. Tries separators in order: double-newline, single-newline, sentence, then hard-cut.
app/backend/rag/chunker.py:285
↓ 2 callersFunction_user_to_response
(user: dict[str, Any])
app/backend/routes/auth.py:101
↓ 2 callersFunctionaddVideoByUrl
(url: string)
app/frontend/src/lib/api.ts:219
↓ 2 callersFunctioncitationChip
( citation: Citation, i: number, onCitationClick: ((c: Citation) => void) | undefined, dimmed: boolean
app/frontend/src/components/Message.tsx:44
↓ 2 callersFunctioncreateConversation
()
app/frontend/src/lib/api.ts:149
↓ 2 callersMethodfeed
Append ``text`` to the buffer; return what is safe to emit now.
app/backend/rag/citations.py:49
↓ 2 callersMethodflush
Return any held text at end-of-stream (markers stripped).
app/backend/rag/citations.py:64
↓ 2 callersFunctiongetVideos
()
app/frontend/src/lib/api.ts:162
↓ 2 callersFunctionhighlightMatch
(title: string, query: string)
app/frontend/src/components/VideoExplorer.tsx:7
↓ 2 callersFunctionis_admin_email
Return True iff *email* matches the configured admin (case-insensitive). Returns False when ADMIN_USER_EMAIL is unset — fail-safe so a missing co
app/backend/auth/dependencies.py:45
↓ 2 callersFunctionlistAdminVideos
()
app/frontend/src/lib/api.ts:214
↓ 2 callersFunctionparseErrorDetail
(res: Response)
app/frontend/src/lib/api.ts:114
↓ 2 callersFunctionresyncVideo
(id: string)
app/frontend/src/lib/api.ts:235
↓ 2 callersFunctionrun_async_migrations
Run migrations in async mode using the injected async engine.
app/backend/alembic/env.py:63
↓ 2 callersFunctionsave_baseline
Write current metrics as the new baseline.
app/backend/scripts/eval_retrieval.py:63
↓ 2 callersFunctionseed_if_empty
Run seed only if needed: - If SEED_ENABLE is false: skip unconditionally (prod default). - If no videos: full seed (create videos + chunk
app/backend/data/seed.py:329
↓ 2 callersFunctionsyncChannel
()
app/frontend/src/lib/api.ts:238
↓ 1 callersFunction_advisory_lock_key
Stable signed 64-bit key for `pg_advisory_xact_lock` derived from the UUID. `pg_advisory_xact_lock(int8)` wants a bigint; we XOR the two 64-bit h
app/backend/rate_limit.py:60
↓ 1 callersFunction_build_docling_document
Build a DoclingDocument from a video title and transcript text. Uses TITLE, SECTION_HEADER, and PARAGRAPH labels as specified.
app/backend/rag/chunker.py:244
↓ 1 callersFunction_build_docling_document_from_text
Build a minimal DoclingDocument from a single text string (used for segments).
app/backend/rag/chunker.py:237
↓ 1 callersFunction_build_drive
(token_path: Path)
scripts/transcribe_all.py:140
↓ 1 callersFunction_chunk_existing_video
Run chunking + embedding for a video that already exists in the DB. Used when videos were seeded without chunks (e.g., from Sprint 1). Re
app/backend/data/seed.py:289
↓ 1 callersFunction_clear_session_cookie
Invalidate the session cookie on the client. Browsers only honour a `Set-Cookie` deletion directive when every attribute matches the original
app/backend/routes/auth.py:83
↓ 1 callersFunction_client
()
app/backend/tests/test_rate_limit.py:181
↓ 1 callersFunction_client_ip
Return the real client IP. With uvicorn's `--proxy-headers --forwarded-allow-ips="*"`, Starlette has already rewritten `request.client` to th
app/backend/routes/auth.py:105
↓ 1 callersFunction_collapse_by_video
Collapse multiple chunks from the same video into a single citation entry. After the ``is_cited`` pass, chunks from the same video are redundant
app/backend/routes/messages.py:469
↓ 1 callersFunction_default
(key: str)
app/backend/rag/tools.py:280
↓ 1 callersFunction_download_file
(svc: Any, file_id: str, dest: Path)
scripts/transcribe_all.py:176
↓ 1 callersFunction_enforce_max_chars
Split any chunk that exceeds *max_chars* characters into smaller pieces. Tries to split at paragraph boundaries first, then at sentence bound
app/backend/rag/chunker.py:271
↓ 1 callersFunction_extract_audio
Use ffmpeg to make a 16 kHz mono Ogg-Opus file. Whisper's accepted formats are flac/m4a/mp3/mp4/mpeg/mpga/oga/ogg/wav/webm, and rejects bare
scripts/transcribe_all.py:187
↓ 1 callersFunction_extract_member
Normalize the search response shape. Circle's `/community_members/search` historically returned the member object directly. Newer responses s
app/backend/integrations/circle.py:99
↓ 1 callersFunction_fetch_og_description
Scrape og:description from the YouTube video page as a fallback. YouTube embeds the video description in: <meta property="og:description"
app/backend/services/youtube_meta.py:23
↓ 1 callersFunction_find_and_load_env
Search parent directories for .env and load it. In containerized deploys there is no .env file on disk — env vars are injected by docker-comp
app/backend/config.py:22
↓ 1 callersFunction_force_paragraph_split
When HybridChunker returns fewer than 2 chunks for ≥3 paragraphs, split the paragraphs into at least 2 groups manually. Each group is pre
app/backend/rag/chunker.py:339
↓ 1 callersFunction_format_timestamp
(seconds: float)
scripts/transcribe_all.py:76
↓ 1 callersFunction_format_transcript
Whisper segments → markdown body with `## [HH:MM:SS]` headings.
scripts/transcribe_all.py:123
↓ 1 callersFunction_frontmatter_for
Build the YAML frontmatter block that ingest_dynamous_content reads.
scripts/transcribe_all.py:100
↓ 1 callersMethod_gen
(self)
app/backend/tests/test_stream_chat_max_tokens.py:50
↓ 1 callersMethod_gen
(self)
app/backend/tests/test_sse_status_events.py:63
↓ 1 callersMethod_gen
(self)
app/backend/tests/test_sse_heartbeat.py:64
↓ 1 callersFunction_get_async_client
()
app/backend/llm/openrouter.py:40
↓ 1 callersFunction_get_client
Return the module-level Supadata singleton.
app/backend/services/video_ingest.py:37
↓ 1 callersFunction_group_parts
Greedily group *parts* (joined by *sep*) such that each group is ≤ max_chars. Parts that are individually larger than max_chars are recur
app/backend/rag/chunker.py:311
↓ 1 callersFunction_heartbeat_due
()
app/backend/llm/openrouter.py:271
↓ 1 callersFunction_ingest_one_file
Process one transcript file. Idempotent.
app/backend/ingest/dynamous.py:170
↓ 1 callersFunction_ingest_video
Full ingest pipeline for a single video: 1. Create video record 2. Chunk transcript 3. Embed chunks (batched) 4. Store ch
app/backend/data/seed.py:249
↓ 1 callersFunction_load
(vid: str)
app/backend/rag/tools.py:182
↓ 1 callersFunction_make_client
Return a fresh AsyncClient bound to the FastAPI app.
app/backend/tests/test_conversation_scoping.py:107
↓ 1 callersFunction_maybe_set_conversation_title
If the conversation title is still the default, auto-generate one from the first user message (simple truncation for Sprint 2; LLM-based in S
app/backend/routes/messages.py:451
↓ 1 callersFunction_md5_of_file
(path: Path)
scripts/transcribe_all.py:236
↓ 1 callersFunction_mock_transcript_list
Build a SimpleNamespace that mimics the SDK's Transcript object with list content.
app/backend/tests/test_video_ingest.py:110
↓ 1 callersFunction_output_path_for
Pick a stable output path under output_dir based on the lesson_map row.
scripts/transcribe_all.py:83
↓ 1 callersFunction_resolve_drive_file_id
Walk the root folder by name components to find the file ID for drive_path. drive_path is a forward-slash separated path under the Drive root, e.
scripts/transcribe_all.py:148
↓ 1 callersFunction_strip_markers_from_sse_chunk
Run an SSE token chunk through ``stripper``; return a rewritten chunk or ``None`` if the entire token content was held back. Non-token chunks
app/backend/routes/messages.py:315
↓ 1 callersFunction_transcribe_with_whisper
Call Whisper with verbose_json so we get segment timestamps. Returns the parsed response dict (includes 'segments' list).
scripts/transcribe_all.py:249
↓ 1 callersFunctioncreate_message
Send a user message and stream the RAG-grounded assistant response. Returns: StreamingResponse with Content-Type: text/event-stream
app/backend/routes/messages.py:62
↓ 1 callersFunctiondecode_token
Verify signature + expiry and return the decoded payload. Raises TokenError on failure.
app/backend/auth/tokens.py:37
↓ 1 callersFunctiondeleteConversation
(id: string)
app/frontend/src/lib/api.ts:153
↓ 1 callersFunctionembed_text
Embed a single text string via OpenRouter. Args: text: A non-empty string to embed. Returns: A list of 1536 floats repr
app/backend/rag/embeddings.py:43
↓ 1 callersFunctionevent_generator
()
app/backend/routes/messages.py:171
↓ 1 callersFunctionformatDetail
* Normalize FastAPI's polymorphic `detail` field into a human-readable string. * * Handlers return `{"detail": "..."}` for most errors, but the defa
app/frontend/src/lib/authApi.ts:57
↓ 1 callersFunctionformatRelativeTime
(dateStr: string)
app/frontend/src/components/Sidebar.tsx:10
↓ 1 callersFunctionformatResetTime
(iso: string)
app/frontend/src/components/ChatArea.tsx:14
↓ 1 callersFunctiongetConversation
(id: string)
app/frontend/src/lib/api.ts:151
↓ 1 callersFunctiongetConversations
()
app/frontend/src/lib/api.ts:146
↓ 1 callersFunctionget_database_url
Resolve DATABASE_URL, preferring the environment over the ini value. alembic.ini ships with `sqlalchemy.url = env(DATABASE_URL)`, but Alembic
app/backend/alembic/env.py:34
↓ 1 callersFunctionhandleDelete
(video: AdminVideo)
app/frontend/src/pages/AdminVideos.tsx:57
↓ 1 callersFunctionhandleRenameCommit
()
app/frontend/src/components/Sidebar.tsx:94
↓ 1 callersFunctionhandleResync
(video: AdminVideo)
app/frontend/src/pages/AdminVideos.tsx:73
↓ 1 callersFunctionhandleSelect
(id: string)
app/frontend/src/components/Sidebar.tsx:500
↓ 1 callersFunctionhash_password
Hash a plaintext password with bcrypt. Returns UTF-8 string for DB storage.
app/backend/auth/password.py:15
↓ 1 callersFunctionhighlightMatch
(title: string, query: string)
app/frontend/src/components/Sidebar.tsx:38
↓ 1 callersFunctioningestVideo
(body: IngestVideoBody)
app/frontend/src/lib/api.ts:177
↓ 1 callersFunctioningest_dynamous_content
Walk *content_dir* and upsert all `*.md` transcripts. Returns a counts dict: `{scanned, unchanged, ingested, errors}`. Idempotent on no-cont
app/backend/ingest/dynamous.py:137
↓ 1 callersFunctionlogin
(email: string, password: string)
app/frontend/src/lib/authApi.ts:104
↓ 1 callersFunctionlogout
()
app/frontend/src/lib/authApi.ts:110
↓ 1 callersFunctionmain
()
app/backend/scripts/sync_channel.py:34
↓ 1 callersFunctionmain
(args: argparse.Namespace)
app/backend/scripts/eval_retrieval.py:190
↓ 1 callersFunctionmain
()
app/backend/scripts/migrate_sqlite_to_pg.py:234
↓ 1 callersFunctionmain
()
scripts/transcribe_all.py:332
↓ 1 callersFunctionmigrate
(sqlite_path: Path, pg_dsn: str)
app/backend/scripts/migrate_sqlite_to_pg.py:90
↓ 1 callersFunctionrename
(id: string, title: string)
app/frontend/src/hooks/useConversations.ts:31
↓ 1 callersFunctionrenameConversation
(id: string, title: string)
app/frontend/src/lib/api.ts:155
↓ 1 callersFunctionresolveStale
()
app/frontend/src/hooks/useConversations.test.ts:60
↓ 1 callersFunctionrun_migrations_offline
()
app/backend/alembic/env.py:108
↓ 1 callersFunctionrun_seed
Insert all 10 seed videos into the database with full chunking + embedding.
app/backend/data/seed.py:317
↓ 1 callersFunctionsearchAdminVideos
(q: string)
app/frontend/src/lib/api.ts:216
↓ 1 callersFunctionsignup
(email: string, password: string)
app/frontend/src/lib/authApi.ts:98
↓ 1 callersFunctionstatusLine
Compose the live status line. `label` is the tool-aware text from the * backend (issue #223); `subject` is the legacy raw query/id kept as a * fal
app/frontend/src/components/Message.tsx:34
← previousnext →101–200 of 964, ranked by callers