mockAgent.ts ×5

Frontier kind: Joint frontier

unlabeled · c_c330b4427238

1 test · 50462 LOC · 304 files · introduces 1 test · 24 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges24 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
5046 ranges50462 lines · 304 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 24 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/test/node/mockAgent.ts 24 introduced LOC · 5 ranges

Open complete file

388
389 constructor() {
390 > // Seed the pre-existing session so it appears in listSessions() mockAgent.ts
391 > this._sessions.set(AgentSession.id(PRE_EXISTING_SESSION_URI), PRE_EXISTING_SESSION_URI);
392 >
393 > // Allow integration tests to seed additional pre-existing sessions across
394 > // server restarts via env var. The value is a comma-separated list of
395 > // session URIs (e.g. `mock://pre-1,mock://pre-2`).
396 > const seeded = process.env['VSCODE_AGENT_HOST_MOCK_SEED_SESSIONS'];
397 > if (seeded) {
398 for (const raw of seeded.split(',')) {
399 const trimmed = raw.trim();
405 }
406 }
407 > } mockAgent.ts
408
409 getDescriptor(): IAgentDescriptor {
416
417 async listSessions(): Promise<IAgentSessionMetadata[]> {
418 > return [...this._sessions.values()].map(s => ({ mockAgent.ts
419 > session: s,
420 > startTime: Date.now(),
421 > modifiedTime: Date.now(),
422 > project: mockProject(this.id),
423 > summary: s.toString() === PRE_EXISTING_SESSION_URI.toString() ? 'Pre-existing session' : undefined,
424 > }));
425 > }
426
427 async getSessionMetadata(session: URI): Promise<IAgentSessionMetadata | undefined> {
439
440 async createSession(config?: IAgentCreateSessionConfig): Promise<IAgentCreateSessionResult> {
441 > const session = config?.session ?? AgentSession.uri('mock', `mock-session-${this._nextId++}`); mockAgent.ts
442 > const rawId = AgentSession.id(session);
443 > this._sessions.set(rawId, session);
444 > return { session, project: mockProject(this.id) };
445 > }
446
447 async resolveSessionConfig(params: IAgentResolveSessionConfigParams): Promise<ResolveSessionConfigResult> {
965
966 dispose(): void {
967 > this._onDidSessionProgress.dispose(); mockAgent.ts
968 > }
969
970 /**