mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-07 07:59:42 +02:00
chore: project setup and tooling cleanup (#26)
* add project setup * add tools to eslint * remove contributing.md * update claude md * chore: simplify CI to single Node.js version (22) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * use node 20 * adjust formatting * fix linting * format * fix layout * fix: align CI node version to .nvmrc (22), remove redundant gotcha Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: arkon <arkon.85@hotmail.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
arkon
parent
2b2829ebde
commit
480584de63
@@ -102,7 +102,7 @@ export class SessionManager extends EventEmitter {
|
||||
// Create a new lock promise that others will wait on
|
||||
// Define unlock first to ensure it's always in scope before promise assignment
|
||||
let unlock!: () => void;
|
||||
const lockPromise = new Promise<void>(resolve => {
|
||||
const lockPromise = new Promise<void>((resolve) => {
|
||||
unlock = resolve;
|
||||
});
|
||||
this._sessionCreationLock = lockPromise;
|
||||
@@ -196,9 +196,7 @@ export class SessionManager extends EventEmitter {
|
||||
* Uses Promise.allSettled to ensure all sessions are stopped even if some fail.
|
||||
*/
|
||||
async stopAllSessions(): Promise<void> {
|
||||
const stopPromises = Array.from(this.sessions.keys()).map((id) =>
|
||||
this.stopSession(id)
|
||||
);
|
||||
const stopPromises = Array.from(this.sessions.keys()).map((id) => this.stopSession(id));
|
||||
const results = await Promise.allSettled(stopPromises);
|
||||
// Log any failures but don't throw - best effort cleanup
|
||||
for (const result of results) {
|
||||
@@ -292,4 +290,3 @@ export function getSessionManager(): SessionManager {
|
||||
}
|
||||
return managerInstance;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user