drive workspace ignore from ignore_files:, add files.walk
Replace the hardcoded .gitignore + .clideignore read with the ordered ignore_files: chain from .pql/config.yaml (D-4) — the single ignore knob clide owns (D-3). readIgnoreFiles defaults to .gitignore (plus .clideignore when present) when the config is absent or malformed, and honours an explicit [] as "no file-based exclusions". Add walkFiles + the files.walk command: a recursive, ignore-pruned, capped flat file listing reused by quick-open (T-51) and the search engine (T-52). Closes the never-filed ignore-layering placeholder in files_commands.dart. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -73,6 +73,17 @@ void main() {
|
||||
expect(names, ['main.dart']);
|
||||
});
|
||||
|
||||
test('files.walk returns a flat, recursive file list (no dirs, no ignored)', () async {
|
||||
final r = await call('files.walk', const {});
|
||||
expect(r.ok, isTrue);
|
||||
final paths = (r.data['files'] as List).cast<String>();
|
||||
expect(paths, containsAll(['README.md', 'pubspec.yaml', 'lib/main.dart']));
|
||||
// Directories themselves are never emitted, and .dart_tool is pruned.
|
||||
expect(paths, isNot(contains('lib')));
|
||||
expect(paths.any((p) => p.startsWith('.dart_tool')), isFalse);
|
||||
expect(r.data['truncated'], isFalse);
|
||||
});
|
||||
|
||||
test('files.watch acks subscription', () async {
|
||||
final r = await call('files.watch', const {});
|
||||
expect(r.ok, isTrue);
|
||||
|
||||
Reference in New Issue
Block a user