Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/learn skips hidden files/dirs by default, unless "-a" is specified #427

Merged
merged 9 commits into from
Nov 4, 2023

Conversation

JasonWeill
Copy link
Collaborator

@JasonWeill JasonWeill commented Nov 1, 2023

Fixes #424.

Omits hidden files and directories by default when calling /learn, unless -a or --all-files is specified, in which all supported files under the given directory are parsed.

Created a directory learnme with a file .secret.txt, reading "The capital of Slobonia is Asterphase".

With /learn -a learnme, the information is learned.

Screenshot 2023-11-01 at 3 54 59 PM

@JasonWeill JasonWeill requested a review from 3coins November 2, 2023 16:52
@3coins 3coins requested a review from andrii-i November 3, 2023 23:59
Copy link
Collaborator

@3coins 3coins left a comment

Choose a reason for hiding this comment

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

@JasonWeill
Thanks for adding -a option. Great job on fixing this. 🚀

Copy link
Collaborator

@andrii-i andrii-i left a comment

Choose a reason for hiding this comment

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

LGTM. Tested locally with some files / information being hidden, some not. Works as expected, learns hidden files / information only when -a is passed.

@JasonWeill JasonWeill merged commit ec75ba8 into jupyterlab:main Nov 4, 2023
4 checks passed
@JasonWeill
Copy link
Collaborator Author

@meeseeksdev please backport to 1.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyter-ai that referenced this pull request Nov 8, 2023
JasonWeill added a commit that referenced this pull request Nov 8, 2023
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
…upyterlab#427)

* Omits hidden files/dirs by default, unless "-a" is specified

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update packages/jupyter-ai/jupyter_ai/document_loaders/directory.py

Co-authored-by: Piyush Jain <[email protected]>

* Update packages/jupyter-ai/jupyter_ai/document_loaders/directory.py

Co-authored-by: Piyush Jain <[email protected]>

* Renames long arg from "all" to "all-files"

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Renames `all` arg in `split`

* Updates subdirectory and filename exclusion logic

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Piyush Jain <[email protected]>
Marchlak pushed a commit to Marchlak/jupyter-ai that referenced this pull request Oct 28, 2024
…upyterlab#427)

* Omits hidden files/dirs by default, unless "-a" is specified

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update packages/jupyter-ai/jupyter_ai/document_loaders/directory.py

Co-authored-by: Piyush Jain <[email protected]>

* Update packages/jupyter-ai/jupyter_ai/document_loaders/directory.py

Co-authored-by: Piyush Jain <[email protected]>

* Renames long arg from "all" to "all-files"

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Renames `all` arg in `split`

* Updates subdirectory and filename exclusion logic

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Piyush Jain <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request @jupyter-ai/chatui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When learning a folder, don't read hidden files or folders
3 participants