add ranked search to pql sidebar with DSL toggle
test / unit + widget + golden + a11y (push) Failing after 33s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / unit + widget + golden + a11y (push) Failing after 33s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
Search tab defaults to ranked text search via pql search — debounced 300ms, scored results with visual score bar. DSL toggle switches to raw PQL query mode for SQL-like queries. Clicking a search result opens it in the markdown context viewer. Adds pql.search IPC command and PqlClient.search method. Controller gains SearchMode enum and search() method alongside existing runQuery. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -94,6 +94,20 @@ void registerPqlCommands(DaemonDispatcher d, PqlClient pql) {
|
||||
}
|
||||
});
|
||||
|
||||
d.register('pql.search', (req) async {
|
||||
final terms = req.args['terms'] as String?;
|
||||
if (terms == null || terms.isEmpty) {
|
||||
return _userError(req.id, 'pql.search requires a terms string');
|
||||
}
|
||||
try {
|
||||
final limit = (req.args['limit'] as num?)?.toInt();
|
||||
final results = await pql.search(terms, limit: limit);
|
||||
return IpcResponse.ok(id: req.id, data: {'results': results});
|
||||
} on PqlException catch (e) {
|
||||
return _pqlError(req.id, e);
|
||||
}
|
||||
});
|
||||
|
||||
d.register('pql.doctor', (req) async {
|
||||
try {
|
||||
final report = await pql.doctor();
|
||||
|
||||
@@ -59,6 +59,12 @@ class PqlClient {
|
||||
return _runList(args);
|
||||
}
|
||||
|
||||
Future<List<Map<String, Object?>>> search(String terms, {int? limit}) async {
|
||||
final args = ['search', terms];
|
||||
if (limit != null) args.addAll(['--limit', '$limit']);
|
||||
return _runList(args);
|
||||
}
|
||||
|
||||
Future<Map<String, Object?>> doctor() async {
|
||||
return _runObject(['doctor']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user