-
An opt-in
--briefflag is a reasonable proposal: keep the existing JSON output by default, and have the flag return only identity fields that are present in the response. Issue identity and comment identity should be distinguished; a comment should not be assigned an issue number or reference of its own. This is a design recommendation, not a commitment that the feature will be accepted.Currently neither command has a compact-output option; both print the server response unchanged. You can already keep the full text out of the agent context by filtering stdout in the same shell invocation, for example in Bash with
jqinstalled:set -o pipefail tod issue create 'Example title' --description 'Example description' | jq -c '{id, number, reference, link} | with_entries(select(.value != null))' tod issue add-comment TOD-23 'Example comment' | jq -c '{id, number, reference, link} | with_entries(select(.value != null))'This retains whichever of those identity fields the server actually supplies and omits the description/comment text.
pipefailpreserves a failure fromtod. If no response fields are needed, redirect stdout to/dev/null; errors on stderr remain visible.Does this address your token-cost concern, or do you specifically need a built-in option?
-
Thanks – the
jqfilter works, and it is what we do for now. We would still like the built-in option: an agent pays the token cost by default on everycreateandadd-comment, and avoiding it requires knowing the trick in advance. An opt-in--briefwith exactly the semantics you describe – identity fields only, and no number or reference for a comment – would cover it. Please keep this as an enhancement request. -
Name Previous Value Current Value Type
Question
Enhancement
Assignee
servicedesk
robin
-
Reclassified this as an enhancement request and kept it open. The requested behavior is an opt-in
--brieffortod issue createandtod issue add-comment, returning only available identity fields while preserving the existing default output. A comment must not receive an issue number or reference of its own.@robin, please review this request for acceptance. skudr confirms the
jqworkaround works but still needs a built-in option for agents. -
Previous Value Current Value Question: compact output for create and add-comment?
Compact output for create and add-comment
-
State changed as build TOD-239 (4.4.0) is successful
-
OneDev
changed state to 'Closed' 3 weeks ago
Previous Value Current Value Open
Closed
| Type |
Enhancement
|
| Priority |
Minor
|
| Assignee | |
| Labels |
No labels
|
tod issue createandtod issue add-commentprint the full created object – the whole description and every field for an issue, the whole text for a comment. An agent already has that text, so the echo only costs tokens. Would you accept a flag (for example--brief) that prints just the identity – id, number, reference and link?