CLI Enhancements and PTY Streaming Fix#8
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Code Review
This pull request introduces a suite of new CLI commands (init, status, attach, stop, logs) for terminal-based session management and refactors the PTY streaming backend to decouple raw binary data from decoded text, ensuring bit-perfect terminal output. Additionally, it refines transcript filtering to better preserve Markdown structure and updates documentation to reflect these changes. Feedback was provided to enhance type safety in the CLI by replacing a generic type assertion with a more specific interface.
| JOIN agent_profiles p ON p.id = s.agent_profile_id | ||
| WHERE s.status = 'running' | ||
| ORDER BY s.created_at DESC | ||
| `).all() as any[]; |
There was a problem hiding this comment.
The type assertion as any[] can be made more specific to improve type safety and maintainability. Consider defining an interface that accurately reflects the structure of the objects returned by this SQL query, which includes all fields from the Session type and the profile_name alias.
| `).all() as any[]; | |
| `).all() as (Session & { profile_name: string })[]; |
This PR introduces several power-user CLI features (init, status, attach, logs, stop) and refactors the PTY streaming pipeline to ensure bit-perfect output for agent traces. It also relaxes transcript filters to preserve agent reasoning states.