Typo und Typanpassungen in index.ts; füge Typen zu tsconfig.json hinzu
Some checks failed
Build and Push Docker Image / build (push) Failing after 20s

This commit is contained in:
2026-03-11 23:29:16 +01:00
parent 419a07652a
commit ddc2f2ab9d
2 changed files with 6 additions and 4 deletions

View File

@@ -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<typeof getModel>[0], modelId as any);
model = (getModel as (provider: string, model: string) => Model<any> | 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<string, (typeof readTool)> = {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const toolMap: Record<string, any> = {
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;

View File

@@ -12,7 +12,8 @@
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true
"sourceMap": true,
"types": ["node"]
},
"include": ["src"],
"exclude": ["node_modules", "dist"]