MCPcopy Create free account
hub / github.com/cameri/nostream / confirmDanger

Function confirmDanger

src/cli/tui/menus/dev.ts:5–17  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

3import ora from 'ora'
4
5const confirmDanger = async (message: string): Promise<boolean> => {
6 const answer = await tuiPrompts.confirm({
7 message: `Destructive action: ${message}`,
8 initialValue: false,
9 })
10
11 if (tuiPrompts.isCancel(answer) || !answer) {
12 tuiPrompts.cancel('Cancelled')
13 return false
14 }
15
16 return true
17}
18
19export const runDevMenu = async (): Promise<number> => {
20 const action = await tuiPrompts.select({

Callers 1

runDevMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected