Skip to content

Add v0k fix for repairing failed commands#3

Merged
slhmy merged 3 commits into
mainfrom
copilot/v0k-fix-last-failed-command
May 8, 2026
Merged

Add v0k fix for repairing failed commands#3
slhmy merged 3 commits into
mainfrom
copilot/v0k-fix-last-failed-command

Conversation

Copilot AI commented May 8, 2026

Copy link
Copy Markdown
Contributor

Adds a v0k fix entrypoint that accepts failed-command context from shell integration, asks the existing AI healing flow for a correction, and can execute or preview the suggested command.

  • CLI

    • Added v0k fix
    • Supports --command, --exit-code, --dry-run, --explain, and --json
    • Prompts when the suggestion is low-confidence or potentially destructive
  • Shell integration

    • Shows setup guidance when v0k fix is run without --command
    • Documents optional bash/zsh wrapper:
v0k() {
  local exit_code=$?
  if [ "$1" = "fix" ]; then
    local last_cmd
    last_cmd="$(fc -ln -1)"
    command v0k fix --command "$last_cmd" --exit-code "$exit_code" "${@:2}"
  else
    command v0k "$@"
  fi
}
  • Output modes

    • Human-readable fix suggestion by default
    • JSON output for integrations
    • Dry-run mode to preview without execution
  • Coverage

    • Added CLI tests for missing shell-context guidance and dry-run JSON suggestions

Copilot AI and others added 2 commits May 8, 2026 08:07
Agent-Logs-Url: https://github.com/slhmy/v0k/sessions/58971081-4e1b-45e1-886b-c7f90859d0b8

Co-authored-by: slhmy <31381093+slhmy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/slhmy/v0k/sessions/58971081-4e1b-45e1-886b-c7f90859d0b8

Co-authored-by: slhmy <31381093+slhmy@users.noreply.github.com>
Copilot AI changed the title [WIP] Add v0k fix command to intelligently correct last failed command Add v0k fix for repairing failed commands May 8, 2026
Copilot AI requested a review from slhmy May 8, 2026 08:11
Copilot finished work on behalf of slhmy May 8, 2026 08:11
@slhmy slhmy marked this pull request as ready for review May 8, 2026 08:32
@slhmy slhmy merged commit c476dbe into main May 8, 2026
2 checks passed
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.

Feature: v0k fix 命令—智能修正并执行上一条失败命令

2 participants