* 获取上下文为Prompt字符串
(
filterOptions?: ContextFilter,
formatOptions?: {
includeSystemInfo?: boolean;
includeToolHistory?: boolean;
includeWorkspaceInfo?: boolean;
maxRecentMessages?: number;
}
)
| 276 | * 获取上下文为Prompt字符串 |
| 277 | */ |
| 278 | public async getContextForPrompt( |
| 279 | filterOptions?: ContextFilter, |
| 280 | formatOptions?: { |
| 281 | includeSystemInfo?: boolean; |
| 282 | includeToolHistory?: boolean; |
| 283 | includeWorkspaceInfo?: boolean; |
| 284 | maxRecentMessages?: number; |
| 285 | } |
| 286 | ): Promise<string> { |
| 287 | this.ensureReady(); |
| 288 | |
| 289 | const { context, compressed } = await this.getFormattedContext(filterOptions); |
| 290 | return formatContextForPrompt(context, compressed, formatOptions); |
| 291 | } |
| 292 | |
| 293 | /** |
| 294 | * 搜索历史会话 |
nothing calls this directly
no test coverage detected