Repository navigation
Conversation
- mob next reads <git dir>/mob/last-file.json written by editor plugins
(e.g. the IntelliJ mob last file plugin) and uses its file and line if
it is valid, newer than the last commit and the file exists; otherwise
it falls back to the last modified file
- The line is stored as lastLine: below lastFile: in the wip commit
message, which older mob versions ignore
- MOB_OPEN_COMMAND supports the named placeholders %{file} and %{line};
%s and commands without placeholders keep working
- Document the editor state file format for other editor plugins
- Bump version to 5.5.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XSv7vC67mr1W5WkDX3L96F
The editor state file may contain the optional, informational fields plugin and pluginVersion; mob --debug shows them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XSv7vC67mr1W5WkDX3L96F
- lastfile.go: lastFile, the lastFileSource interface, source order, commit message writing and parsing - lastfile_editorstate.go: editor state file source - lastfile_modified.go: last modified file source, including the helpers moved from mob.go - Tests split accordingly; no behavior change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XSv7vC67mr1W5WkDX3L96F
This branch has not been deployed
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.
What
mob nextcan now remember the file and line you were last looking at in your editor, not only the file you modified last. Editor plugins provide this information through a small, documented state file, e.g. the new IntelliJ mob last file plugin.Editor state file:
mob nextreads<git dir>/mob/last-file.json. It uses the file only if all of these hold:updatedAtis newer than the last commitOtherwise it falls back to the last modified file as before. There is no configuration;
mob --debugshows which source was used and why.Commit message:
lastFile:is unchanged. A newlastLine:line is added below it, only when a line is known:Open command:
MOB_OPEN_COMMANDsupports the named placeholders%{file}and%{line}, e.g.code -g %{file}:%{line}oridea --line %{line} %{file}.%{line}is1when the commit has no line.%sand commands without placeholders work as before.Code structure: The logic lives in
lastfile.gobehind a small source abstraction (editor state file → last modified file), so more sources can be added later.Docs and version: The README documents the open command placeholders and the state file format for other editor plugins. CHANGELOG is updated, and the version is bumped to 5.5.0.
Backwards compatibility / mixed teams
lastFileas before, ignoreslastLine%{line}= 1%{line}Tests
lastLine%{file}-L%{line}, at the right line by this version.Generated by Claude Code