mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 18:51:23 +00:00
chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
|
||||
import {
|
||||
WizardCancelledError,
|
||||
type WizardProgress,
|
||||
type WizardPrompter,
|
||||
} from "./prompts.js";
|
||||
import { WizardCancelledError, type WizardProgress, type WizardPrompter } from "./prompts.js";
|
||||
|
||||
export type WizardStepOption = {
|
||||
value: unknown;
|
||||
@@ -14,14 +10,7 @@ export type WizardStepOption = {
|
||||
|
||||
export type WizardStep = {
|
||||
id: string;
|
||||
type:
|
||||
| "note"
|
||||
| "select"
|
||||
| "text"
|
||||
| "confirm"
|
||||
| "multiselect"
|
||||
| "progress"
|
||||
| "action";
|
||||
type: "note" | "select" | "text" | "confirm" | "multiselect" | "progress" | "action";
|
||||
title?: string;
|
||||
message?: string;
|
||||
options?: WizardStepOption[];
|
||||
@@ -137,9 +126,7 @@ class WizardSessionPrompter implements WizardPrompter {
|
||||
? ""
|
||||
: typeof res === "string"
|
||||
? res
|
||||
: typeof res === "number" ||
|
||||
typeof res === "boolean" ||
|
||||
typeof res === "bigint"
|
||||
: typeof res === "number" || typeof res === "boolean" || typeof res === "bigint"
|
||||
? String(res)
|
||||
: "";
|
||||
const error = params.validate?.(value);
|
||||
@@ -149,10 +136,7 @@ class WizardSessionPrompter implements WizardPrompter {
|
||||
return value;
|
||||
}
|
||||
|
||||
async confirm(params: {
|
||||
message: string;
|
||||
initialValue?: boolean;
|
||||
}): Promise<boolean> {
|
||||
async confirm(params: { message: string; initialValue?: boolean }): Promise<boolean> {
|
||||
const res = await this.prompt({
|
||||
type: "confirm",
|
||||
message: params.message,
|
||||
|
||||
Reference in New Issue
Block a user