Conversation
| "pretest": "yarn run compile && yarn run lint && yarn run esbuild", | ||
| "lint": "eslint src --ext ts", | ||
| "test": "node ./out/test/runTest.js" | ||
| "test": "env CURSORLESS_TEST=true node ./out/test/runTest.js" |
There was a problem hiding this comment.
For consistency with local unit testing, where this variable is set by launch.json
|
|
||
| this.recomputeDecorationStyles = this.recomputeDecorationStyles.bind(this); | ||
|
|
||
| this.disposables.push( |
There was a problem hiding this comment.
Note how graph components do their own registration now
There was a problem hiding this comment.
Looks good really clean things up
| thatMark, | ||
| sourceMark, | ||
| addDecorations, | ||
| graph: isTesting() ? graph : undefined, |
There was a problem hiding this comment.
We now return the entire graph object, but only if we're in testing mode
| @@ -0,0 +1,49 @@ | |||
| import { ActionType, PartialTarget } from "../../typings/Types"; | |||
There was a problem hiding this comment.
Here's the new command argument type definitions
| spokenFormOrCommandArgument: string | CommandArgument, | ||
| ...rest: unknown[] |
There was a problem hiding this comment.
Here's the ugliness that allows us to handle either old or new command arguments
There was a problem hiding this comment.
I think that works fine
| @@ -1,8 +1,9 @@ | |||
| spokenForm: bring air and bat and cap | |||
There was a problem hiding this comment.
New recorded test syntax just stores an exact snapshot of the command argument that comes in to the cursorless command
There was a problem hiding this comment.
Sounds good. Really inline with our discussion about that the tests should only capture what the user actually said.
| inputPartialTargets: PartialTarget[], | ||
| inputExtraArgs: any[] | ||
| ) { | ||
| commandArgument: CommandArgument |
There was a problem hiding this comment.
Now that we have one argument packaged together, we can just input a command argument and return a new command argument that is latest version
| partialTargets: PartialTarget[]; | ||
| extraArgs: any[]; | ||
| }; | ||
| export type TestCaseCommand = CommandArgument; |
There was a problem hiding this comment.
Notice how this one is just a regular command argument now
|
I must admit I haven't looked through all the code. But I think the changes to the api and command version looks good. |
Description
Allows voice engine to emit a signal to indicate start of phrase, which causes the hat token map to be frozen during the course of all commands issued during the given phrase. The ranges will be updated as the document changes, but the same hat names will refer to the same logical document token during the course of the phrase. This feature allows users to issue longer voice commands without worrying about the hats shifting during the course of phrase execution
Related issues
Todo
signalstoinboundSignalsgetNamedSignalfrom command-server API (here and in extension)