Fix Pi Villani UI status copy and preserve safe tool inputs#414
Merged
mmprotest merged 1 commit intoJun 29, 2026
Conversation
c526533
into
mmprotest/implement-pi-integration-as-external-adapter
2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
safe_tool_inputandextract_tool_pathand includinginput,path, andcommandfields fortool_started,tool_result, andtool_finishedevents invillani_code/integrations/pi_bridge.pywhile excluding sensitive or large fields.integrations/pi-villani/src/render.ts, add deterministic selection viacopyCountersandvillaniCopy(), and exportresetVillaniCopyCounters()for tests.pathFromEvent,commandFromEvent, andcategoryForEventand map runner/command/tool events to Villani copy categories (thinking, analysis, reading, writing, running, testing, debugging, review, failure, complete).toolStartedMessage,reduceVillaniUiState,widgetForState, andrenderBridgeEventso the UI shows Villani status messages and a widget withFile:orCommand:details (no "unknown" placeholders) and avoids notify spam for every tool/command start while keeping assistantstream_textunchanged.approvalTitle/approvalMessagebehavior inintegrations/pi-villani/src/index.ts(approval prompt retains exactCommand:/File:lines).tests/integrations/test_pi_bridge.pyto assert safe input/path/command preservation and exclusion of secrets/large content, and Node tests inintegrations/pi-villani/src/render.test.tsand updates tointegrations/pi-villani/src/extension.test.tsto validate Villani copy selection, no-unknown-file messages, deterministic rotation, assistant text preservation, and approval message readability.Testing
pytest -q tests/integrations/test_pi_bridge.py, which passed (43 passed).cd integrations/pi-villani && npm test, which ultimately passed (85 passedacross the suite) after the render changes.input.path/input.file_path/command, exclusion of content/credentials from bridge events, Villani copy rotation and category mapping, no "unknown" file copy in UI, assistantstream_textrendering unchanged, and approval prompt formatting.Codex Task