mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 11:21:11 +00:00
refactor(ui): share channel config extras and hint types
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { createSubsystemLogger } from "../logging/subsystem.js";
|
||||
import type { ConfigUiHints } from "../shared/config-ui-hints-types.js";
|
||||
import { FIELD_HELP } from "./schema.help.js";
|
||||
import { FIELD_LABELS } from "./schema.labels.js";
|
||||
import { applyDerivedTags } from "./schema.tags.js";
|
||||
@@ -7,19 +8,7 @@ import { sensitive } from "./zod-schema.sensitive.js";
|
||||
|
||||
const log = createSubsystemLogger("config/schema");
|
||||
|
||||
export type ConfigUiHint = {
|
||||
label?: string;
|
||||
help?: string;
|
||||
tags?: string[];
|
||||
group?: string;
|
||||
order?: number;
|
||||
advanced?: boolean;
|
||||
sensitive?: boolean;
|
||||
placeholder?: string;
|
||||
itemTemplate?: unknown;
|
||||
};
|
||||
|
||||
export type ConfigUiHints = Record<string, ConfigUiHint>;
|
||||
export type { ConfigUiHint, ConfigUiHints } from "../shared/config-ui-hints-types.js";
|
||||
|
||||
const GROUP_LABELS: Record<string, string> = {
|
||||
wizard: "Wizard",
|
||||
|
||||
13
src/shared/config-ui-hints-types.ts
Normal file
13
src/shared/config-ui-hints-types.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export type ConfigUiHint = {
|
||||
label?: string;
|
||||
help?: string;
|
||||
tags?: string[];
|
||||
group?: string;
|
||||
order?: number;
|
||||
advanced?: boolean;
|
||||
sensitive?: boolean;
|
||||
placeholder?: string;
|
||||
itemTemplate?: unknown;
|
||||
};
|
||||
|
||||
export type ConfigUiHints = Record<string, ConfigUiHint>;
|
||||
Reference in New Issue
Block a user