chatErrorMessages.ts ×5

Frontier kind: Joint frontier

unlabeled · c_e538f7260d6e

1 test · 20756 LOC · 110 files · introduces 1 test · 14 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges14 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
2393 ranges20756 lines · 110 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: 14 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/chat/common/chatErrorMessages.ts 14 introduced LOC · 5 ranges

Open complete file

246
247 export function getFilteredMessage(category: FilterReason | string, supportsMarkdown: boolean = true): string {
248 > switch (category) { chatErrorMessages.ts
249 > case FilterReason.Copyright:
250 > if (supportsMarkdown) {
251 > return localize({ key: 'chatError.filtered.copyrightMd', comment: [`{Locked='](https://aka.ms/copilot-chat-filtered-docs)'}`] }, "Sorry, the response matched public code so it was blocked. Please rephrase your prompt. [Learn more]({0}).", FILTERED_DOCS_URL);
252 > }
253 return localize('chatError.filtered.copyright', "Sorry, the response matched public code so it was blocked. Please rephrase your prompt.");
254 > case FilterReason.Prompt: chatErrorMessages.ts
255 if (supportsMarkdown) {
256 return localize({ key: 'chatError.filtered.promptMd', comment: [`{Locked='](https://aka.ms/copilot-chat-filtered-docs)'}`] }, "Sorry, your prompt was filtered by the Responsible AI Service. Please rephrase your prompt and try again. [Learn more]({0}).", FILTERED_DOCS_URL);
257 }
258 return localize('chatError.filtered.prompt', "Sorry, your prompt was filtered by the Responsible AI Service. Please rephrase your prompt and try again.");
259 > default: chatErrorMessages.ts
260 if (supportsMarkdown) {
261 return localize({ key: 'chatError.filtered.defaultMd', comment: [`{Locked='](https://aka.ms/copilot-chat-filtered-docs)'}`] }, "Sorry, the response was filtered by the Responsible AI Service. Please rephrase your prompt and try again. [Learn more]({0}).", FILTERED_DOCS_URL);
262 }
263 return localize('chatError.filtered.default', "Sorry, the response was filtered by the Responsible AI Service. Please rephrase your prompt and try again.");
265 > }
266
267 /**
305 case ChatFetchResponseType.Filtered:
306 case ChatFetchResponseType.PromptFiltered:
307 > return { chatErrorMessages.ts
308 > message: getFilteredMessage(fetchError.category ?? ''),
309 > responseIsFiltered: true,
310 > level: ChatErrorLevel.Info,
311 > };
312 case ChatFetchResponseType.AgentUnauthorized:
313 return { message: localize('chatError.somethingWrong', "Sorry, something went wrong.") };