Files
orcs-code/src/state/pluginCommandsStore.ts
sooth e30ad17ae0 fix(tui): restore prompt rendering on startup (#498)
* fix(tui): restore prompt rendering on startup

* test(tui): document render-time command split

* fix(tui): reduce ghostty prompt repaint scope
2026-04-09 20:40:06 +08:00

14 lines
425 B
TypeScript

import type { Command } from '../commands.js'
import { createStore } from './store.js'
const pluginCommandsStore = createStore<Command[]>([])
export const getPluginCommandsState = (): Command[] =>
pluginCommandsStore.getState()
export const subscribePluginCommands = pluginCommandsStore.subscribe
export function setPluginCommandsState(commands: Command[]): void {
pluginCommandsStore.setState(() => [...commands])
}