Repository navigation
Improve shell completion docs and avoid full init for completion probes - #25693
luojiyin1987 wants to merge 8 commits into
Conversation
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my searches, I found one potentially related PR: PR #23263: feat: add fish shell tab completions This PR is related as it also deals with shell completion functionality for the opencode CLI. However, it appears to focus specifically on adding fish shell completions, while the current PR (25693) is about improving documentation and optimizing the completion invocation path for Bash/Zsh. These PRs address different aspects of shell completion functionality and are not duplicates. No duplicate PRs found |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #25692
Type of change
What does this PR do?
This fixes slow shell completion probes.
opencode completiongenerates scripts that callopencode --get-yargs-completions ...on every completion request. Before this change, that path still went through the normal CLI startup flow, so completion requests did extra work they do not need.This PR:
isShellCompletionInvocation()to detect completion-only invocationsThe fix works because completion probes now avoid unrelated startup work and stay on a smaller execution path.
How did you verify your code works?
bun test test/cli/completion.test.tsbun typecheckScreenshots / recordings
Not a UI change.
Checklist