chatRequestParser.ts ×4

Frontier kind: Joint frontier

unlabeled · c_e3caff050b67

1 test · 41668 LOC · 185 files · introduces 1 test · 19 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges19 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
3818 ranges41668 lines · 185 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.

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

src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.ts 11 introduced LOC · 4 ranges

Open complete file

186 return new ChatRequestToolPart(varRange, varEditorRange, name, tool.id, tool.displayName, tool.icon);
187 }
189 > const toolset = toolSetsByName.get(name);
190 > if (toolset) {
191 const value = Array.from(toolset.getTools()).map(t => new ChatRequestToolPart(varRange, varEditorRange, t.toolReferenceName ?? t.displayName, t.id, t.displayName, t.icon).toVariableEntry());
192 return new ChatRequestToolSetPart(varRange, varEditorRange, toolset.id, toolset.referenceName, toolset.icon, value);
193 }
195 > return;
196 }
197
279 private tryToParseDynamicVariable(message: string, offset: number, position: IPosition, references: ReadonlyArray<IDynamicVariable>): ChatRequestDynamicVariablePart | undefined {
280 const refAtThisPosition = references.find(r =>
281 > r.range.startLineNumber === position.lineNumber && chatRequestParser.ts
282 r.range.startColumn === position.column);
283 if (refAtThisPosition) {
284 > const length = refAtThisPosition.range.endColumn - refAtThisPosition.range.startColumn; chatRequestParser.ts
285 > const text = message.substring(0, length);
286 > const range = new OffsetRange(offset, offset + length);
287 > return new ChatRequestDynamicVariablePart(range, refAtThisPosition.range, text, refAtThisPosition.id, refAtThisPosition.modelDescription, refAtThisPosition.data, refAtThisPosition.fullName, refAtThisPosition.icon, refAtThisPosition.isFile, refAtThisPosition.isDirectory, refAtThisPosition._meta, refAtThisPosition.isAttachmentReference);
288 > }
289
290 return;
src/vs/workbench/contrib/chat/common/requestParser/chatParserTypes.ts 6 introduced LOC · 3 ranges

Open complete file

212
213 get referenceText(): string {
214 > return this.text.replace(chatVariableLeader, ''); chatParserTypes.ts
215 > }
216
217 get promptText(): string {
220
221 toVariableEntry(): IChatRequestVariableEntry {
222 > if (this.id === 'vscode.problems') { chatParserTypes.ts
223 return IDiagnosticVariableEntryFilterData.toEntry((this.data as IChatRequestProblemsVariable).filter);
224 }
226 > return { kind: this.isDirectory ? 'directory' : this.isFile ? 'file' : 'generic', id: this.id, name: this.referenceText, range: this.range, value: this.data, fullName: this.fullName, icon: this.icon, _meta: this._meta };
227 > }
228 }
229
src/vs/workbench/contrib/chat/test/common/mockChatVariables.ts 2 introduced LOC · 1 range

Open complete file

24
25 setDynamicVariables(sessionResource: URI, variables: readonly IDynamicVariable[]): void {
26 > this._dynamicVariables.set(sessionResource, variables); mockChatVariables.ts
27 > }
28
29 setSelectedToolAndToolSets(sessionResource: URI, tools: ToolAndToolSetEnablementMap): void {