🔍 Code Extractor

Browse Components

Showing 20 of 2143 components

  • function get_user_name

    Retrieves the current user's name from the Flask session object, returning 'Unknown User' if not found.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 525-527

    flask session authentication user-management web-application
  • function get_user_email

    Retrieves the email address of the currently authenticated user from the Flask session object.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 521-523

    flask session authentication user-management email
  • function get_user_id

    Retrieves the current user's email address from the Flask session object, returning 'unknown' if not found.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 517-519

    authentication session user-identification flask web-application
  • function is_authenticated

    Checks if a user is authenticated by verifying the presence of 'user' and 'access_token' keys in the Flask session object.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 504-506

    authentication authorization session-management flask security
  • function init_chat_engine

    Initializes a global chat engine instance using the OneCo_hybrid_RAG class and logs the initialization status.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 475-484

    initialization chat-engine RAG hybrid-rag global-state
  • function add_cache_headers

    A Flask after_request decorator function that adds HTTP cache control headers to responses based on the application's debug mode, content type, and request endpoint.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 439-455

    flask http-headers caching cache-control middleware
  • function inject_cache_buster

    Flask context processor that injects cache busting variables into all Jinja2 templates to prevent browser caching of static assets.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 429-435

    flask context-processor cache-busting template-injection static-assets
  • function get_cache_buster

    Returns a cache-busting string that varies based on the application mode: current timestamp in debug mode or a static version string in production mode.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 424-426

    cache-busting web-development static-assets versioning flask
  • class ChatSession

    A class that manages a chat session associated with a specific document section, tracking messages, context documents, references, and timestamps.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 345-396

    chat session-management conversation document-chat message-tracking
  • class ComplexDocument

    A class representing a complex document with multiple sections, supporting section management, references, metadata, and serialization capabilities.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 272-343

    document-management data-structure serialization content-management section-management
  • class DocumentSection

    A class representing a section within a complex document, supporting hierarchical structure with headers, text content, and references.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 230-270

    document-management data-structure serialization document-section hierarchical-data
  • function clear_user_uploaded_documents

    Removes all uploaded documents associated with a specific user from the application state in a thread-safe manner.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 224-228

    user-management document-cleanup thread-safe state-management memory-cleanup
  • function remove_uploaded_document

    Removes a specific uploaded document from the application state for a given user, with thread-safe locking and automatic cleanup of empty user entries.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 213-222

    document-management state-management thread-safe deletion cleanup
  • function get_uploaded_document

    Retrieves a specific uploaded document from the application state for a given user and document ID, returning document metadata and content in a thread-safe manner.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 200-211

    document-retrieval thread-safe state-management user-documents flask
  • function get_user_uploaded_documents

    Retrieves all uploaded documents associated with a specific user from a thread-safe global application state dictionary.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 195-198

    document-management user-data thread-safe concurrency state-management
  • function store_uploaded_document

    Stores uploaded document metadata and content in a thread-safe application state dictionary, organized by user email and document ID.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 181-193

    document-storage thread-safe file-upload state-management user-data
  • function load_chat_session_from_file

    Loads a chat session from a JSON file stored in the CHAT_SESSIONS_DIR directory using the provided session_id as the filename.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 152-164

    file-io persistence chat session-management json
  • function save_chat_session_to_file

    Persists a chat session object to a JSON file in the designated chat sessions directory, using the session's ID as the filename.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 141-150

    file-io persistence serialization json chat
  • function delete_document_file

    Deletes a document file from the file system based on the provided document ID, removing the corresponding JSON file from the DOCUMENTS_DIR directory.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 131-139

    file-management deletion document-management file-system cleanup
  • function load_all_documents

    Loads all JSON documents from a designated documents directory and returns them as a dictionary indexed by document ID.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 115-129

    file-io json document-loading bulk-operations error-handling