()
| 404 | } |
| 405 | |
| 406 | private async createWorkspaceContext(): Promise<WorkspaceContext> { |
| 407 | try { |
| 408 | const cwd = process.cwd(); |
| 409 | return { |
| 410 | projectPath: cwd, |
| 411 | currentFiles: [], |
| 412 | recentFiles: [], |
| 413 | environment: { |
| 414 | nodeVersion: process.version, |
| 415 | platform: process.platform, |
| 416 | cwd, |
| 417 | }, |
| 418 | }; |
| 419 | } catch (error) { |
| 420 | return { |
| 421 | currentFiles: [], |
| 422 | recentFiles: [], |
| 423 | environment: {}, |
| 424 | }; |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | private shouldCompress(contextData: ContextData): boolean { |
| 429 | return contextData.metadata.totalTokens > this.options.compressionThreshold; |
no outgoing calls
no test coverage detected