Files
cline-multi-mirror/src/core/controller/state/getLatestState.ts
T
Bee 06e0973c04 Apply biome rules: noUnusedVariables, noUnusedFunctionParameters, noUnusedImports (#5545)
* Enable biome rules: noUnusedVariables, noUnusedFunctionParameters, noUnusedImports

* Apply new rules with format

* remove unused currentReplaceContent

* update nextTerminalId

* fix all format issues

* update biome config

* add back applyContextOptimizations and killAllChromeBrowsers
2025-08-19 11:57:50 -07:00

23 lines
670 B
TypeScript

import { EmptyRequest } from "@shared/proto/cline/common"
import { State } from "@shared/proto/cline/state"
import { Controller } from "../index"
/**
* Get the latest extension state
* @param controller The controller instance
* @param request The empty request
* @returns The current extension state
*/
export async function getLatestState(controller: Controller, _: EmptyRequest): Promise<State> {
// Get the state using the existing method
const state = await controller.getStateToPostToWebview()
// Convert the state to a JSON string
const stateJson = JSON.stringify(state)
// Return the state as a JSON string
return State.create({
stateJson,
})
}