agentHostChangesetOperationService.ts ×3

Frontier kind: Code frontier

unlabeled · c_5ebacd9862f8

2 tests · 51779 LOC · 304 files · introduces 0 tests · 37 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges37 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
5478 ranges51779 lines · 304 files · Browse complete extent
All tests (intent)
2 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: 37 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/agentHostChangesetService.ts 25 introduced LOC · 3 ranges

Open complete file

888 */
889 private _publishChangesetDiffs(session: ProtocolURI, changesetUri: ProtocolURI, diffs: readonly ISessionFileDiff[], reviewed?: { readonly repoRoot: URI; readonly paths: ReadonlySet<string> }): void {
890 > // Get the available operations for this changeset. This call assumes that at this point agentHostChangesetService.ts
891 > // the git state of the session is up-to-date as it is being used to determine the available
892 > // operations. Long term this should be replaced with a more robust mechanism.
893 > const operations = this._changesetOperationService.getOperations(session, changesetUri);
894 >
895 > const files: ChangesetFile[] = [];
896 > for (const edit of diffs) {
897 const id = edit.after?.uri ?? edit.before?.uri;
898 if (!id) {
911 }
912 }
914 > this._stateManager.dispatchServerAction(changesetUri, {
915 > type: ActionType.ChangesetContentChanged,
916 > files,
917 > operations: operations
918 > ? [...operations]
919 : undefined,
921 >
922 > // Move the changeset out of `computing` (or out of an earlier error)
923 > // now that we have a fresh, complete file list.
924 > const status = this._stateManager.getChangesetState(changesetUri)?.status;
925 > if (status !== ChangesetStatus.Ready) {
926 > this._stateManager.dispatchServerAction(changesetUri, {
927 > type: ActionType.ChangesetStatusChanged,
928 > status: ChangesetStatus.Ready,
929 > });
930 > }
931 > }
932
933 /**
src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.ts 6 introduced LOC · 2 ranges

Open complete file

68
69 case ActionType.ChangesetContentChanged: {
70 > const next = action.operations === undefined reducer.ts
71 ? { ...state, files: action.files }
72 > : { ...state, files: action.files, operations: action.operations }; reducer.ts
73 > if (action.error === undefined) {
74 > const { error: _ignored, ...rest } = next;
75 > return rest;
76 > }
77 return { ...next, error: action.error };
78 }
src/vs/platform/agentHost/node/agentHostChangesetOperationService.ts 6 introduced LOC · 3 ranges

Open complete file

51
52 getOperations(sessionKey: string, changeset: string, gitState?: ISessionGitState, gitHubState?: ISessionGitHubState): readonly ChangesetOperation[] {
54 > const sessionState = this._stateManager.getSessionState(sessionKey);
55 > gitState = readSessionGitState(sessionState?._meta);
56 > if (!gitState) {
57 return [];
58 }
60
61 if (!gitHubState) {