chatModel.ts ×4

Frontier kind: Code frontier

unlabeled · c_269d79181cbd

10 tests · 45044 LOC · 194 files · introduces 0 tests · 33 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges33 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4198 ranges45044 lines · 194 files · Browse complete extent
All tests (intent)
10 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.

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

src/vs/workbench/contrib/chat/common/model/chatModel.ts 33 introduced LOC · 4 ranges

Open complete file

110 export namespace IChatRequestVariableData {
111 export function toExport(data: IChatRequestVariableData): IChatRequestVariableData {
112 > return { variables: data.variables.map(IChatRequestVariableEntry.toExport) }; chatModel.ts
113 > }
114 }
115
3098
3099 toExport(): IExportableChatData {
3100 > return { chatModel.ts
3101 > responderUsername: this.responderUsername,
3102 > initialLocation: this.initialLocation,
3103 > requests: this._requests.map((r): ISerializableChatRequestData => {
3104 > const message = {
3105 > ...r.message,
3106 > // eslint-disable-next-line @typescript-eslint/no-explicit-any
3107 > parts: r.message.parts.map((p: any) => p && 'toJSON' in p ? (p.toJSON as Function)() : p)
3108 > };
3109 > const agent = r.response?.agent;
3110 > const agentJson = agent && 'toJSON' in agent ? (agent.toJSON as Function)() :
3111 agent ? { ...agent } : undefined;
3112 > return { chatModel.ts
3113 > requestId: r.id,
3114 > message,
3115 > variableData: IChatRequestVariableData.toExport(r.variableData),
3116 > response: r.response ?
3117 r.response.entireResponse.value.map(item => {
3118 // Keeping the shape of the persisted data the same for back compat
3127 })
3128 : undefined,
3129 > shouldBeRemovedOnSend: r.shouldBeRemovedOnSend, chatModel.ts
3130 > agent: agentJson,
3131 > timestamp: r.requestTimestamp,
3132 > confirmation: r.confirmation,
3133 > editedFileEvents: r.editedFileEvents,
3134 > modelId: r.modelId,
3135 > modeInfo: r.modeInfo,
3136 > isSystemInitiated: r.isSystemInitiated || undefined,
3137 > systemInitiatedLabel: r.systemInitiatedLabel,
3138 > terminalExecutionId: r.terminalExecutionId,
3139 > ...r.response?.toJSON(),
3140 > };
3141 > }),
3142 > };
3143 > }
3144
3145 toJSON(): ISerializableChatData {