Add -o/--output flag to dictate command for text/json modes#192
Merged
Conversation
dictate only exposed --json, so `assembly dictate -o text` errored even
though plain transcript text is already the non-JSON default. Add the
-o/--output {text,json} flag mirroring stream/agent: -o json folds into
json_mode (== --json), -o text is the explicit bare-transcript default,
and --json + -o text is rejected as a contradictory pair via the shared
resolve_output_modes helper.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Knhve9pgqPSg2kQhxnV7Wn
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.
Adds an
-o/--outputoption to theassembly dictatecommand that allows users to explicitly choose betweentext(bare transcript, pipe-friendly) andjson(one JSON object per utterance) output modes.Summary
This change introduces output mode selection to the dictate command, bringing it into alignment with the
streamandagentcommands' output handling patterns. The new flag provides an explicit, discoverable way to select output format while maintaining backward compatibility (text remains the default).Key Changes
output_fieldparameter inDictateOptionsto capture the-o/--outputchoiceresolve_output_modes()inrun_dictate()to:-o jsonintojson_mode(equivalent to--json)--json + -o textcombination with aUsageErrordictate/__init__.py:choices.TextOrJsonenum optionDictateOptions-o jsonenables NDJSON output without the--jsonflag-o textemits bare transcript (no JSON wrapper)--json + -o textraisesUsageErroras a usage conflictImplementation Details
The implementation reuses the existing
resolve_output_modes()utility from the streaming session module, ensuring consistent conflict detection and resolution across commands. The dictate command'stext_modehalf of the resolution is unused (plain text is already the non-JSON default in_emit()), but the infrastructure is in place for future enhancements.https://claude.ai/code/session_01Knhve9pgqPSg2kQhxnV7Wn