mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
refactor(plugins): localize internal helper types (#101922)
This commit is contained in:
parent
3bbc2732c0
commit
cc083e5f4f
5 changed files with 7 additions and 9 deletions
|
|
@ -22,7 +22,7 @@ import type { ClickClackMessage, ClickClackMessageProvenance } from "./types.js"
|
|||
const CLICKCLACK_COMMENTARY_FLUSH_MS = 700;
|
||||
|
||||
/** Item event payload shape delivered by `replyOptions.onItemEvent`. */
|
||||
export type ClickClackItemEventPayload = {
|
||||
type ClickClackItemEventPayload = {
|
||||
itemId?: string;
|
||||
toolCallId?: string;
|
||||
kind?: string;
|
||||
|
|
@ -36,7 +36,7 @@ export type ClickClackItemEventPayload = {
|
|||
};
|
||||
|
||||
/** Destination for durable activity rows (channel or DM conversation). */
|
||||
export type ClickClackActivityTarget = {
|
||||
type ClickClackActivityTarget = {
|
||||
channelId?: string;
|
||||
conversationId?: string;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export type ClickClackAccountConfig = {
|
|||
};
|
||||
|
||||
/** Root ClickClack channel config with optional named accounts. */
|
||||
export type ClickClackConfig = ClickClackAccountConfig & {
|
||||
type ClickClackConfig = ClickClackAccountConfig & {
|
||||
accounts?: Record<string, Partial<ClickClackAccountConfig>>;
|
||||
defaultAccount?: string;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const BATCH_MAX_GAP_MS = 2 * 60 * 1000;
|
|||
/** Upper bound of images sent to the vision model per batch. */
|
||||
export const MAX_FRAMES_PER_CALL = 16;
|
||||
|
||||
export type ParsedSegment = { startMs: number; endMs: number; text: string };
|
||||
type ParsedSegment = { startMs: number; endMs: number; text: string };
|
||||
|
||||
/** Parses "HH:MM:SS" (or "H:MM", with optional am/pm) on a local day into epoch ms. */
|
||||
export function clockToMs(day: string, clock: string): number | null {
|
||||
|
|
@ -120,9 +120,7 @@ type RawCard = {
|
|||
appSites?: unknown;
|
||||
};
|
||||
|
||||
export type CardParseResult =
|
||||
| { ok: true; drafts: LogbookCardDraft[] }
|
||||
| { ok: false; error: string };
|
||||
type CardParseResult = { ok: true; drafts: LogbookCardDraft[] } | { ok: false; error: string };
|
||||
|
||||
function normalizeCategory(value: unknown): string {
|
||||
const category = typeof value === "string" ? value.trim().toLowerCase() : "";
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ type LogbookSnapshotParams = {
|
|||
quality?: number;
|
||||
};
|
||||
|
||||
export type LogbookSnapshotPayload = { format: "jpeg"; base64: string } | { error: string };
|
||||
type LogbookSnapshotPayload = { format: "jpeg"; base64: string } | { error: string };
|
||||
|
||||
function readParams(value: unknown): LogbookSnapshotParams {
|
||||
if (!value || typeof value !== "object") {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ function unwrapInvokePayload(raw: unknown): SnapshotPayload | null {
|
|||
/** Capture commands in preference order: app nodes first, headless node hosts second. */
|
||||
const CAPTURE_COMMANDS = ["screen.snapshot", "logbook.snapshot"] as const;
|
||||
|
||||
export type LogbookStatus = {
|
||||
type LogbookStatus = {
|
||||
captureEnabled: boolean;
|
||||
capturePaused: boolean;
|
||||
captureIntervalSeconds: number;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue