Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## 16.78.0

- New AL Symbols Browser language model tool for GitHub Copilot integration - allows AI assistants to search and browse AL project symbols (tables, pages, codeunits, etc.) with filtering, dependency inclusion, and source code resolution
- VS Code engine minimum version bumped to 1.95.0
- Tree view icon paths fixed to use vscode.Uri (warning directives, duplicate code, AL outline)
- Issues #652, #653, #654, #655 - BC27 fixes

Thank you
Expand Down
19 changes: 12 additions & 7 deletions vscode-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 74 additions & 5 deletions vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "16.78.0",
"publisher": "andrzejzwierzchowski",
"engines": {
"vscode": "^1.85.0"
"vscode": "^1.95.0"
},
"author": {
"name": "Andrzej Zwierzchowski",
Expand Down Expand Up @@ -1401,17 +1401,86 @@
]
}
],
"languageModelTools": [
{
"name": "azALDevTools_symbolsBrowser",
"displayName": "AL Symbols Browser",
"toolReferenceName": "alSymbolsBrowser",
"icon": "$(symbol-class)",
"canBeReferencedInPrompt": true,
"modelDescription": "Search and browse AL (Business Central) project symbols such as tables, pages, codeunits, reports, queries, xmlports, enums, interfaces, and extensions. Supports wildcard name filtering (e.g. *Customer*), filtering by symbol kind, and optionally including dependency symbols and child members. Returns a formatted list of matching AL objects with their kind, id, name, source, and optionally their fields, methods, triggers, and other child elements.",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Wildcard name filter to match symbol names, e.g. '*Customer*', '*Item*', 'Sales*'. Use * for any characters, ? for a single character."
},
"symbolKind": {
"type": "string",
"description": "Filter by AL object kind. Use 'all' or omit to return all kinds.",
"enum": [
"all",
"table",
"page",
"codeunit",
"report",
"query",
"xmlport",
"enum",
"interface",
"tableExtension",
"pageExtension",
"enumExtension",
"reportExtension",
"permissionSet",
"permissionSetExtension",
"profile",
"pageCustomization",
"controlAddIn",
"dotNetPackage",
"entitlement"
]
},
"includeDependencies": {
"type": "boolean",
"default": true,
"description": "Whether to include symbols from dependency apps. Defaults to true."
},
"includeBody": {
"type": "boolean",
"default": false,
"description": "Whether to include child members (fields, methods, triggers, etc.) in the output. Defaults to false."
},
"includeSourceCode": {
"type": "boolean",
"default": false,
"description": "Whether to resolve and return the full AL source code for each matched symbol. Works for project files and dependency .app packages. Defaults to false."
},
"maxResults": {
"type": "number",
"default": 50,
"description": "Maximum number of symbols to return. Defaults to 50."
},
"workspaceFolderPath": {
"type": "string",
"description": "Absolute path to the AL workspace folder. If omitted, uses the current active workspace folder."
}
}
}
}
],
"configuration": [
{
"title": "AZ AL Dev Tools/AL Code Outline",
"properties": {
"alOutline.activeBuildConfiguration" : {
"alOutline.activeBuildConfiguration": {
"type": "string",
"default": "",
"scope": "resource",
"description": "Name of the active build configuration (active app.json file) for the workspace folder"
},
"alOutline.buildConfigurationNaming" : {
"alOutline.buildConfigurationNaming": {
"type": "string",
"default": "none",
"scope": "resource",
Expand All @@ -1429,7 +1498,7 @@
"app.json.<configuration name>"
]
},
"alOutline.limitEnumNameLength" : {
"alOutline.limitEnumNameLength": {
"type": "boolean",
"default": false,
"scope": "resource",
Expand Down Expand Up @@ -2184,7 +2253,7 @@
"devDependencies": {
"@types/mocha": "^10.0.6",
"@types/node": "18.x",
"@types/vscode": "^1.85.0",
"@types/vscode": "^1.95.0",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"@vscode/test-cli": "^0.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class WarningDirectivesTreeProvider implements vscode.TreeDataProvider<Wa
return directives;
}

private getNodeIcon(info: WarningDirectiveInfo) : { light: string, dark: string } | undefined {
private getNodeIcon(info: WarningDirectiveInfo) : { light: vscode.Uri, dark: vscode.Uri } | undefined {
switch (info.kind) {
case WarningDirectiveInfoKind.Project:
return this.getIcon("tree-project.svg");
Expand All @@ -70,10 +70,10 @@ export class WarningDirectivesTreeProvider implements vscode.TreeDataProvider<Wa
return undefined;
}

private getIcon(fileName: string) : { light: string, dark: string } {
private getIcon(fileName: string) : { light: vscode.Uri, dark: vscode.Uri } {
return {
light: this._toolsExtensionContext.vscodeExtensionContext.asAbsolutePath(path.join("resources", "images", "light", fileName)),
dark: this._toolsExtensionContext.vscodeExtensionContext.asAbsolutePath(path.join("resources", "images", "dark", fileName))
light: vscode.Uri.file(this._toolsExtensionContext.vscodeExtensionContext.asAbsolutePath(path.join("resources", "images", "light", fileName))),
dark: vscode.Uri.file(this._toolsExtensionContext.vscodeExtensionContext.asAbsolutePath(path.join("resources", "images", "dark", fileName)))
};
}

Expand Down
5 changes: 5 additions & 0 deletions vscode-extension/src/devToolsExtensionContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { IdReservationService } from './services/idReservationService';
import { ALDecorationService } from './services/alDecorationService';
import { GitClientService } from './services/gitClientService';
import { ALBuildConfigurationService } from './configmanager/ALBuildConfigurationService';
import { ALSymbolsBrowserTool } from './services/alSymbolsBrowserTool';

export class DevToolsExtensionContext implements vscode.Disposable {
alLangProxy : ALLangServerProxy;
Expand Down Expand Up @@ -88,6 +89,10 @@ export class DevToolsExtensionContext implements vscode.Disposable {
this.alDecorationService = new ALDecorationService(this);
this.gitService = new GitClientService(this);
this.buildConfigurationService = new ALBuildConfigurationService(this);

if (vscode.lm && vscode.lm.registerTool) {
context.subscriptions.push(vscode.lm.registerTool('azALDevTools_symbolsBrowser', new ALSymbolsBrowserTool(this)));
}
}

getUseSymbolsBrowser() : boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class DuplicateCodeTreeProvider implements vscode.TreeDataProvider<Duplic
return 'Code';
}

protected getGroupIcon(info: DuplicateInfo): { light: string, dark: string } {
protected getGroupIcon(info: DuplicateInfo): { light: vscode.Uri, dark: vscode.Uri } {
switch (info.codeBlockType) {
case CodeBlockType.Method:
return this.getIcon('tree-method.svg');
Expand Down Expand Up @@ -152,10 +152,10 @@ export class DuplicateCodeTreeProvider implements vscode.TreeDataProvider<Duplic
return undefined;
}

private getIcon(fileName: string) : { light: string, dark: string } {
private getIcon(fileName: string) : { light: vscode.Uri, dark: vscode.Uri } {
return {
light: this._toolsExtensionContext.vscodeExtensionContext.asAbsolutePath(path.join("resources", "images", "light", fileName)),
dark: this._toolsExtensionContext.vscodeExtensionContext.asAbsolutePath(path.join("resources", "images", "dark", fileName))
light: vscode.Uri.file(this._toolsExtensionContext.vscodeExtensionContext.asAbsolutePath(path.join("resources", "images", "light", fileName))),
dark: vscode.Uri.file(this._toolsExtensionContext.vscodeExtensionContext.asAbsolutePath(path.join("resources", "images", "dark", fileName)))
};
}

Expand Down
4 changes: 2 additions & 2 deletions vscode-extension/src/outlineview/alOutlineTreeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export class ALOutlineTreeItem extends vscode.TreeItem {
private updateIcon(context: vscode.ExtensionContext) {
let icon = "tree-" + this.symbol.icon + ".svg";
this.iconPath = {
light: context.asAbsolutePath(path.join("resources", "images", "light", icon)),
dark: context.asAbsolutePath(path.join("resources", "images", "dark", icon))
light: vscode.Uri.file(context.asAbsolutePath(path.join("resources", "images", "light", icon))),
dark: vscode.Uri.file(context.asAbsolutePath(path.join("resources", "images", "dark", icon)))
}
}

Expand Down
Loading