Get file content and mark as recently used.
(self, file_path: str)
| 107 | self._evict_by_tokens() |
| 108 | |
| 109 | def get(self, file_path: str) -> Optional[str]: |
| 110 | """Get file content and mark as recently used.""" |
| 111 | item = self._files.get(file_path) |
| 112 | if item: |
| 113 | item.last_used_at = int(time.time()) |
| 114 | item.last_used_turn = self._turn |
| 115 | item.access_count += 1 |
| 116 | return item.content |
| 117 | return None |
| 118 | |
| 119 | def touch(self, file_path: str): |
| 120 | """Mark file as recently used without returning content.""" |