feat(statusline): triggers para planificando y puliendo
Los dos estados activos que no tenian disparador ahora se asignan de forma determinista en el PostToolUse: - planificando: al usar TodoWrite / ExitPlanMode / EnterPlanMode. - puliendo: al editar (Edit/Write/MultiEdit/NotebookEdit) cuando la fase actual ya era testeando o puliendo, es decir retoques finales sobre algo ya probado. Una edicion normal (sin testeo previo) sigue siendo haciendo; volver a testear saca de puliendo. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ F="$HOME/.claude/goals/${SID}.json"
|
||||
[ -f "$F" ] || exit 0
|
||||
GOAL=$(jq -r '.goal // ""' "$F" 2>/dev/null)
|
||||
[ -z "$GOAL" ] && exit 0
|
||||
CUR=$(jq -r '.phase // ""' "$F" 2>/dev/null)
|
||||
|
||||
TOOL=$(printf '%s' "$INPUT" | jq -r '.tool_name // empty' 2>/dev/null)
|
||||
[ -z "$TOOL" ] && exit 0
|
||||
@@ -23,7 +24,13 @@ case "$TOOL" in
|
||||
Read|Grep|Glob|NotebookRead|WebFetch|WebSearch|ToolSearch)
|
||||
PHASE=investigando ;;
|
||||
Edit|Write|MultiEdit|NotebookEdit)
|
||||
PHASE=haciendo ;;
|
||||
# Editar tras haber testeado = retoques finales -> puliendo. Si no, es
|
||||
# implementacion normal -> haciendo.
|
||||
case "$CUR" in
|
||||
testeando|puliendo) PHASE=puliendo ;;
|
||||
*) PHASE=haciendo ;;
|
||||
esac
|
||||
;;
|
||||
Task|Agent|Workflow)
|
||||
PHASE=haciendo ;;
|
||||
Bash)
|
||||
@@ -41,9 +48,11 @@ case "$TOOL" in
|
||||
PHASE=investigando ;;
|
||||
mcp__registry__fn_run)
|
||||
PHASE=haciendo ;;
|
||||
TodoWrite|ExitPlanMode|EnterPlanMode|Plan)
|
||||
PHASE=planificando ;;
|
||||
*)
|
||||
# Herramientas que no representan un cambio de actividad (TodoWrite,
|
||||
# AskUserQuestion, etc.): no tocar la fase.
|
||||
# Herramientas que no representan un cambio de actividad (AskUserQuestion,
|
||||
# etc.): no tocar la fase.
|
||||
exit 0 ;;
|
||||
esac
|
||||
[ -z "$PHASE" ] && exit 0
|
||||
|
||||
Reference in New Issue
Block a user