refactor(background-agent): remove file persistence, use memory-only

- Remove background_tasks.json persistence (race condition with multiple instances)
- Pure memory-based task management
- Add logging for promptAsync errors
- Remove unused persist/restore methods

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-11 17:29:20 +09:00
parent 80cfe87390
commit 24a7f333a2
3 changed files with 10 additions and 95 deletions

View File

@@ -164,11 +164,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
updateTerminalTitle({ sessionId: "main" });
const backgroundManager = new BackgroundManager(
ctx.client,
path.join(ctx.directory, ".opencode", "background-tasks.json")
);
await backgroundManager.restore();
const backgroundManager = new BackgroundManager(ctx.client);
const backgroundNotificationHook = createBackgroundNotificationHook(backgroundManager);
const backgroundTools = createBackgroundTools(backgroundManager, ctx.client);