-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make arguments to engine optional #2477
Merged
+97
−139
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
f954f2f
Make arguments to engine optional
AndreasArvidsson 4cf1a71
clean up
AndreasArvidsson b48f309
Fix
AndreasArvidsson 50f5044
clean up
AndreasArvidsson 4cab6df
Merge branch 'main' into engineInterface
AndreasArvidsson 4299388
clean up
AndreasArvidsson d86dfed
fix
AndreasArvidsson b777096
Merge branch 'main' into engineInterface
AndreasArvidsson 697a678
Remove the tree sitter from debug print
AndreasArvidsson 5d3076a
Created disabled command server api
AndreasArvidsson cfbdadf
more work
AndreasArvidsson bcbdfa5
clean up
AndreasArvidsson 60f0584
tidy up error message
AndreasArvidsson a46bfd5
clean up
AndreasArvidsson d138319
Remove unused
AndreasArvidsson 9a3575f
clean up
AndreasArvidsson aab995f
clean up
AndreasArvidsson 7bd0e05
clean up
AndreasArvidsson 1c41466
rename
AndreasArvidsson b95c169
tweaks
pokey 7b84ebf
Rename provider
AndreasArvidsson 464847c
Split pr
AndreasArvidsson 1465064
clean up
AndreasArvidsson 3ae67ca
Clean up
AndreasArvidsson 71bf800
Cleanup
AndreasArvidsson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/cursorless-engine/src/disabledComponents/DisabledCommandServerApi.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type { CommandServerApi } from "@cursorless/common"; | ||
|
||
export class DisabledCommandServerApi implements CommandServerApi { | ||
getFocusedElementType() { | ||
return Promise.resolve(undefined); | ||
} | ||
|
||
readonly signals = { | ||
prePhrase: { | ||
getVersion() { | ||
return Promise.resolve(null); | ||
}, | ||
}, | ||
}; | ||
} |
22 changes: 22 additions & 0 deletions
22
packages/cursorless-engine/src/disabledComponents/DisabledHatTokenMap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { HatTokenMap } from "@cursorless/common"; | ||
|
||
export class DisabledHatTokenMap implements HatTokenMap { | ||
async allocateHats() { | ||
// Do nothing | ||
} | ||
|
||
async getReadableMap() { | ||
return { | ||
getEntries() { | ||
return []; | ||
}, | ||
getToken() { | ||
throw new Error("Hat map is disabled"); | ||
}, | ||
}; | ||
} | ||
|
||
dispose() { | ||
// Do nothing | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is no longer ever undefined right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately not. This is constructed in the extension file and does not get the disabled default implementation from the engine