🔍 Code Extractor

Browse Components

Showing 20 of 1485 components

  • function api_list_documents

    Flask API endpoint that retrieves and returns a list of all documents belonging to the authenticated user, including metadata like title, author, section count, and timestamps.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 694-715

    flask api rest-api documents list
  • function document_workspace

    Flask route handler that renders the main document workspace interface for authenticated users.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 687-689

    flask route-handler web-interface authentication document-workspace
  • function auth_callback

    OAuth callback handler that processes Azure SSO authentication responses, exchanges authorization codes for access tokens, and establishes user sessions.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 650-676

    oauth authentication azure-sso callback flask-route
  • function get_chat_session

    Retrieves a chat session by its unique session ID, first checking an in-memory cache, then falling back to loading from persistent file storage if not found in memory.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 616-630

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

    Creates a new chat session for a specific document section by generating a unique session ID, initializing a ChatSession object, storing it in application state with thread-safe locking, and persisting it to file.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 603-614

    chat session-management thread-safe uuid state-management
  • function save_document

    Saves a document object to both in-memory application state and persistent file storage, updating its timestamp in the process.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 594-601

    document-management persistence thread-safe storage state-management
  • function remove_uploaded_document_v1

    Removes a specific uploaded document from a user's document collection in the application state, with thread-safe locking and automatic cleanup of empty user entries.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 554-562

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

    Retrieves a specific uploaded document for a given user from a thread-safe global application state dictionary.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 548-552

    document-retrieval thread-safe user-data state-management locking
  • function store_uploaded_document_v1

    Stores an uploaded document in a thread-safe global application state dictionary, organizing documents by user email and document ID with metadata including name, content, file type, and upload timestamp.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py | Lines: 530-541

    document-storage thread-safe file-upload user-data chat-context
  • 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