-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add preference to ignore files in workspace functions
fixed #14448 Signed-off-by: Jonas Helming <[email protected]>
- Loading branch information
1 parent
d769658
commit 769428d
Showing
5 changed files
with
132 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
packages/ai-workspace-agent/src/browser/workspace-preferences.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// ***************************************************************************** | ||
// Copyright (C) 2024 EclipseSource GmbH. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0. | ||
// | ||
// This Source Code may also be made available under the following Secondary | ||
// Licenses when the conditions for such availability set forth in the Eclipse | ||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2 | ||
// with the GNU Classpath Exception which is available at | ||
// https://www.gnu.org/software/classpath/license.html. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 | ||
// ***************************************************************************** | ||
|
||
import { PreferenceSchema } from '@theia/core/lib/browser/preferences/preference-contribution'; | ||
|
||
export const CONSIDER_GITIGNORE_PREF = 'ai-features.workspace-functions.considerGitIgnore'; | ||
export const USER_EXCLUDES_PREF = 'ai-features.workspace-functions.userExcludes'; | ||
|
||
export const WorkspacePreferencesSchema: PreferenceSchema = { | ||
type: 'object', | ||
properties: { | ||
[CONSIDER_GITIGNORE_PREF]: { | ||
type: 'boolean', | ||
title: 'Consider .gitignore', | ||
description: 'If enabled, excludes files/folders specified in a global .gitignore file (expected location is the workspace root).', | ||
default: false | ||
}, | ||
[USER_EXCLUDES_PREF]: { | ||
type: 'array', | ||
title: 'User Excludes', | ||
description: 'List of patterns (glob or regex) for files/folders to exclude by default.', | ||
default: ['node_modules', 'lib', '.*'], | ||
items: { | ||
type: 'string' | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6953,6 +6953,11 @@ ignore@^5.0.4, ignore@^5.2.0, ignore@^5.2.4: | |
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" | ||
integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== | ||
|
||
ignore@^6.0.0: | ||
version "6.0.2" | ||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-6.0.2.tgz#77cccb72a55796af1b6d2f9eb14fa326d24f4283" | ||
integrity sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A== | ||
|
||
image-size@~0.5.0: | ||
version "0.5.5" | ||
resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" | ||
|
@@ -8474,6 +8479,13 @@ [email protected], minimatch@^9.0.0, minimatch@^9.0.1: | |
dependencies: | ||
brace-expansion "^2.0.1" | ||
|
||
minimatch@^10.0.0: | ||
version "10.0.1" | ||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.0.1.tgz#ce0521856b453c86e25f2c4c0d03e6ff7ddc440b" | ||
integrity sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ== | ||
dependencies: | ||
brace-expansion "^2.0.1" | ||
|
||
minimatch@^3.0.0, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: | ||
version "3.1.2" | ||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" | ||
|