v0.16.14: TypeScript 编译错误修复 + 文档同步 + 代码健壮性增强

This commit is contained in:
2026-07-30 21:47:52 +08:00
parent 28655b80d9
commit 18f34c91fe
12 changed files with 53 additions and 60 deletions
+2 -2
View File
@@ -4,7 +4,7 @@
* 支持自动压缩与手动 /compress 触发
*/
import type { OllamaMessage, OllamaStreamChunk } from '../types.js';
import type { OllamaMessage, OllamaStreamChunk, OllamaChatParams } from '../types.js';
import { logInfo, logWarn, logSuccess, logError } from './log-service.js';
// ── R12: 压缩去重 — 内容指纹追踪 ──
@@ -586,7 +586,7 @@ export interface StructuredSummary {
*/
export async function compressWithLLM(
messages: OllamaMessage[],
api: { chatStream: (params: Record<string, unknown>, onChunk: (chunk: OllamaStreamChunk) => void, ac?: AbortController) => Promise<void> },
api: { chatStream: (params: OllamaChatParams, onChunk: (chunk: OllamaStreamChunk) => void, abortController?: AbortController) => Promise<void> },
model: string,
options: {
keepHead?: number;