.gitignore file will handle ** pattern properly in ripgrep.#4
.gitignore file will handle ** pattern properly in ripgrep.#4Eric-Guo wants to merge 15 commits intoupstream_mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
f5e012e to
658879c
Compare
|
@codex review x 2 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex Review x 3 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8e94133 to
dbeaf68
Compare
|
@codex Review this PR. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| from kaos.path import KaosPath | ||
| from kosong.tooling import CallableTool2, ToolError, ToolOk, ToolReturnValue | ||
| from pathspec import PathSpec | ||
| from pydantic import BaseModel, Field |
There was a problem hiding this comment.
Declare pathspec runtime dependency
The new Glob implementation imports pathspec.PathSpec, but pathspec is not listed in [project.dependencies] in pyproject.toml (lines 7–26). In a normal install that only pulls runtime dependencies, this module will be missing and importing kimi_cli.tools.file.glob will raise ModuleNotFoundError, breaking the Glob tool entirely. Add pathspec to the project dependencies or make the import optional so production installs do not crash.
Useful? React with 👍 / 👎.
90cfa20 to
d4285b2
Compare
d4285b2 to
b48bbb3
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for using the ** (recursive glob) pattern in the glob tool when a .gitignore file is present in the working directory. The implementation ensures that gitignored directories are properly excluded during traversal, making recursive searches safe and efficient.
Key Changes
- Implemented custom gitignore-aware recursive globbing that prunes ignored directories during traversal
- Modified pattern validation to allow
**patterns when.gitignoreexists - Updated error messages to explain the requirement for
.gitignorewith**patterns
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/kimi_cli/tools/file/glob.py | Added gitignore parsing, custom recursive glob implementation with gitignore filtering, and updated validation logic to allow ** patterns with gitignore |
| tests/test_glob.py | Added tests for ** pattern with gitignore, including traversal verification and gitignore respect |
| tests/conftest.py | Reordered imports for consistency |
| src/kimi_cli/tools/shell/init.py | Reordered imports for consistency |
| src/kimi_cli/metadata.py | Reordered imports for consistency |
| src/kimi_cli/app.py | Reordered imports for consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4cc9ac0 to
f4a0a32
Compare
|
@codex Review |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
1837c93 to
a587f5d
Compare
03098ee to
112804a
Compare
beec52e to
7351054
Compare
7351054 to
e861f4c
Compare
…I#1068) Co-authored-by: Kai <[email protected]>
…ed token breakdown (MoonshotAI#1081)
…r prop from ToolbarChangesTab (MoonshotAI#1101)
…turn ToolError Unsafe pattern if can not finding the .gitignore file.
Implemented a method to load and apply .gitignore specifications during the glob search, allowing for exclusion of matches based on the patterns defined in the .gitignore file.
…ored directories are pruned during traversal instead of after the fact. Added helpers to normalize gitignore checks and filter matches consistently.
…tched the glob tool to call it, so the matching logic lives in packages/kaos rather than being inlined in Kimi CLI. This removes the local matching implementation while keeping the same behavior. Updated packages/kaos/src/kaos/__init__.py and src/kimi_cli/tools/file/glob.py.
e861f4c to
e7f9667
Compare
@codex review
upstream PR