feat: truncate --fields body uniformly (task 0021)
Rule that the `body` extra field truncates at 500 chars like `issue view`, resolving the spec's Principle 3 / Command Surface contradiction. Route the `body` extractor through a new `truncatedBody()` FieldDef so `issue list`, `issue create`, `pr list`, and `search` all present it exactly as the detail views do, and add a `--full` flag to each to suppress truncation, keeping the inline hint's "use --full" promise honest.
This commit was merged in pull request #21.
This commit is contained in:
@@ -124,7 +124,9 @@ async function labelList(deps: CliDeps, args: string[]): Promise<string> {
|
||||
}
|
||||
|
||||
const now = new Date();
|
||||
const rows = labels.map((label) => extractRow(label, LABEL_LIST_FIELDS, { now }));
|
||||
const rows = labels.map((label) =>
|
||||
extractRow(label, LABEL_LIST_FIELDS, { now, host: context.host, full: false }),
|
||||
);
|
||||
return renderList({
|
||||
noun: "labels",
|
||||
rows,
|
||||
|
||||
Reference in New Issue
Block a user