fix: address 10 unresolved PR review threads

- README: add language specifier to fenced code block
- paths.ts: guard npmPackageRootDirectory() against bundle structure drift
- OpenCodeInstaller: resolve bundle from import.meta.url, not process.cwd()
- OpenCodeInstaller: log warnings on AGENTS.md injection failures
- WindsurfHooksInstaller: key registry by full workspace path, not basename
- uninstall.ts: poll health endpoint to wait for worker exit before file deletion
- uninstall.ts: call IDE-specific uninstallers (Gemini, Windsurf, OpenCode, OpenClaw, Codex)
- opencode-plugin: cap session tracking Map at 1000 entries with LRU eviction
- GeminiCliHooksInstaller: document intentional JSON double-escaping

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-04-04 14:45:53 -07:00
parent 21b10b4696
commit c7c68e81f4
7 changed files with 126 additions and 37 deletions
+11
View File
@@ -165,8 +165,19 @@ async function workerGetText(path: string): Promise<string | null> {
const contentSessionIdsByOpenCodeSessionId = new Map<string, string>();
const MAX_SESSION_MAP_ENTRIES = 1000;
function getOrCreateContentSessionId(openCodeSessionId: string): string {
if (!contentSessionIdsByOpenCodeSessionId.has(openCodeSessionId)) {
// Evict oldest entries when the map exceeds the cap (Map preserves insertion order)
while (contentSessionIdsByOpenCodeSessionId.size >= MAX_SESSION_MAP_ENTRIES) {
const oldestKey = contentSessionIdsByOpenCodeSessionId.keys().next().value;
if (oldestKey !== undefined) {
contentSessionIdsByOpenCodeSessionId.delete(oldestKey);
} else {
break;
}
}
contentSessionIdsByOpenCodeSessionId.set(
openCodeSessionId,
`opencode-${openCodeSessionId}-${Date.now()}`,