feat: add Docker container launch option and update process handling

- Introduced a new option to launch the application in a Docker container (Isolated Mode) from the main menu.
- Added checks for the ANTHROPIC_API_KEY environment variable to ensure proper API functionality.
- Updated process management to include Docker, allowing for better cleanup and handling of spawned processes.
- Enhanced user prompts and logging for improved clarity during the launch process.
This commit is contained in:
webdevcody
2026-01-03 23:53:44 -05:00
parent 586aabe11f
commit 22aa24ae04
4 changed files with 94 additions and 40 deletions

View File

@@ -496,6 +496,7 @@ export function printModeMenu() {
console.log('═══════════════════════════════════════════════════════');
console.log(' 1) Web Application (Browser)');
console.log(' 2) Desktop Application (Electron)');
console.log(' 3) Docker Container (Isolated)');
console.log('═══════════════════════════════════════════════════════');
console.log('');
}
@@ -506,7 +507,7 @@ export function printModeMenu() {
/**
* Create a cleanup handler for spawned processes
* @param {object} processes - Object with process references {server, web, electron}
* @param {object} processes - Object with process references {server, web, electron, docker}
* @returns {Function} - Cleanup function
*/
export function createCleanupHandler(processes) {
@@ -527,6 +528,10 @@ export function createCleanupHandler(processes) {
killPromises.push(killProcessTree(processes.electron.pid));
}
if (processes.docker && !processes.docker.killed && processes.docker.pid) {
killPromises.push(killProcessTree(processes.docker.pid));
}
await Promise.all(killPromises);
};
}