Skip to content

Conversation

@Eric-Guo
Copy link
Owner

@Eric-Guo Eric-Guo commented Dec 4, 2025

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@Eric-Guo Eric-Guo force-pushed the loose_double_star_pattern branch 7 times, most recently from f5e012e to 658879c Compare December 8, 2025 12:43
@Eric-Guo
Copy link
Owner Author

Eric-Guo commented Dec 8, 2025

@codex review x 2

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@Eric-Guo
Copy link
Owner Author

Eric-Guo commented Dec 8, 2025

@codex Review x 3

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@Eric-Guo Eric-Guo force-pushed the loose_double_star_pattern branch 6 times, most recently from 8e94133 to dbeaf68 Compare December 11, 2025 12:11
@Eric-Guo
Copy link
Owner Author

@codex Review this PR.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines 7 to 10
from kaos.path import KaosPath
from kosong.tooling import CallableTool2, ToolError, ToolOk, ToolReturnValue
from pathspec import PathSpec
from pydantic import BaseModel, Field

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@Eric-Guo Eric-Guo force-pushed the loose_double_star_pattern branch 2 times, most recently from 90cfa20 to d4285b2 Compare December 15, 2025 11:42
Copilot AI review requested due to automatic review settings December 23, 2025 12:14
@Eric-Guo Eric-Guo force-pushed the loose_double_star_pattern branch from d4285b2 to b48bbb3 Compare December 23, 2025 12:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .gitignore exists
  • Updated error messages to explain the requirement for .gitignore with ** 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.

@Eric-Guo Eric-Guo force-pushed the loose_double_star_pattern branch 3 times, most recently from 4cc9ac0 to f4a0a32 Compare December 27, 2025 02:49
@Eric-Guo
Copy link
Owner Author

@codex Review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Swish!

ℹ️ 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".

@Eric-Guo Eric-Guo force-pushed the loose_double_star_pattern branch 2 times, most recently from 1837c93 to a587f5d Compare December 30, 2025 09:36
stdrc and others added 11 commits January 12, 2026 15:17
Signed-off-by: Richard Chien <stdrc@outlook.com>
Signed-off-by: Richard Chien <stdrc@outlook.com>
…MoonshotAI#602)

Signed-off-by: Richard Chien <stdrc@outlook.com>
Co-authored-by: xiaoju111a <xiaoju111a@users.noreply.github.com>
Co-authored-by: Richard Chien <stdrc@outlook.com>
Signed-off-by: Richard Chien <stdrc@outlook.com>
…MoonshotAI#607)

Co-authored-by: xiaoju111a <xiaoju111a@users.noreply.github.com>
Signed-off-by: Richard Chien <stdrc@outlook.com>
…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.
@Eric-Guo Eric-Guo force-pushed the loose_double_star_pattern branch from a587f5d to 71fee41 Compare January 13, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants