Refactor ListLatestSessionsForViewer to use a map for tracking seen resource IDs, ensuring only the newest session per resource is kept. Add a test case to verify correct deduplication across paginated API responses.
This commit removes support for listing agent sessions scoped to a specific repository, including the ListSessionsForRepo method and related tests. The list command now always lists the latest sessions for the viewer, simplifying the code and user experience. Test and mock code have been updated accordingly.
Updated the agent-task command to provide improved usage, long description, argument annotations, and examples. This enhances the CLI user experience by clarifying how to use the command and identify agent tasks.
Simplified and clarified comments in the stripDiffFormat function to improve readability and maintainability. No functional changes were made to the code.
Replaces manual string splitting with filepath.Ext for determining the file extension in renderFileContentAsMarkdown. This improves accuracy, especially for files with multiple dots in their names.
Refactors log rendering to print errors to stderr and continue processing on JSON parse or rendering failures, instead of returning early. Updates tests to check both stdout and stderr outputs, and adds new test cases and testdata for tolerant parsing and error scenarios.
Shell commands in log output are now prefixed with '$ ' for improved readability and consistency with common shell output conventions. Updated related test data and test helper comments to reflect this change.
Moved the genericToolCallNamesToTitles map from inside the renderGenericToolCall function to a package-level variable for improved readability and potential reuse. This change also updates the function signature order for consistency.
Introduces use of a pager for log output in the printLogs function. If the pager fails to start, an error message is printed to stderr. This improves log readability for long outputs.
Uncomments and activates support for Bash session tool calls (write_bash, read_bash, stop_bash, async_bash, read_async_bash, stop_async_bash) in the renderLogEntry function. Also defines the corresponding argument structs, enabling proper handling and display of these tool calls in the log output.
Renamed sample log input and expected output files in testdata to use a consistent 'log-*-input.txt' and 'log-*-want.txt' naming scheme. Updated references in log_test.go to match the new file names for improved clarity and maintainability.
A comment was added to TestFollow with instructions on how to update the .want testdata files when test outputs change. This helps maintainers regenerate expected output files more easily.