MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _default_filename

Function _default_filename

src/command_system/export_command.py:142–149  ·  view source on GitHub ↗

`` - .txt`` or ``conversation- .txt`` (export.tsx:85-91).

(messages: Any)

Source from the content-addressed store, hash-verified

140
141
142def _default_filename(messages: Any) -> str:
143 """``<ts>-<slug>.txt`` or ``conversation-<ts>.txt`` (export.tsx:85-91)."""
144 first_prompt = extract_first_prompt(messages)
145 timestamp = format_timestamp(datetime.now())
146 sanitized = sanitize_filename(first_prompt) if first_prompt else ""
147 if sanitized:
148 return f"{timestamp}-{sanitized}.txt"
149 return f"conversation-{timestamp}.txt"
150
151
152@dataclass(frozen=True)

Callers 1

runMethod · 0.85

Calls 4

extract_first_promptFunction · 0.85
format_timestampFunction · 0.85
sanitize_filenameFunction · 0.85
nowMethod · 0.80

Tested by

no test coverage detected