(config: &Config)
| 362 | } |
| 363 | |
| 364 | fn print_tables_info(config: &Config) { |
| 365 | let history_exists = config.history_file().exists(); |
| 366 | let jhistory_exists = config.jhistory_file().exists(); |
| 367 | let transcripts_exists = config.projects_dir().exists() || config.transcripts_dir().exists(); |
| 368 | let todos_exists = config.todos_dir().exists(); |
| 369 | |
| 370 | println!("TABLES"); |
| 371 | println!("══════════════════════════════════════════════════════════════════════════════\n"); |
| 372 | |
| 373 | // history |
| 374 | let status = if history_exists { "✓" } else { "✗" }; |
| 375 | println!( |
| 376 | "{} history {}", |
| 377 | status, |
| 378 | config.history_file().display() |
| 379 | ); |
| 380 | println!(" ├── display TEXT The prompt text you typed"); |
| 381 | println!(" ├── timestamp INTEGER Unix timestamp (milliseconds)"); |
| 382 | println!(" ├── project TEXT Project directory path"); |
| 383 | println!(" └── pastedContents OBJECT Pasted content (JSON)\n"); |
| 384 | |
| 385 | // jhistory |
| 386 | let status = if jhistory_exists { "✓" } else { "✗" }; |
| 387 | println!( |
| 388 | "{} jhistory {}", |
| 389 | status, |
| 390 | config.jhistory_file().display() |
| 391 | ); |
| 392 | println!(" ├── display TEXT Prompt text (normalized from text)"); |
| 393 | println!(" ├── timestamp INTEGER Unix timestamp (milliseconds)"); |
| 394 | println!(" ├── session_id TEXT Codex session id"); |
| 395 | println!(" ├── text TEXT Raw prompt text"); |
| 396 | println!(" └── ts INTEGER Raw Unix timestamp (seconds)\n"); |
| 397 | println!(" Alias: codex_history\n"); |
| 398 | |
| 399 | // transcripts |
| 400 | let status = if transcripts_exists { "✓" } else { "✗" }; |
| 401 | println!( |
| 402 | "{} transcripts {}", |
| 403 | status, |
| 404 | config.projects_dir().display() |
| 405 | ); |
| 406 | println!(" ├── _source_file TEXT Source file name"); |
| 407 | println!(" ├── _session_id TEXT Session ID (parent session for subagents)"); |
| 408 | println!(" ├── _project TEXT Project slug dir (NULL for legacy files)"); |
| 409 | println!(" ├── _agent_id TEXT Subagent file stem (NULL otherwise)"); |
| 410 | println!(" ├── type TEXT 'user' | 'assistant' | 'tool_use' | …"); |
| 411 | println!(" ├── timestamp TEXT ISO 8601 timestamp"); |
| 412 | println!(" ├── message OBJECT Message incl. usage/cache tokens"); |
| 413 | println!(" ├── content TEXT Message text (type='user')"); |
| 414 | println!(" ├── tool_name TEXT Tool name (type='tool_*')"); |
| 415 | println!(" ├── tool_input OBJECT Tool parameters"); |
| 416 | println!(" ├── tool_output OBJECT Tool response (type='tool_result')"); |
| 417 | println!(" ├── model TEXT Model id (assistant rows)"); |
| 418 | println!(" └── usage_* INTEGER/TEXT Flattened message.usage token columns\n"); |
| 419 | |
| 420 | // sessions |
| 421 | let status = if transcripts_exists { "✓" } else { "✗" }; |
no test coverage detected