use state query in repl
+ move locations to context
This commit is contained in:
parent
29bdfb2d90
commit
f1362b1c94
5 changed files with 25 additions and 23 deletions
|
|
@ -81,9 +81,9 @@ function useRepl({ tune, defaultSynth, autolink = true, onEvent }: any) {
|
|||
[onEvent]
|
||||
),
|
||||
onQuery: useCallback(
|
||||
(span) => {
|
||||
(state) => {
|
||||
try {
|
||||
return pattern?.query(span) || [];
|
||||
return pattern?.query(state) || [];
|
||||
} catch (err: any) {
|
||||
err.message = 'query error: ' + err.message;
|
||||
setError(err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue