Cleanup rust/ts interface a but more w new rustContext (#5848)

* do the rust side

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* cleanup ts side

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* typo

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2025-03-17 18:26:11 -07:00
committed by GitHub
parent e17c6e272c
commit dd1534a61d
17 changed files with 351 additions and 398 deletions

View File

@ -8,7 +8,7 @@ import {
rustContext,
} from 'lib/singletons'
import { err } from 'lib/trap'
import { executeAst } from 'lang/langHelpers'
import { executeAstMock } from 'lang/langHelpers'
export const deletionErrorMessage =
'Unable to delete selection. Please edit manually in code pane.'
@ -29,11 +29,9 @@ export async function deleteSelectionPromise(
return new Error(deletionErrorMessage)
}
const testExecute = await executeAst({
const testExecute = await executeAstMock({
ast: modifiedAst,
engineCommandManager,
rustContext,
isMock: true,
rustContext: rustContext,
})
if (testExecute.errors.length) {
return new Error(deletionErrorMessage)