Skip to content

Commit 7613538

Browse files
committed
feat(pr-review): add task hierarchy visualization
Introduce ASCII tree visualization of task hierarchy for debugging purposes. This includes generating task statistics such as total tasks, done, failed, and in-progress tasks.
1 parent a532f81 commit 7613538

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

src/workflows_mcp/templates/agents/pr-review/action/main.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,22 @@ blocks:
187187
platform: "{{ inputs.platform }}"
188188
approve: "{{ inputs.approve }}"
189189

190+
# ============================================================================
191+
# VISUALIZATION: Generate ASCII tree of task hierarchy
192+
# ============================================================================
193+
- id: visualize_state
194+
type: Workflow
195+
description: Generate ASCII tree visualization of task hierarchy for debugging.
196+
condition: "{{ inputs.state | trim != '' }}"
197+
depends_on:
198+
- track_done
199+
inputs:
200+
workflow: agent-state-visualize
201+
inputs:
202+
state: "{{ inputs.state }}"
203+
show_data: true
204+
max_depth: 0
205+
190206
outputs:
191207
final_report:
192208
value: "{{ inputs.report }}"
@@ -208,3 +224,13 @@ outputs:
208224
{{ blocks.post_github_comment.succeeded or blocks.post_gitlab_comment.succeeded }}
209225
type: bool
210226
description: "Whether a comment was successfully posted to the remote platform."
227+
228+
task_tree:
229+
value: "{{ blocks.visualize_state.outputs.tree | default('') }}"
230+
type: str
231+
description: "ASCII tree visualization of task hierarchy."
232+
233+
task_summary:
234+
value: "{{ blocks.visualize_state.outputs.summary | default({}) }}"
235+
type: dict
236+
description: "Task statistics (total_tasks, done, failed, in_progress, etc.)."

src/workflows_mcp/templates/agents/pr-review/main.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ blocks:
136136
repo_path: "{{ inputs.repo_path }}"
137137
base_branch: "{{ inputs.base_branch }}"
138138
head_branch: "{{ inputs.head_branch }}"
139+
workspace: "{{ tmp }}/pr-review-repo"
139140
state: "{{ blocks.state_management.outputs.state }}"
140141
parent_task_id: "{{ get(blocks.state_management.outputs.task, 'task_id', '') }}"
141142

@@ -259,3 +260,13 @@ outputs:
259260
value: "{{ blocks.initial_assessment.outputs.risk_level }}"
260261
type: str
261262
description: "Overall risk level assessment: critical, high, medium, low."
263+
264+
task_tree:
265+
value: "{{ blocks.action.outputs.task_tree | default('') }}"
266+
type: str
267+
description: "ASCII tree visualization of task hierarchy for debugging."
268+
269+
task_summary:
270+
value: "{{ blocks.action.outputs.task_summary | default({}) }}"
271+
type: dict
272+
description: "Task statistics (total_tasks, done, failed, total_duration, etc.)."

0 commit comments

Comments
 (0)