* fix(tui): restore prompt rendering on startup * test(tui): document render-time command split * fix(tui): reduce ghostty prompt repaint scope
14 lines
425 B
TypeScript
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])
|
|
}
|