-
Notifications
You must be signed in to change notification settings - Fork 31
modified pdd sync that shows stdout/error message at the bottom #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
modified pdd sync that shows stdout/error message at the bottom #81
Conversation
|
Do all the existing tests still work? |
|
Should we have new tests? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the pdd sync command to display stdout/stderr output from operations that were previously hidden by progress animations. The change allows users to see command output and interactive prompts that were being suppressed.
- Added output capture functionality with
capture_output()context manager andcall_with_capture()helper - Wrapped major operations (auto_deps, code_generator, context_generator, crash, cmd_test, fix) to capture their output
- Display captured output after each operation completes
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| sys.stdout = old_stdout | ||
| sys.stderr = old_stderr | ||
|
|
||
| def call_with_capture(func, quiet=False, *args, **kwargs): |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The quiet parameter should be the first positional parameter after func to follow Python conventions for boolean flags in function signatures.
| prompt_file=str(pdd_files['prompt']), | ||
| result, operation_output = call_with_capture( | ||
| auto_deps_main, | ||
| quiet, |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The quiet parameter is being passed as a positional argument but the function signature expects it as a keyword argument. This will cause quiet to be passed as the first argument to auto_deps_main instead of controlling the capture behavior.
| quiet, | |
| quiet=quiet, |
| prompt_file=str(pdd_files['prompt']), | ||
| result, operation_output = call_with_capture( | ||
| code_generator_main, | ||
| quiet, |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as with auto_deps_main - quiet should be passed as a keyword argument: call_with_capture(code_generator_main, quiet=quiet, ctx, ...)
| quiet, | |
| quiet=quiet, |
| code_file=str(pdd_files['code']), | ||
| result, operation_output = call_with_capture( | ||
| context_generator_main, | ||
| quiet, |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as with previous operations - quiet should be passed as a keyword argument: call_with_capture(context_generator_main, quiet=quiet, ctx, ...)
| quiet, | |
| quiet=quiet, |
| program_file=str(pdd_files['example']), | ||
| result, operation_output = call_with_capture( | ||
| crash_main, | ||
| quiet, |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as with previous operations - quiet should be passed as a keyword argument: call_with_capture(crash_main, quiet=quiet, ctx, ...)
| quiet, | |
| quiet=quiet, |
| code_file=str(pdd_files['code']), | ||
| result, operation_output = call_with_capture( | ||
| cmd_test_main, | ||
| quiet, |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as with previous operations - quiet should be passed as a keyword argument: call_with_capture(cmd_test_main, quiet=quiet, ctx, ...)
| quiet, | |
| quiet=quiet, |
| unit_test_file=str(pdd_files['test']), | ||
| result, operation_output = call_with_capture( | ||
| fix_main, | ||
| quiet, |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as with previous operations - quiet should be passed as a keyword argument: call_with_capture(fix_main, quiet=quiet, ctx, ...)
| quiet, | |
| quiet=quiet, |
Yes tested on my branch |
Only if an issue with pdd sync occurs |
|
Did you want to try to resolve the copilot issues? |
Fixes #65
Fixed pdd sync to show stdout/stderr messages at the bottom. Previously the progress animation was hiding all command output and interactive prompts.
Implementation
Added output capture in sync_orchestration.py:
capture_output() context manager to intercept stdout/stderr
call_with_capture() helper to wrap operations
Wrapped major operations:
auto_deps_main, code_generator_main, context_generator_main, crash_main, cmd_test_main, fix_main
Display captured output after each operation completes