Open
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a new standalone @diff command to Navie for retrieving code diffs in multiple formats.
- Registers a
DiffCommandin the command factory - Implements
DiffCommandsupportingtext,json, andjsonloutputs - Introduces
Diffin theCommandModeenum
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/navie/src/navie.ts | Imported and wired up DiffCommand in the command builder |
| packages/navie/src/commands/diff-command.ts | Created DiffCommand implementation with output format logic |
| packages/navie/src/command.ts | Added Diff mode to the CommandMode enum |
Comments suppressed due to low confidence (3)
packages/navie/src/commands/diff-command.ts:21
- [nitpick] Consider adding a doc comment above
DiffCommandto explain its purpose, usage, and available user options likeformatandbase.
export default class DiffCommand implements Command {
packages/navie/src/commands/diff-command.ts:1
- No tests appear to cover
DiffCommand. Add unit tests to verify thetext,json, andjsonloutput branches and invalid format handling.
import Command, { CommandRequest } from '../command';
packages/navie/src/commands/diff-command.ts:46
- Add a default branch or input validation for unsupported
formatvalues so users receive a clear error when passing an invalid format.
}
packages/navie/src/navie.ts
Outdated
| const buildDiffCommand = () => | ||
| new DiffCommand( | ||
| projectInfoService | ||
| ) |
There was a problem hiding this comment.
[nitpick] Add a semicolon after the buildDiffCommand arrow function definition to stay consistent with the project’s coding style.
Suggested change
| ) | |
| ); |
dustinbyrne
approved these changes
Jun 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Other Navie capabilities such as
@contextare accessible via @ command string.Because Navie performs special processing of the code diff, such as removal of binary files, having
@diffavailable as a standalone command can be useful when building workflows using Navie.Example
$ llm -f diff.json "List URL routes impacted by the change"Based on the changes in the code, here are the URL routes that were impacted:
Primary Authentication Routes:
/login- New login endpoint for form-based authentication/logout- New logout endpointRoutes with Added Security Requirements:
/owners/**- Now requires ROLE_ADMIN/owners/new- Now requires CSRF token and ROLE_ADMIN/owners/{ownerId}/edit- Now requires CSRF token and ROLE_ADMIN/owners/{ownerId}/pets/new- Now requires CSRF token and ROLE_ADMIN/owners/{ownerId}/pets/{petId}/edit- Now requires CSRF token and ROLE_ADMIN/owners/{ownerId}/pets/{petId}/visits/new- Now requires CSRF token and ROLE_ADMINPublic Routes (Explicitly Permitted):
/- Home page/oups- Error trigger page/error- Error page/webjars/**/css/**/js/**/images/**/resources/**The changes implement Spring Security with form-based authentication and require:
The security configuration allows anonymous access to the home page and static resources while protecting sensitive operations behind authentication and proper authorization.