diff options
| author | adamjhf <[email protected]> | 2026-02-01 17:15:28 +1100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-01 00:15:28 -0600 |
| commit | c3faeae9d0a71bb6434178f07ba5ac51f348196a (patch) | |
| tree | ca47870cded0cbfe3aba807de3c3004780b616eb | |
| parent | 94baf1f721a3be3c42ebfa08902ebec897e732cb (diff) | |
| download | opencode-c3faeae9d0a71bb6434178f07ba5ac51f348196a.tar.gz opencode-c3faeae9d0a71bb6434178f07ba5ac51f348196a.zip | |
fix: correct pluralization of match count in grep and glob tools (#11565)
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/routes/session/index.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index e5b3dc440..ada84e487 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -1707,7 +1707,9 @@ function Glob(props: ToolProps<typeof GlobTool>) { return ( <InlineTool icon="✱" pending="Finding files..." complete={props.input.pattern} part={props.part}> Glob "{props.input.pattern}" <Show when={props.input.path}>in {normalizePath(props.input.path)} </Show> - <Show when={props.metadata.count}>({props.metadata.count} matches)</Show> + <Show when={props.metadata.count}> + ({props.metadata.count} {props.metadata.count === 1 ? "match" : "matches"}) + </Show> </InlineTool> ) } @@ -1743,7 +1745,9 @@ function Grep(props: ToolProps<typeof GrepTool>) { return ( <InlineTool icon="✱" pending="Searching content..." complete={props.input.pattern} part={props.part}> Grep "{props.input.pattern}" <Show when={props.input.path}>in {normalizePath(props.input.path)} </Show> - <Show when={props.metadata.matches}>({props.metadata.matches} matches)</Show> + <Show when={props.metadata.matches}> + ({props.metadata.matches} {props.metadata.matches === 1 ? "match" : "matches"}) + </Show> </InlineTool> ) } |
