Skip to main content

Module common

Module common 

Source
Expand description

Common utilities shared across watcher implementations. Common utilities shared across watcher implementations.

This module provides helper functions for parsing timestamps, roles, and UUIDs that are used by multiple watcher implementations. It also provides the platform-specific path to VS Code’s global storage directory.

Functions§

parse_role
Parses a role string into a MessageRole.
parse_timestamp_millis
Parses a timestamp from milliseconds since Unix epoch.
parse_timestamp_rfc3339
Parses a timestamp from an RFC3339 formatted string.
parse_uuid_or_generate
Parses a string as a UUID, or generates a new one if parsing fails.
vscode_global_storage
Returns the platform-specific path to VS Code’s global storage directory.