refactor: trim model planner exports

This commit is contained in:
Peter Steinberger
2026-05-02 00:21:46 +01:00
parent 47286e7349
commit 8e78c412e9
3 changed files with 9 additions and 9 deletions

View File

@@ -3,7 +3,7 @@ import path from "node:path";
export const CANONICAL_ROOT_MEMORY_FILENAME = "MEMORY.md";
export const LEGACY_ROOT_MEMORY_FILENAME = "memory.md";
export const ROOT_MEMORY_REPAIR_RELATIVE_DIR = ".openclaw-repair/root-memory";
const ROOT_MEMORY_REPAIR_RELATIVE_DIR = ".openclaw-repair/root-memory";
export function resolveCanonicalRootMemoryPath(workspaceDir: string): string {
return path.join(workspaceDir, CANONICAL_ROOT_MEMORY_FILENAME);
@@ -17,7 +17,7 @@ export function resolveRootMemoryRepairDir(workspaceDir: string): string {
return path.join(workspaceDir, ".openclaw-repair", "root-memory");
}
export function normalizeWorkspaceRelativePath(value: string): string {
function normalizeWorkspaceRelativePath(value: string): string {
return value.trim().replace(/\\/g, "/").replace(/^\.\//, "");
}

View File

@@ -8,24 +8,24 @@ import type {
NormalizedModelCatalogRow,
} from "./types.js";
export type ManifestModelCatalogPlugin = {
type ManifestModelCatalogPlugin = {
id: string;
providers?: readonly string[];
modelCatalog?: Pick<ModelCatalog, "providers" | "aliases" | "suppressions" | "discovery">;
};
export type ManifestModelCatalogRegistry = {
type ManifestModelCatalogRegistry = {
plugins: readonly ManifestModelCatalogPlugin[];
};
export type ManifestModelCatalogPlanEntry = {
type ManifestModelCatalogPlanEntry = {
pluginId: string;
provider: string;
discovery?: ModelCatalogDiscovery;
rows: readonly NormalizedModelCatalogRow[];
};
export type ManifestModelCatalogConflict = {
type ManifestModelCatalogConflict = {
mergeKey: string;
ref: string;
provider: string;
@@ -34,7 +34,7 @@ export type ManifestModelCatalogConflict = {
secondPluginId: string;
};
export type ManifestModelCatalogPlan = {
type ManifestModelCatalogPlan = {
rows: readonly NormalizedModelCatalogRow[];
entries: readonly ManifestModelCatalogPlanEntry[];
conflicts: readonly ManifestModelCatalogConflict[];

View File

@@ -3,13 +3,13 @@ import type { OpenClawProviderIndex } from "./provider-index/index.js";
import { normalizeModelCatalogProviderId } from "./refs.js";
import type { ModelCatalogProvider, NormalizedModelCatalogRow } from "./types.js";
export type ProviderIndexModelCatalogPlanEntry = {
type ProviderIndexModelCatalogPlanEntry = {
provider: string;
pluginId: string;
rows: readonly NormalizedModelCatalogRow[];
};
export type ProviderIndexModelCatalogPlan = {
type ProviderIndexModelCatalogPlan = {
rows: readonly NormalizedModelCatalogRow[];
entries: readonly ProviderIndexModelCatalogPlanEntry[];
};