perf: slim mattermost helper imports · openclaw/openclaw@8b9e46a
steipete
·
2026-04-24
·
via Recent Commits to openclaw:main
File tree
extensions/mattermost/src/mattermost
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { createHash } from "node:crypto"; |
| 2 | +import type { ModelsProviderData } from "openclaw/plugin-sdk/command-auth"; |
| 3 | +import { resolveStoredModelOverride } from "openclaw/plugin-sdk/command-auth"; |
| 4 | +import { loadSessionStore, resolveStorePath } from "openclaw/plugin-sdk/config-runtime"; |
| 5 | +import type { OpenClawConfig } from "openclaw/plugin-sdk/core"; |
| 6 | +import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared"; |
2 | 7 | import { |
3 | 8 | normalizeOptionalString, |
4 | 9 | normalizeStringifiedOptionalString, |
5 | 10 | } from "openclaw/plugin-sdk/text-runtime"; |
6 | 11 | import type { MattermostInteractiveButtonInput } from "./interactions.js"; |
7 | | -import { |
8 | | -loadSessionStore, |
9 | | -normalizeProviderId, |
10 | | -resolveStorePath, |
11 | | -resolveStoredModelOverride, |
12 | | -type ModelsProviderData, |
13 | | -type OpenClawConfig, |
14 | | -} from "./runtime-api.js"; |
15 | 12 | |
16 | 13 | const MATTERMOST_MODEL_PICKER_CONTEXT_KEY = "oc_model_picker"; |
17 | 14 | const MODELS_PAGE_SIZE = 8; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import { rawDataToString } from "openclaw/plugin-sdk/browser-node-runtime"; |
| 2 | +import { formatInboundFromLabel as formatInboundFromLabelShared } from "openclaw/plugin-sdk/channel-inbound"; |
| 3 | +import { createDedupeCache, type OpenClawConfig } from "openclaw/plugin-sdk/core"; |
| 4 | +import { resolveThreadSessionKeys as resolveThreadSessionKeysShared } from "openclaw/plugin-sdk/routing"; |
1 | 5 | import { |
2 | 6 | normalizeLowercaseStringOrEmpty, |
3 | 7 | normalizeOptionalString, |
4 | 8 | } from "openclaw/plugin-sdk/text-runtime"; |
5 | | -import { |
6 | | -createDedupeCache, |
7 | | -formatInboundFromLabel as formatInboundFromLabelShared, |
8 | | -rawDataToString, |
9 | | -resolveThreadSessionKeys as resolveThreadSessionKeysShared, |
10 | | -type OpenClawConfig, |
11 | | -} from "./runtime-api.js"; |
12 | 9 | |
13 | 10 | export { createDedupeCache, rawDataToString }; |
14 | 11 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import type { OpenClawConfig, PluginRuntime } from "openclaw/plugin-sdk/core"; |
| 2 | +import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime"; |
1 | 3 | import { |
2 | 4 | deliverTextOrMediaReply, |
3 | 5 | isReasoningReplyPayload, |
4 | 6 | resolveSendableOutboundReplyParts, |
5 | 7 | } from "openclaw/plugin-sdk/reply-payload"; |
6 | | -import { |
7 | | -getAgentScopedMediaLocalRoots, |
8 | | -type OpenClawConfig, |
9 | | -type PluginRuntime, |
10 | | -type ReplyPayload, |
11 | | -} from "./runtime-api.js"; |
| 8 | +import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; |
12 | 9 | |
13 | 10 | type MarkdownTableMode = Parameters<PluginRuntime["channel"]["text"]["convertMarkdownTables"]>[1]; |
14 | 11 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。