MCPcopy Create free account
hub / github.com/echoVic/blade-code / createWorkspaceContext

Method createWorkspaceContext

src/context/ContextManager.ts:406–426  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

404 }
405
406 private async createWorkspaceContext(): Promise<WorkspaceContext> {
407 try {
408 const cwd = process.cwd();
409 return {
410 projectPath: cwd,
411 currentFiles: [],
412 recentFiles: [],
413 environment: {
414 nodeVersion: process.version,
415 platform: process.platform,
416 cwd,
417 },
418 };
419 } catch (error) {
420 return {
421 currentFiles: [],
422 recentFiles: [],
423 environment: {},
424 };
425 }
426 }
427
428 private shouldCompress(contextData: ContextData): boolean {
429 return contextData.metadata.totalTokens > this.options.compressionThreshold;

Callers 2

createSessionMethod · 0.95
loadSessionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected