From ddc2f2ab9dc3b600e15d7886ea5292d91880b6c0 Mon Sep 17 00:00:00 2001 From: highperfocused Date: Wed, 11 Mar 2026 23:29:16 +0100 Subject: [PATCH] =?UTF-8?q?Typo=20und=20Typanpassungen=20in=20index.ts;=20?= =?UTF-8?q?f=C3=BCge=20Typen=20zu=20tsconfig.json=20hinzu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 7 ++++--- tsconfig.json | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index f4c5a0b..ba22bdf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -163,7 +163,7 @@ if (providerName?.toLowerCase() === "ollama") { console.error(`[agent] Using Ollama model "${modelId}" at ${ollamaBaseUrl}`); } else if (providerName && modelId) { - model = getModel(providerName as Parameters[0], modelId as any); + model = (getModel as (provider: string, model: string) => Model | undefined)(providerName, modelId); if (!model) { console.error( `[agent] Model "${providerName}/${modelId}" not found. ` + @@ -182,7 +182,8 @@ if (providerName?.toLowerCase() === "ollama") { // ─── tools ────────────────────────────────────────────────────────────────── -const toolMap: Record = { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const toolMap: Record = { read: readTool, bash: bashTool, edit: editTool, @@ -224,7 +225,7 @@ let resourceLoader: DefaultResourceLoader | undefined; if (systemPrompt !== undefined || appendPrompt !== undefined) { resourceLoader = new DefaultResourceLoader({ - systemPromptOverride: (base: string) => { + systemPromptOverride: (base: string | undefined) => { let result = systemPrompt !== undefined ? systemPrompt : base; if (appendPrompt) { result = result ? `${result}\n\n${appendPrompt}` : appendPrompt; diff --git a/tsconfig.json b/tsconfig.json index e81d88c..b483a51 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,8 @@ "resolveJsonModule": true, "declaration": true, "declarationMap": true, - "sourceMap": true + "sourceMap": true, + "types": ["node"] }, "include": ["src"], "exclude": ["node_modules", "dist"]