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
Some checks failed
Build and Push Docker Image / build (push) Failing after 20s
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"resolveJsonModule": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true
|
||||
"sourceMap": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
|
||||
Reference in New Issue
Block a user