Skip to main content

Testing and commit AI

Testing: Jest In A Split (Local Plugin)

This is one of the most valuable "hidden" workflows.

Keymaps:

  • leader-tt run nearest test
  • leader-tT run entire file
  • leader-td debug nearest test
  • leader-tD debug entire file
  • leader-tu update snapshots (nearest)
  • leader-tU update snapshots (file)
  • leader-tq close the test terminal

Close semantics: q in normal mode closes a terminal buffer only inside the Jest split created by this plugin (util.terminal.run_in_split sets that mapping locally on its own terminal buffer). Opening any other terminal (:terminal, a different plugin's terminal, etc.) never gets q rebound — there is no global TermOpen mapping, so unrelated terminal jobs are never closed as a side effect.

Git: Commit Message Summarizer (Local Plugin)

In a gitcommit buffer, generate a Conventional Commit message from the staged diff (git diff --cached).

Keymaps:

  • leader-aisc summarize via OpenRouter (personal) or Gemini (work)
  • leader-aisg summarize via Gemini (personal only)

Output format notes:

  • Header: type(scope?): summary
  • Type selection: prefer behavior/functionality, then bug fixes, then chores/maintenance; use docs only for docs-only diffs.
  • Runtime guard: if a provider still returns docs(...) for a staged diff that includes non-doc paths, the plugin rewrites the header to a non-doc fallback type.
  • Bullet points: one bullet per changed functionality (or per distinct logical change)

Environment variables:

ProviderRequiredOptional
OpenRouterOPENROUTER_API_KEYNone. The route is fixed to z-ai/glm-5.3-flash with reasoning.effort: "high", no provider.sort (uptime-aware default LB), preferred_min_throughput: 30, and max_tokens: 131072 (top-provider max completion; 1,048,576-token context). OpenRouter deprioritizes slower endpoints rather than hard-excluding them. Same model as the wrapper/Pi/OMP GLM route, but independent of it: no lane preset and no quantization filter.
GeminiGEMINI_API_KEYGEMINI_MODEL (default gemini-flash-latest, 1,048,576-token input limit), GEMINI_MAX_OUTPUT_TOKENS (default 65536, Gemini 3.6 Flash output cap)

The plugin sends the full staged diff. OpenRouter requests always enable the context-compression plugin, so prompts that exceed the 1,048,576-token window are compressed instead of failing at the model context boundary.

Transport failures are reported directly in the Neovim notification. For example, curl exit 28 means the provider request reached the configured timeout; inspect :messages for the captured curl stderr/body preview.