mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
chore(deadcode): delete unused route wrappers
This commit is contained in:
parent
6ad7f66af2
commit
a977dc843d
2 changed files with 3 additions and 15 deletions
|
|
@ -523,17 +523,13 @@ export async function hasRecentWorkspaceAttestation(
|
|||
}
|
||||
}
|
||||
|
||||
export async function isWorkspaceAttestationMarker(attestationPath: string): Promise<boolean> {
|
||||
return (await readWorkspaceAttestationMarkerStatus(attestationPath)) === "marker";
|
||||
}
|
||||
|
||||
export async function shouldRemoveWorkspaceAttestation(
|
||||
attestationPath: string,
|
||||
opts?: { trustUnknown?: boolean },
|
||||
): Promise<boolean> {
|
||||
try {
|
||||
return (
|
||||
(await isWorkspaceAttestationMarker(attestationPath)) ||
|
||||
(await readWorkspaceAttestationMarkerStatus(attestationPath)) === "marker" ||
|
||||
(await hasRecentWorkspaceAttestation(attestationPath, opts))
|
||||
);
|
||||
} catch {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ import type {
|
|||
ConversationRef,
|
||||
SessionBindingRecord,
|
||||
} from "../infra/outbound/session-binding-service.js";
|
||||
import {
|
||||
normalizeChannelRouteRef,
|
||||
type ChannelRouteRef,
|
||||
} from "../plugin-sdk/channel-route.js";
|
||||
import { normalizeChannelRouteRef, type ChannelRouteRef } from "../plugin-sdk/channel-route.js";
|
||||
import {
|
||||
normalizeConversationTargetParams,
|
||||
type ConversationTargetParams,
|
||||
|
|
@ -63,11 +60,6 @@ export function resolveConversationDeliveryTarget(params: ConversationTargetPara
|
|||
return { to };
|
||||
}
|
||||
|
||||
/** Converts a channel route back to legacy delivery context metadata. */
|
||||
export function deliveryContextFromRoute(route?: ChannelRouteRef): DeliveryContext | undefined {
|
||||
return deliveryContextFromChannelRoute(route);
|
||||
}
|
||||
|
||||
/** Converts a persisted conversation reference into a channel route. */
|
||||
export function routeFromConversationRef(
|
||||
conversation?: ConversationRef | null,
|
||||
|
|
@ -104,7 +96,7 @@ export function routeToDeliveryFields(route?: ChannelRouteRef): {
|
|||
accountId?: string;
|
||||
threadId?: string | number;
|
||||
} {
|
||||
const deliveryContext = deliveryContextFromRoute(route);
|
||||
const deliveryContext = deliveryContextFromChannelRoute(route);
|
||||
return {
|
||||
...(deliveryContext ? { deliveryContext } : {}),
|
||||
...(deliveryContext?.channel ? { channel: deliveryContext.channel } : {}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue