Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 0 additions & 185 deletions apps/twig/src/main/lib/shellManager.ts

This file was deleted.

10 changes: 10 additions & 0 deletions apps/twig/src/main/services/app-lifecycle/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { MAIN_TOKENS } from "../../di/tokens.js";
import { logger } from "../../lib/logger.js";
import type { AgentService } from "../agent/service.js";
import { shutdownPostHog, trackAppEvent } from "../posthog-analytics.js";
import type { ShellService } from "../shell/service.js";

const log = logger.scope("app-lifecycle");

Expand All @@ -13,6 +14,9 @@ export class AppLifecycleService {
@inject(MAIN_TOKENS.AgentService)
private agentService!: AgentService;

@inject(MAIN_TOKENS.ShellService)
private shellService!: ShellService;

private _isQuittingForUpdate = false;

get isQuittingForUpdate(): boolean {
Expand All @@ -26,6 +30,12 @@ export class AppLifecycleService {
async shutdown(): Promise<void> {
log.info("Performing graceful shutdown...");

try {
this.shellService.destroyAll();
} catch (error) {
log.error("Error cleaning up ShellService during shutdown", error);
}

try {
await this.agentService.cleanupAll();
} catch (error) {
Expand Down
Loading
Loading