mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
merge main branch functionalities
This commit is contained in:
@@ -45,7 +45,7 @@ describe('getFolderStructure', () => {
|
||||
const structure = await getFolderStructure(testRootDir);
|
||||
expect(structure.trim()).toBe(
|
||||
`
|
||||
Showing up to 200 items (files + folders).
|
||||
Showing up to 20 items (files + folders).
|
||||
|
||||
${testRootDir}${path.sep}
|
||||
├───fileA1.ts
|
||||
@@ -60,7 +60,7 @@ ${testRootDir}${path.sep}
|
||||
const structure = await getFolderStructure(testRootDir);
|
||||
expect(structure.trim()).toBe(
|
||||
`
|
||||
Showing up to 200 items (files + folders).
|
||||
Showing up to 20 items (files + folders).
|
||||
|
||||
${testRootDir}${path.sep}
|
||||
`
|
||||
@@ -81,7 +81,7 @@ ${testRootDir}${path.sep}
|
||||
const structure = await getFolderStructure(testRootDir);
|
||||
expect(structure.trim()).toBe(
|
||||
`
|
||||
Showing up to 200 items (files + folders). Folders or files indicated with ... contain more items not shown, were ignored, or the display limit (200 items) was reached.
|
||||
Showing up to 20 items (files + folders). Folders or files indicated with ... contain more items not shown, were ignored, or the display limit (20 items) was reached.
|
||||
|
||||
${testRootDir}${path.sep}
|
||||
├───.hiddenfile
|
||||
@@ -108,7 +108,7 @@ ${testRootDir}${path.sep}
|
||||
ignoredFolders: new Set(['subfolderA', 'node_modules']),
|
||||
});
|
||||
const expected = `
|
||||
Showing up to 200 items (files + folders). Folders or files indicated with ... contain more items not shown, were ignored, or the display limit (200 items) was reached.
|
||||
Showing up to 20 items (files + folders). Folders or files indicated with ... contain more items not shown, were ignored, or the display limit (20 items) was reached.
|
||||
|
||||
${testRootDir}${path.sep}
|
||||
├───.hiddenfile
|
||||
@@ -129,7 +129,7 @@ ${testRootDir}${path.sep}
|
||||
fileIncludePattern: /\.ts$/,
|
||||
});
|
||||
const expected = `
|
||||
Showing up to 200 items (files + folders).
|
||||
Showing up to 20 items (files + folders).
|
||||
|
||||
${testRootDir}${path.sep}
|
||||
├───fileA1.ts
|
||||
|
||||
@@ -12,7 +12,7 @@ import { FileDiscoveryService } from '../services/fileDiscoveryService.js';
|
||||
import { FileFilteringOptions } from '../config/config.js';
|
||||
import { DEFAULT_FILE_FILTERING_OPTIONS } from '../config/config.js';
|
||||
|
||||
const MAX_ITEMS = 200;
|
||||
const MAX_ITEMS = 20;
|
||||
const TRUNCATION_INDICATOR = '...';
|
||||
const DEFAULT_IGNORED_FOLDERS = new Set(['node_modules', '.git', 'dist']);
|
||||
|
||||
@@ -20,7 +20,7 @@ const DEFAULT_IGNORED_FOLDERS = new Set(['node_modules', '.git', 'dist']);
|
||||
|
||||
/** Options for customizing folder structure retrieval. */
|
||||
interface FolderStructureOptions {
|
||||
/** Maximum number of files and folders combined to display. Defaults to 200. */
|
||||
/** Maximum number of files and folders combined to display. Defaults to 20. */
|
||||
maxItems?: number;
|
||||
/** Set of folder names to ignore completely. Case-sensitive. */
|
||||
ignoredFolders?: Set<string>;
|
||||
|
||||
Reference in New Issue
Block a user