agentCustomizationMeta.ts ×2

Frontier kind: Code frontier

unlabeled · c_099b2495e7b2

188 tests · 10370 LOC · 38 files · introduces 0 tests · 36 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
2 ranges36 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
641 ranges10370 lines · 38 files · Browse complete extent
All tests (intent)
188 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: 36 introduced LOC across 2 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/common/meta/agentCustomizationMeta.ts 36 introduced LOC · 2 ranges

Open complete file

1 > /*--------------------------------------------------------------------------------------------- agentCustomizationMeta.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import type { Mutable } from '../../../../base/common/types.js';
7 > import type { AgentCustomization } from '../state/protocol/state.js';
8 >
9 > /**
10 > * Well-known typed view over a custom agent's `_meta` bag (see
11 > * `AgentCustomization._meta`), populated by the host's customization discovery
12 > * and read by the agents-window customization providers. Read it through
13 > * {@link readAgentCustomizationMeta} rather than indexing `_meta` directly.
14 > */
15 > export interface IAgentCustomizationMeta {
16 > /**
17 > * Whether the user may invoke this custom agent directly (e.g. from the
18 > * agent picker). Absent is treated as `true` by convention — only an
19 > * explicit `false` hides the agent from direct user invocation.
20 > */
21 > readonly userInvocable?: boolean;
22 > }
23 >
24 > /**
25 > * Reads the well-known {@link IAgentCustomizationMeta} keys from a custom
26 > * agent's `_meta` bag, dropping unknown keys and wrong-typed values.
27 > */
28 > export function readAgentCustomizationMeta(agent: AgentCustomization): IAgentCustomizationMeta {
29 const meta = agent._meta;
30 if (!meta) {
37 return result;
38 }
40 > /**
41 > * Serializes a typed {@link IAgentCustomizationMeta} into the `_meta` record,
42 > * dropping `undefined` entries and returning `undefined` when empty. Build a
43 > * custom agent's `_meta` through this so producers stay in lock-step with
44 > * {@link readAgentCustomizationMeta}.
45 > */
46 > export function toAgentCustomizationMeta(meta: IAgentCustomizationMeta): Record<string, unknown> | undefined {
47 const result: Record<string, unknown> = {};
48 for (const [key, value] of Object.entries(meta)) {