perf: slim mattermost helper imports

This commit is contained in:
Peter Steinberger
2026-04-23 21:29:07 +01:00
parent f5042adf27
commit 8b9e46a099
3 changed files with 12 additions and 21 deletions

View File

@@ -1,17 +1,14 @@
import { createHash } from "node:crypto";
import type { ModelsProviderData } from "openclaw/plugin-sdk/command-auth";
import { resolveStoredModelOverride } from "openclaw/plugin-sdk/command-auth";
import { loadSessionStore, resolveStorePath } from "openclaw/plugin-sdk/config-runtime";
import type { OpenClawConfig } from "openclaw/plugin-sdk/core";
import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared";
import {
normalizeOptionalString,
normalizeStringifiedOptionalString,
} from "openclaw/plugin-sdk/text-runtime";
import type { MattermostInteractiveButtonInput } from "./interactions.js";
import {
loadSessionStore,
normalizeProviderId,
resolveStorePath,
resolveStoredModelOverride,
type ModelsProviderData,
type OpenClawConfig,
} from "./runtime-api.js";
const MATTERMOST_MODEL_PICKER_CONTEXT_KEY = "oc_model_picker";
const MODELS_PAGE_SIZE = 8;

View File

@@ -1,14 +1,11 @@
import { rawDataToString } from "openclaw/plugin-sdk/browser-node-runtime";
import { formatInboundFromLabel as formatInboundFromLabelShared } from "openclaw/plugin-sdk/channel-inbound";
import { createDedupeCache, type OpenClawConfig } from "openclaw/plugin-sdk/core";
import { resolveThreadSessionKeys as resolveThreadSessionKeysShared } from "openclaw/plugin-sdk/routing";
import {
normalizeLowercaseStringOrEmpty,
normalizeOptionalString,
} from "openclaw/plugin-sdk/text-runtime";
import {
createDedupeCache,
formatInboundFromLabel as formatInboundFromLabelShared,
rawDataToString,
resolveThreadSessionKeys as resolveThreadSessionKeysShared,
type OpenClawConfig,
} from "./runtime-api.js";
export { createDedupeCache, rawDataToString };

View File

@@ -1,14 +1,11 @@
import type { OpenClawConfig, PluginRuntime } from "openclaw/plugin-sdk/core";
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
import {
deliverTextOrMediaReply,
isReasoningReplyPayload,
resolveSendableOutboundReplyParts,
} from "openclaw/plugin-sdk/reply-payload";
import {
getAgentScopedMediaLocalRoots,
type OpenClawConfig,
type PluginRuntime,
type ReplyPayload,
} from "./runtime-api.js";
import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime";
type MarkdownTableMode = Parameters<PluginRuntime["channel"]["text"]["convertMarkdownTables"]>[1];