agentService.ts ×5

Frontier kind: Code frontier

unlabeled · c_0464043420b1

30 tests · 52076 LOC · 304 files · introduces 0 tests · 35 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges35 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
5559 ranges52076 lines · 304 files · Browse complete extent
All tests (intent)
30 testsBrowse 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.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

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

3 files ranked by introduced lines: 35 introduced LOC across 11 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/agentService.ts 15 introduced LOC · 5 ranges

Open complete file

551 */
552 private async _resolveWorkingDirectoryBeforeSend(params: { session: string; chat: string; turnId: string; prompt: string }): Promise<URI | undefined> {
553 > const sessionId = AgentSession.id(params.session); agentService.ts
554 > const pickedFolder = this._configurationService.getEffectiveWorkingDirectory(params.session);
555 > const pickedFolderUri = pickedFolder ? URI.parse(pickedFolder) : undefined;
556 >
557 > // Only worktree-isolation sessions defer directory resolution to the first
558 > // send (so the prompt can name the branch); folder / workspace-less
559 > // sessions run directly in the picked folder.
560 > if (!this._worktree?.isWorkingDirectoryPending(sessionId)) {
561 > return pickedFolderUri
562 ? this._configurationService.resolveWorkingDirectoryForResume(params.session, pickedFolderUri)
563 > : undefined; agentService.ts
564 > }
565
566 // Fall back to the picked folder when worktree creation failed so the
567 // session still materializes in the user's folder rather than nowhere.
568 return await this._resolveWorktreeBeforeSend({ ...params, sessionId, pickedFolderUri }) ?? pickedFolderUri;
569 > } agentService.ts
570
571 private async _resolveChatAttachmentTurns(resource: string): Promise<readonly Turn[]> {
2211 return false;
2212 }
2213 > const attachmentsRootStr = this._attachmentsRoot(channel).toString(); agentService.ts
2214 return !!action.message.attachments?.some(a => this._isRewritableAttachment(a, attachmentsRootStr));
2215 }
2233
2234 private _attachmentsRoot(session: string): URI {
2235 > return joinPath(this._sessionDataService.getSessionDataDir(URI.parse(session)), SESSION_ATTACHMENTS_DIRNAME); agentService.ts
2236 > }
2237
2238 /**
src/vs/platform/agentHost/node/agentHostChangesetFileMonitorCoordinator.ts 10 introduced LOC · 3 ranges

Open complete file

291 const repositoryRoot = await this._resolveActivityRepositoryRoot(sessionStr);
292 if (!repositoryRoot) {
293 > this._unresolvedActiveSessions.add(sessionStr); agentHostChangesetFileMonitorCoordinator.ts
294 > this._releaseSessionRoot(sessionStr);
295 > return;
296 > }
297 const rootStr = repositoryRoot.toString();
298 let activeSessions = this._rootActiveSessions.get(rootStr);
343 const workingDirectory = this._getActivityWorkingDirectory(sessionStr);
344 if (!workingDirectory) {
346 > }
347 let workingDirectoryUri: URI;
348 try {
360 return workingDirectory;
361 }
362 > const parsedSubagent = parseSubagentSessionUri(sessionStr); agentHostChangesetFileMonitorCoordinator.ts
363 > if (!parsedSubagent) {
364 > return undefined;
365 > }
366 return this._configurationService.getEffectiveWorkingDirectory(parsedSubagent.parentSession.toString());
367 }
src/vs/platform/agentHost/node/agentHostChangesetOperationService.ts 10 introduced LOC · 3 ranges

Open complete file

99
100 updateOperations(sessionKey: string, changeset?: string, gitState?: ISessionGitState, gitHubState?: ISessionGitHubState): void {
101 > if (!gitState) { agentHostChangesetOperationService.ts
102 > const sessionState = this._stateManager.getSessionState(sessionKey);
103 > gitState = readSessionGitState(sessionState?._meta);
104 > if (!gitState) {
105 > return;
106 > }
107 > }
108
109 if (!gitHubState) {
115 ? [changeset]
116 : this._changesetSubscriptions.getSessionSubscriptions(sessionKey);
118 > for (const changeset of changesets) {
119 const operations = this.getOperations(sessionKey, changeset, gitState, gitHubState);
120