mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:40:43 +00:00
refactor: trim model planner exports
This commit is contained in:
@@ -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(/^\.\//, "");
|
||||
}
|
||||
|
||||
|
||||
@@ -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[];
|
||||
|
||||
@@ -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[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user