(toolName: string, args: any)
| 41 | } |
| 42 | |
| 43 | get(toolName: string, args: any): string | null { |
| 44 | const key = this.keyFor(toolName, args); |
| 45 | const entry = this.cache.get(key); |
| 46 | if (entry) { |
| 47 | entry.hits++; |
| 48 | this.hits++; |
| 49 | return entry.result; |
| 50 | } |
| 51 | this.misses++; |
| 52 | return null; |
| 53 | } |
| 54 | |
| 55 | set(toolName: string, args: any, result: string): void { |
| 56 | if (typeof result !== 'string') return; |
no test coverage detected