fix when you comment out it should re-execute (#2975)
* fix when you comment out it should re-execute Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * copilot being a little shit Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * turn copilot off Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix for realisesi Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove footguns Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
This commit is contained in:
@ -37,11 +37,11 @@ import { CopilotAcceptCompletionParams } from 'wasm-lib/kcl/bindings/CopilotAcce
|
||||
import { CopilotRejectCompletionParams } from 'wasm-lib/kcl/bindings/CopilotRejectCompletionParams'
|
||||
import { editorManager } from 'lib/singletons'
|
||||
|
||||
const copilotPluginAnnotation = Annotation.define<null>()
|
||||
export const copilotPluginEvent = copilotPluginAnnotation.of(null)
|
||||
const copilotPluginAnnotation = Annotation.define<boolean>()
|
||||
export const copilotPluginEvent = copilotPluginAnnotation.of(true)
|
||||
|
||||
const rejectSuggestionAnnotation = Annotation.define<null>()
|
||||
export const rejectSuggestionCommand = rejectSuggestionAnnotation.of(null)
|
||||
const rejectSuggestionAnnotation = Annotation.define<boolean>()
|
||||
export const rejectSuggestionCommand = rejectSuggestionAnnotation.of(true)
|
||||
|
||||
// Effects to tell StateEffect what to do with GhostText
|
||||
const addSuggestion = StateEffect.define<Suggestion>()
|
||||
@ -229,7 +229,7 @@ export class CompletionRequester implements PluginValue {
|
||||
isRelevant = true
|
||||
} else if (tr.isUserEvent('move')) {
|
||||
isRelevant = true
|
||||
} else if (tr.annotation(copilotPluginEvent.type) !== undefined) {
|
||||
} else if (tr.annotation(copilotPluginEvent.type)) {
|
||||
isRelevant = true
|
||||
}
|
||||
}
|
||||
@ -457,6 +457,7 @@ export class CompletionRequester implements PluginValue {
|
||||
effects: clearSuggestion.of(null),
|
||||
annotations: [
|
||||
rejectSuggestionCommand,
|
||||
copilotPluginEvent,
|
||||
Transaction.addToHistory.of(false),
|
||||
],
|
||||
})
|
||||
|
Reference in New Issue
Block a user