The find-in-files UI on top of the search.grep engine. A FindInFilesController drives search.grep, accumulates streamed search.match events (scoped to the active searchId, stale ids ignored) grouped by file, and opens a match in the editor at its line. The SearchPanelView contributes a sidebar tab: a debounced query box, regex + case toggles, include/exclude glob fields, and a grouped results list with the matched span highlighted. findInFiles.open (Ctrl/Cmd+Shift+F) reveals and activates the search tab. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
32 lines
1011 B
Dart
32 lines
1011 B
Dart
import 'package:clide/builtin/search/src/search_panel_view.dart';
|
|
import 'package:clide/extension/extension.dart';
|
|
import 'package:clide/kernel/kernel.dart';
|
|
import 'package:clide/widgets/widgets.dart';
|
|
|
|
/// Find-in-files panel. Contributes a sidebar tab that runs workspace
|
|
/// content searches through the daemon's `search.*` subsystem (the
|
|
/// pure-Dart isolate-pool grep, D-79) and lists matches grouped by
|
|
/// file, click-to-open at the line.
|
|
class SearchExtension extends ClideExtension {
|
|
@override
|
|
String get id => 'builtin.search';
|
|
@override
|
|
String get title => 'Search';
|
|
@override
|
|
String get version => '0.1.0';
|
|
@override
|
|
List<String> get dependsOn => const [];
|
|
|
|
@override
|
|
List<ContributionPoint> get contributions => [
|
|
TabContribution(
|
|
id: 'search.findInFiles',
|
|
slot: Slots.sidebar,
|
|
title: 'Search',
|
|
icon: PhosphorIcons.magnifyingGlass,
|
|
priority: -90,
|
|
build: (_) => const SearchPanelView(),
|
|
),
|
|
];
|
|
}
|