/** Safely extract a string value from an SDK field that may be `unknown` at runtime. */
return typeof value === 'string' ? value : undefined;
}
/**
Frontier kind: Code frontier
unlabeled · c_22c3f0e58dc3
31 tests · 18281 LOC · 67 files · introduces 0 tests · 29 LOC · 1 file
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.
Every exact file and test below is linked only from the concept that introduces it.
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/copilotAgentSession.test|title=CopilotAgentSession permission handling read permission fires tool_ready (deferred to side effects)|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/copilotAgentSession.test|title=CopilotAgentSession permission handling read permission outside working directory fires tool_ready|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/copilotAgentSession.test|title=CopilotAgentSession permission handling write permission fires tool_ready (deferred to side effects)|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/copilotAgentSession.test|title=CopilotAgentSession permission handling write permission outside working directory fires tool_ready|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/copilotAgentSession.test|title=CopilotAgentSession permission handling does not auto-approve session-state files from another session|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/copilotAgentSession.test|title=CopilotAgentSession permission handling does not auto-approve write to a tool-output temp path|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/common/commandLineHelpers.test|title=stripRedundantCdPrefix matches backslash extracted dir against backslash native wd on Windows|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/common/commandLineHelpers.test|title=stripRedundantCdPrefix matches mixed path separators (forward-slash extracted vs native fsPath wd)|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1Every collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 29 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
/** Safely extract a string value from an SDK field that may be `unknown` at runtime. */
return typeof value === 'string' ? value : undefined;
}
/**
*/
export function getPermissionDisplay(request: ITypedPermissionRequest, workingDirectory?: URI, isNewFile?: boolean): {
invocationMessage: StringOrMarkdown;
toolInput?: string;
/** Normalized permission kind for auto-approval routing. */
permissionKind: IAgentToolPendingConfirmationSignal['permissionKind'];
/** File path extracted from the request. */
permissionPath?: string;
} {
const path = str(request.path) ?? str(request.fileName);
const fullCommandText = str(request.fullCommandText);
const intention = str(request.intention);
const serverName = str(request.serverName);
const toolName = str(request.toolName);
const shellConfirmationTitle = request.requestSandboxBypass
? localize('copilot.permission.shell.bypass.title', "Run in terminal outside the sandbox?")
: localize('copilot.permission.shell.title', "Run in terminal?");
switch (request.kind) {
case 'shell': {
// Strip a redundant `cd <workingDirectory> && …` prefix so the
// confirmation dialog shows the simplified command.
};
}
// Custom tool overrides (e.g. our shell tool). Extract the actual
// tool args from the SDK's wrapper envelope.
};
}
const toolName = isNewFile ? CopilotToolName.Create : CopilotToolName.Edit;
return {
};
}
const title = toolName ?? localize('copilot.permission.mcp.defaultTool', "MCP Tool");
return {
};
}
return {
confirmationTitle: localize('copilot.permission.read.title', "Allow reading file outside of workspace?"),
permissionPath: path,
};
const url = str(request.url);
// Parse through URL for punycode escaping, but preserve the raw value if parsing fails.
};
}
return {
confirmationTitle: localize('copilot.permission.default.title', "Allow tool call?"),