feat: translate plugin hooks for OpenCode

Ouverte
#114 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
22/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active

Piste de recherche

Start with the OpencodeTranslator class, where hooks() currently returns null, and the note that users see when hooks are skipped. Then read the hook scripts shipped by the VGV plugins to see what PreToolUse and PostToolUse expect as input. The work is to design and install a small OpenCode plugin that calls those scripts, and to extend doctor and uninstall to cover it. Done means the hooks run on OpenCode after vgv_ai install and the note is gone.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

feature

Description

vgv_ai install configures OpenCode with the skills, agents and MCP servers, but not the hooks. OpencodeTranslator leaves hooks() null because OpenCode runs hooks as JavaScript/TypeScript plugins (docs), not as shell commands, so users only get a note.

The VGV plugins rely on hooks for enforcement, for example vgv-ai-flutter-plugin runs dart analyze/dart format after edits and blocks flutter test in the shell in favor of the MCP tool. On OpenCode none of that runs.

Add hook support for OpenCode, e.g. by installing a small OpenCode plugin that maps the plugins' PreToolUse/PostToolUse hooks onto OpenCode's plugin events and runs the existing hook scripts.

Requirements

  • OpenCode runs the VGV plugins' hook scripts after vgv_ai install
  • doctor and uninstall cover the installed OpenCode plugin
  • The "no hooks" note is removed for OpenCode

Additional Context

Moved from VeryGoodOpenSource/vgv-ai-flutter-plugin#127.

Langage dominant
Dart
Étoiles
3
Forks
0
Merge moyen
2 j 4 h
PR mergées (30 j)
40

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de VeryGoodOpenSource/vgv_ai_cli

Toutes les issues de VeryGoodOpenSource/vgv_ai_cli

Issues similaires

Plus d'issues Dart

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.