Files
cline-multi-mirror/src/core/controller/state/updateTerminalReuseEnabled.ts
T
celestial-vault bd526cb2d2 rename CacheService to StateManager (#5681)
* rename CacheService to StateManager

* fix types
2025-08-26 15:24:17 -07:00

18 lines
503 B
TypeScript

import * as proto from "@/shared/proto"
import { Controller } from "../index"
export async function updateTerminalReuseEnabled(
controller: Controller,
request: proto.cline.BooleanRequest,
): Promise<proto.cline.Empty> {
const enabled = request.value
// Update the terminal reuse setting in the state
controller.stateManager.setGlobalState("terminalReuseEnabled", enabled)
// Broadcast state update to all webviews
await controller.postStateToWebview()
return proto.cline.Empty.create({})
}