From b4beae7b9a2a64258c07283ed02c71d66a6f7de4 Mon Sep 17 00:00:00 2001 From: Daniel Smolsky Date: Fri, 5 Dec 2025 12:07:30 -0500 Subject: [PATCH] refactor: rename syncToolParametersFromOpenCode to syncToolCache --- lib/fetch-wrapper/handler.ts | 4 ++-- lib/state/tool-cache.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/fetch-wrapper/handler.ts b/lib/fetch-wrapper/handler.ts index 8874e32d..ce7a4765 100644 --- a/lib/fetch-wrapper/handler.ts +++ b/lib/fetch-wrapper/handler.ts @@ -2,7 +2,7 @@ import type { FetchHandlerContext, FetchHandlerResult, FormatDescriptor, PrunedI import { type PluginState, ensureSessionRestored } from "../state" import type { Logger } from "../logger" import { buildPrunableToolsList, buildEndInjection } from "./prunable-list" -import { syncToolParametersFromOpenCode } from "../state/tool-cache" +import { syncToolCache } from "../state/tool-cache" const PRUNED_CONTENT_MESSAGE = '[Output removed to save context - information superseded or no longer needed]' @@ -71,7 +71,7 @@ export async function handleFormat( const sessionId = ctx.state.lastSeenSessionId const protectedSet = new Set(ctx.config.protectedTools) if (sessionId) { - await syncToolParametersFromOpenCode(ctx.client, sessionId, ctx.state, ctx.toolTracker, protectedSet, ctx.logger) + await syncToolCache(ctx.client, sessionId, ctx.state, ctx.toolTracker, protectedSet, ctx.logger) } if (ctx.config.strategies.onTool.length > 0) { diff --git a/lib/state/tool-cache.ts b/lib/state/tool-cache.ts index b29d0d68..aeabd609 100644 --- a/lib/state/tool-cache.ts +++ b/lib/state/tool-cache.ts @@ -10,7 +10,7 @@ const MAX_TOOL_CACHE_SIZE = 500 * This is the single source of truth for tool parameters, replacing * format-specific parsing from LLM API requests. */ -export async function syncToolParametersFromOpenCode( +export async function syncToolCache( client: any, sessionId: string, state: PluginState,