🔍 Code Extractor

Browse Components

Showing 20 of 1000 components

  • function user_guide

    Flask route handler that renders and displays the user guide page for the application.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 824-826

    flask web-route template-rendering user-guide documentation
  • function logout

    Flask route handler that logs out the current user by clearing their session and redirecting them to either the login page or index page based on authentication requirements.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 781-789

    authentication logout session-management flask-route user-management
  • function azure_callback

    OAuth 2.0 callback endpoint for Azure AD authentication that exchanges authorization codes for access tokens and establishes user sessions.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 734-777

    oauth authentication azure-ad callback session-management
  • function login

    Flask route handler that renders the login page for user authentication, with support for Azure SSO integration and automatic redirection for authenticated users or when authentication is disabled.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 714-730

    authentication login flask-route session-management azure-sso
  • function init_engines

    Initializes the RAG (Retrieval-Augmented Generation) engine and document indexer components, loads persisted sessions, and optionally starts background auto-indexing of documents.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 636-701

    initialization RAG document-indexing background-processing threading
  • function process_chat_background

    Processes chat requests asynchronously in a background thread, managing RAG engine interactions, progress updates, and session state for various query modes including basic, extensive, full_reading, and deep_reflection.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 517-628

    background-processing async rag chat document-retrieval
  • function get_document_info

    Retrieves indexing status and metadata for a document, including whether it's indexed, its document ID, chunk count, and reindexing status.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 479-514

    document-management indexing metadata vector-database chromadb
  • function build_document_tree_recursive

    Recursively builds a complete hierarchical tree structure of documents and folders from a target directory path, filtering for supported file types and skipping hidden/cache directories.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 404-476

    file-system directory-traversal recursive document-management tree-structure
  • function build_document_tree_lazy

    Builds a single-level document tree structure for lazy loading, scanning only immediate children of a target directory without recursively loading subdirectories.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 325-401

    file-system directory-tree lazy-loading document-management file-browser
  • function save_config_to_file

    Persists current application configuration values from the config module to a .env file, maintaining existing entries and formatting multi-value fields appropriately.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 284-322

    configuration persistence file-io environment-variables dotenv
  • function update_session_settings

    Updates the settings (model, mode, options) for an existing chat session and persists the changes to disk.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 274-281

    session-management settings persistence thread-safe chat
  • function add_message_to_session

    Adds a message to a chat session with thread-safe locking, storing role, content, timestamp, and optional metadata/references, then persists the session to disk.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 243-261

    chat session-management thread-safe messaging persistence
  • function get_or_create_session

    Retrieves an existing chat session by ID or creates a new one if it doesn't exist, with thread-safe access and persistent storage support.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 223-240

    session-management chat thread-safe persistence caching
  • function cleanup_old_tasks

    Removes tasks from the active_tasks dictionary that are older than 1 hour (3600 seconds) based on their creation timestamp.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 208-220

    cleanup maintenance task-management thread-safe memory-management
  • function complete_task

    Updates the status of a task to 'completed' in a thread-safe manner, storing the result and completion timestamp.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 184-190

    task-management threading concurrency state-management thread-safe
  • function update_task_progress

    Thread-safe function that updates the progress and timestamp of an active task identified by task_id in a shared dictionary.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 176-181

    task-management progress-tracking thread-safe concurrency locking
  • function create_task

    Creates and registers a new background task in a thread-safe manner by initializing its metadata in a shared dictionary with status tracking, progress information, and timestamps.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 163-173

    task-management background-tasks thread-safe concurrency task-tracking
  • function load_all_sessions

    Loads all chat session data from JSON files stored in a sessions directory into memory on application startup.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 149-160

    session-management persistence initialization disk-io thread-safe
  • function load_session_from_disk

    Loads a session from disk storage by reading a JSON file identified by session_id, deserializing the data, and converting timestamp strings back to datetime objects.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 133-146

    session-management persistence file-io deserialization json
  • function save_session_to_disk

    Persists a chat session to disk by serializing session data to a JSON file, converting datetime objects to ISO format strings.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 117-130

    persistence serialization session-management file-io json