Skip to content

Conversation

@jwiegley
Copy link
Contributor

@jwiegley jwiegley commented Feb 4, 2026

Summary

  • Nix flake packaging: Add flake.nix with NixOS and Home Manager modules, comprehensive settings options (includePromptsInRepositories, defaultPromptStorage), and documentation
  • git-ai search command: Search AI prompt sessions by commit, commit range, file (with line ranges), pattern, or prompt ID — with JSON, verbose, and summary output modes
  • git-ai continue command: Restore AI session context from search results, with launch (spawns Claude Code), clipboard, and interactive TUI session selection modes
  • git-ai-search skill: Claude Code skill for AI context discovery using the new search/continue commands
  • Toolchain pinning: Pin Rust toolchain to 1.93.0 via rust-overlay; add libexec symlink for Fork git client compatibility
  • Integration tests: Comprehensive test suites for both search and continue commands

Test plan

  • cargo test passes for existing and new integration tests
  • git-ai search --commit <sha> returns prompt metadata for a known commit
  • git-ai search --file <path> --lines <range> filters correctly
  • git-ai continue --commit <sha> outputs formatted context blocks
  • git-ai continue --commit <sha> --launch spawns Claude Code with context
  • nix build produces a working git-ai binary
  • NixOS and Home Manager module options validate correctly

🤖 Generated with Claude Code


Open with Devin

@jwiegley jwiegley force-pushed the johnw/continue branch 5 times, most recently from bf56b1b to 46a9a34 Compare February 7, 2026 05:55
@svarlamov svarlamov self-assigned this Feb 7, 2026
@jwiegley jwiegley force-pushed the johnw/continue branch 2 times, most recently from f5293c4 to bd33c43 Compare February 8, 2026 06:33
jwiegley and others added 4 commits February 11, 2026 09:35
Implement two new commands for querying and restoring AI prompt history:

- `git-ai search` finds AI sessions by commit, file/line range, text
  pattern, or prompt ID with five output formats (default, JSON, verbose,
  porcelain, count) and filters for tool, author, and time range.

- `git-ai continue` restores conversation context from prompt history
  and delivers it via agent launch (using Unix exec() for proper terminal
  passthrough), clipboard, JSON, or stdout with secret redaction and
  message truncation.

Also adds format_transcript() utility for rendering PromptRecord messages
as labeled text, and comprehensive integration tests for both commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Register the git-ai-search skill alongside the existing prompt-analysis
skill so it deploys automatically when git-ai installs into Claude Code
environments. The SKILL.md provides workflow-oriented documentation with
decision tables, seven usage patterns, command references, and integration
examples for CI/CD and shell scripting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When launching an agent with `git ai continue --launch`, the agent
now starts silently by default. Pass `--summary` to have the agent
produce a brief overview of what was being worked on, what was
accomplished, and what remains before prompting for input.

Also refactors launch_agent() to build the command incrementally,
keeping the unix exec() and non-unix subprocess paths in sync.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enhance the continue command to provide comprehensive context when
restoring AI sessions. Previously, only conversation history and basic
commit metadata were included; the restored agent lacked the broader
repository context needed to continue work effectively.

Add helper functions to retrieve commit diffs (get_commit_diff),
project instructions from CLAUDE.md (read_project_context), and
current git status (get_git_status_info). Introduce SessionContext
struct and gather_session_context to centralize context collection,
replacing scattered inline logic in both CLI and TUI code paths.

The restored session now includes: full commit messages (not just
subject lines), commit diffs with stat and patch output, CLAUDE.md
project instructions, and current branch/recent commit status. All
context is size-limited (100KB diffs, 50KB CLAUDE.md) and secrets
are redacted before output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jwiegley and others added 2 commits February 11, 2026 10:00
Use floor_char_boundary() before slicing strings at byte offsets
in get_commit_diff() and read_project_context(). Without this,
truncating at MAX_DIFF_BYTES or MAX_CONTEXT_BYTES could land in
the middle of a multi-byte UTF-8 character, causing a panic when
processing diffs or project files containing non-ASCII content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolve all clippy lints found during PR review:
- Collapse nested if statements using let-chains (Rust 2024)
- Remove unnecessary return statement in exec() error path
- Use push('\n') instead of push_str("\n")
- Use replace(['\t', '\n'], " ") instead of chained replace()
- Use RangeInclusive::contains for date validation
- Use struct initialization with ..Default::default()
- Rename SearchMode variants to drop redundant By prefix
- Remove unused merge_results function
- Warn when using unimplemented --since/--until filters

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jwiegley jwiegley marked this pull request as ready for review February 11, 2026 19:22
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

View 6 additional findings in Devin Review.

Open in Devin Review

Address PR git-ai-project#459 review comments:

1. continue_session.rs: --json flag now prevents auto-launch to agent.
   Previously, running `git-ai continue --commit X --json` in an
   interactive terminal would pass JSON to launch_agent() instead of
   printing to stdout, breaking scripting/pipeline use.

2. search.rs: Fix byte-length vs char-count mismatch in ellipsis logic.
   The snippet uses chars().take(80) but the ellipsis check used
   text.len() (byte length), causing spurious "..." on multi-byte text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

View 10 additional findings in Devin Review.

Open in Devin Review

jwiegley and others added 3 commits February 11, 2026 12:18
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Remove duplicate `let (messages_to_show, omitted) =` that caused a
parse error ("expected expression, found let statement") on all CI
platforms. Also iterate with `&messages_to_show` so pattern-matched
`text` fields bind as `&String` (auto-deref to `&str`), fixing the
type mismatch errors on push_str calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 13 additional findings in Devin Review.

Open in Devin Review

Pass ContinueOptions through to handle_continue_tui so that flags like
--summary, --max-messages, --clipboard, and --json are respected when the
user enters interactive mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 16 additional findings in Devin Review.

Open in Devin Review

jwiegley and others added 2 commits February 11, 2026 12:49
Five tests in opencode.rs race on the GIT_AI_OPENCODE_STORAGE_PATH
environment variable when run in parallel, causing intermittent CI
failures. Add #[serial_test::serial] to serialize them, matching the
pattern already used in github_copilot.rs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The --max-messages flag was silently ignored in JSON output mode.
Extract message filtering and truncation outside the json! macro
so both text and JSON formats respect the same limit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 17 additional findings in Devin Review.

Open in Devin Review

The --workdir flag was silently accepted but never applied to search
results. Add a warning message matching the pattern used by --since
and --until so users know the filter is currently a no-op.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 18 additional findings in Devin Review.

Open in Devin Review

handle_continue_tui was unconditionally using format_context_block,
ignoring the options.json flag. Now checks options.json to select
between format_context_json and format_context_block, matching the
non-interactive code path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

View 21 additional findings in Devin Review.

Open in Devin Review

When --file was specified a second time, the parser cloned line_ranges
from the previous file into the new one. A new --file should always
start with empty line_ranges. Fixed in both search and continue
argument parsers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@svarlamov svarlamov merged commit 95a4eb5 into git-ai-project:main Feb 11, 2026
14 checks passed
@jwiegley jwiegley deleted the johnw/continue branch February 11, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants