ClaudeCode.Message.SystemMessage.FilesPersisted (ClaudeCode v0.36.3)
View SourceRepresents a files persisted event from the Claude CLI.
Emitted when files have been persisted during a session, containing metadata about each file that was saved.
Fields
:files- List of maps with:filenameand:file_idkeys:failed- List of maps with:filenameand:errorkeys for files that failed to persist:processed_at- ISO 8601 timestamp when files were processed:uuid- Message UUID:session_id- Session identifier
JSON Format
{
"type": "system",
"subtype": "files_persisted",
"files": [
{"filename": "example.ex", "file_id": "file-abc123"}
],
"uuid": "...",
"session_id": "..."
}
Summary
Functions
Type guard to check if a value is a FilesPersisted.
Creates a new FilesPersisted from JSON data.
Types
@type t() :: %ClaudeCode.Message.SystemMessage.FilesPersisted{ failed: [failed_entry()], files: [file_entry()], processed_at: String.t() | nil, session_id: String.t(), subtype: :files_persisted, type: :system, uuid: String.t() | nil }
Functions
Type guard to check if a value is a FilesPersisted.
Creates a new FilesPersisted from JSON data.
Examples
iex> FilesPersisted.new(%{
...> "type" => "system",
...> "subtype" => "files_persisted",
...> "files" => [%{"filename" => "test.ex", "file_id" => "file-1"}],
...> "session_id" => "session-1"
...> })
{:ok, %FilesPersisted{type: :system, subtype: :files_persisted, ...}}
iex> FilesPersisted.new(%{"type" => "assistant"})
{:error, :invalid_message_type}