MCPcopy
hub / github.com/Waishnav/devspace / createSession

Method createSession

src/process-sessions.ts:300–317  ·  view source on GitHub ↗
(input: StartCommandInput)

Source from the content-addressed store, hash-verified

298 }
299
300 private createSession(input: StartCommandInput): ProcessSession {
301 let resolveExit = (): void => undefined;
302 const exitPromise = new Promise<void>((resolve) => {
303 resolveExit = resolve;
304 });
305
306 return {
307 id: this.nextSessionId++,
308 workspaceId: input.workspaceId,
309 startedAt: Date.now(),
310 columns: terminalSize(input.columns, DEFAULT_COLUMNS),
311 rows: terminalSize(input.rows, DEFAULT_ROWS),
312 buffer: new HeadTailBuffer(this.maxBufferCharacters),
313 running: true,
314 exitPromise,
315 resolveExit,
316 };
317 }
318
319 private startPipe(session: ProcessSession, input: StartCommandInput): void {
320 const shell = resolveShellCommand(input.command);

Callers 1

startMethod · 0.95

Calls 1

terminalSizeFunction · 0.85

Tested by

no test coverage detected