Compare commits

..

1 Commits

Author SHA1 Message Date
Elio Struyf b2787a056a Merge pull request #1021 from estruyf/beta
10.10.0
2026-04-03 10:28:31 +02:00
14 changed files with 43 additions and 158 deletions
+11 -22
View File
@@ -6,14 +6,13 @@ on:
workflow_dispatch:
env:
PACKAGE_NAME: "fm-localized"
MS_URL: "https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-\
front-matter-beta"
VSX_URL: "https://open-vsx.org/extension/eliostruyf/vscode-front-matter-beta"
PACKAGE_NAME: 'fm-localized'
MS_URL: 'https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta'
VSX_URL: 'https://open-vsx.org/extension/eliostruyf/vscode-front-matter-beta'
jobs:
localization:
name: "Localization"
name: 'Localization'
runs-on: ubuntu-latest
steps:
@@ -28,11 +27,11 @@ jobs:
PACKAGE_NAME: ${{ env.PACKAGE_NAME }}
release-ms:
name: "Release to VSCode Marketplace"
name: 'Release to VSCode Marketplace'
runs-on: ubuntu-latest
needs: localization
environment:
name: "MS - BETA"
name: 'MS - BETA'
url: ${{ env.MS_URL }}
steps:
@@ -44,7 +43,7 @@ jobs:
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: "npm"
cache: 'npm'
- name: Install the dependencies
run: npm ci
@@ -53,24 +52,14 @@ jobs:
run: node scripts/beta-release.js $GITHUB_RUN_ID
- name: Publish
run: npx @vscode/vsce publish -p ${{ secrets.VSCE_PAT }} --baseImagesUrl
https://raw.githubusercontent.com/estruyf/vscode-front-matter/dev
- name: Package VSIX
run: npx @vscode/vsce package
- name: Upload VSIX artifact
uses: actions/upload-artifact@v6
with:
name: vscode-demo-time-alpha.vsix
path: "*.vsix"
run: npx @vscode/vsce publish -p ${{ secrets.VSCE_PAT }} --baseImagesUrl https://raw.githubusercontent.com/estruyf/vscode-front-matter/dev
release-vsx:
name: "Release to Open VSX"
name: 'Release to Open VSX'
runs-on: ubuntu-latest
needs: localization
environment:
name: "Open VSX - BETA"
name: 'Open VSX - BETA'
url: ${{ env.VSX_URL }}
steps:
@@ -82,7 +71,7 @@ jobs:
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: "npm"
cache: 'npm'
- name: Install the dependencies
run: npm ci
+2 -5
View File
@@ -6,7 +6,7 @@ src/**
vsc-extension-quickstart.md
**/tsconfig.json
**/tsconfig.e2e.json
**/*.map
**/*.ts
webpack.config.js
node_modules
@@ -29,7 +29,4 @@ webpack
README.beta.md
e2e
storage
pnpm-lock.yaml
.env
tailwind.panel.js
LOCALIZATION.md
pnpm-lock.yaml
-8
View File
@@ -1,13 +1,5 @@
# Change Log
## [10.10.1] - 2026-04-23
### 🐞 Fixes
- [#1023](https://github.com/estruyf/vscode-front-matter/issues/1023): Fix validation errors for image, file, and keywords fields
- [#1024](https://github.com/estruyf/vscode-front-matter/issues/1024): Re-add the `frontMatter.copilot.enabled` setting to allow users to disable the GitHub Copilot integration
- Fix Git detection when Git is configured via VS Code `git.path` and not installed globally on the system
## [10.10.0] - 2026-04-03 - [Release notes](https://beta.frontmatter.codes/updates/v10.10.0)
- Removed the chatbot command and all related code and references
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "vscode-front-matter-beta",
"version": "10.10.1",
"version": "10.10.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "vscode-front-matter-beta",
"version": "10.10.1",
"version": "10.10.0",
"license": "MIT",
"devDependencies": {
"@actions/core": "^1.10.0",
+1 -6
View File
@@ -3,7 +3,7 @@
"displayName": "Front Matter CMS",
"description": "Front Matter is a CMS that runs within Visual Studio Code. It gives you the power and control of a full-blown CMS while also providing you the flexibility and speed of the static site generator of your choice like: Hugo, Jekyll, Docusaurus, NextJs, Gatsby, and many more...",
"icon": "assets/frontmatter-teal-128x128.png",
"version": "10.10.1",
"version": "10.10.0",
"preview": false,
"publisher": "eliostruyf",
"galleryBanner": {
@@ -2128,11 +2128,6 @@
"type": "string",
"default": "gpt-4o-mini",
"markdownDescription": "%setting.frontMatter.copilot.family.markdownDescription%"
},
"frontMatter.copilot.enabled": {
"type": "boolean",
"default": true,
"markdownDescription": "%setting.frontMatter.copilot.enabled.markdownDescription%"
}
}
},
+1 -2
View File
@@ -292,6 +292,5 @@
"setting.frontMatter.git.disableOnBranches.markdownDescription": "Specify the branches on which you want to disable the Git actions. [Docs](https://frontmatter.codes/docs/settings/overview#frontmatter.git.disableonbranches) - [View in VS Code](command:simpleBrowser.show?%5B%22https://frontmatter.codes/docs/settings/overview%23frontmatter.git.disableonbranches%22%5D)",
"setting.frontMatter.git.requiresCommitMessage.markdownDescription": "Specify if you want to require a commit message when publishing your changes for a specified branch. [Docs](https://frontmatter.codes/docs/settings/overview#frontmatter.git.requirescommitmessage) - [View in VS Code](command:simpleBrowser.show?%5B%22https://frontmatter.codes/docs/settings/overview%23frontmatter.git.requirescommitmessage%22%5D)",
"setting.frontMatter.copilot.family.markdownDescription": "Specify the LLM family of the Copilot you want to use. [Docs](https://frontmatter.codes/docs/settings/overview#frontmatter.copilot.family) - [View in VS Code](command:simpleBrowser.show?%5B%22https://frontmatter.codes/docs/settings/overview%23frontmatter.copilot.family%22%5D)",
"setting.frontMatter.copilot.enabled.markdownDescription": "Specify if you want to enable GitHub Copilot AI suggestions (requires GitHub Copilot extension). [Docs](https://frontmatter.codes/docs/settings/overview#frontmatter.copilot.enabled) - [View in VS Code](command:simpleBrowser.show?%5B%22https://frontmatter.codes/docs/settings/overview%23frontmatter.copilot.enabled%22%5D)"
"setting.frontMatter.copilot.family.markdownDescription": "Specify the LLM family of the Copilot you want to use. [Docs](https://frontmatter.codes/docs/settings/overview#frontmatter.copilot.family) - [View in VS Code](command:simpleBrowser.show?%5B%22https://frontmatter.codes/docs/settings/overview%23frontmatter.copilot.family%22%5D)"
}
-1
View File
@@ -117,7 +117,6 @@ export const SETTING_SNIPPETS_WRAPPER = 'snippets.wrapper.enabled';
export const SETTING_WEBSITE_URL = 'website.host';
export const SETTING_COPILOT_FAMILY = 'copilot.family';
export const SETTING_COPILOT_ENABLED = 'copilot.enabled';
export const SETTING_LOGGING = 'logging';
+11 -23
View File
@@ -26,11 +26,11 @@ export interface JSONSchema {
/**
* Generates JSON Schema from Front Matter Content Type definitions
*
*
* This utility converts Front Matter content type definitions into JSON Schema format
* which can then be used for validation. It handles all field types supported by
* Front Matter CMS including nested fields, blocks, and field groups.
*
*
* Field Type Mappings:
* - string, slug, image, file, customField string
* - number number (with optional min/max)
@@ -42,7 +42,7 @@ export interface JSONSchema {
* - block array of objects with oneOf for field groups
* - json any valid JSON type
* - dataFile, contentRelationship string or array
*
*
* Features:
* - Required field validation
* - Type validation
@@ -50,7 +50,7 @@ export interface JSONSchema {
* - Number range validation (min/max)
* - Nested object support
* - Block field support with multiple field group options
*
*
* Usage:
* ```typescript
* const schema = ContentTypeSchemaGenerator.generateSchema(contentType);
@@ -123,18 +123,10 @@ export class ContentTypeSchemaGenerator {
switch (field.type) {
case 'string':
case 'slug':
case 'customField':
schema.type = 'string';
break;
case 'image':
case 'file':
if (field.multiple) {
schema.type = 'array';
schema.items = { type: 'string' };
} else {
schema.type = 'string';
}
case 'customField':
schema.type = 'string';
break;
case 'number':
@@ -181,7 +173,7 @@ export class ContentTypeSchemaGenerator {
schema.items = {
type: 'string'
};
// Get available tags and add as enum for validation
const availableTags = await TaxonomyHelper.get(TaxonomyType.Tag);
if (availableTags && availableTags.length > 0) {
@@ -195,7 +187,7 @@ export class ContentTypeSchemaGenerator {
schema.items = {
type: 'string'
};
// Get available categories and add as enum for validation
const availableCategories = await TaxonomyHelper.get(TaxonomyType.Category);
if (availableCategories && availableCategories.length > 0) {
@@ -209,7 +201,7 @@ export class ContentTypeSchemaGenerator {
schema.items = {
type: 'string'
};
// Get custom taxonomy options if taxonomyId is specified
if (field.taxonomyId) {
const customTaxonomies = Settings.get<CustomTaxonomy[]>(SETTING_TAXONOMY_CUSTOM);
@@ -315,9 +307,7 @@ export class ContentTypeSchemaGenerator {
* @param choices Array of choice strings or objects
* @returns Array of choice values
*/
private static extractChoiceValues(
choices: (string | { id?: string | null; title: string })[]
): string[] {
private static extractChoiceValues(choices: (string | { id?: string | null; title: string })[]): string[] {
return choices.map((choice) => {
if (typeof choice === 'string') {
return choice;
@@ -340,9 +330,7 @@ export class ContentTypeSchemaGenerator {
}
const fieldGroupIds = Array.isArray(field.fieldGroup) ? field.fieldGroup : [field.fieldGroup];
const fieldGroups = Settings.get(SETTING_TAXONOMY_FIELD_GROUPS) as
| { id: string; fields: Field[] }[]
| undefined;
const fieldGroups = Settings.get(SETTING_TAXONOMY_FIELD_GROUPS) as { id: string; fields: Field[] }[] | undefined;
if (!fieldGroups || fieldGroups.length === 0) {
return schemas;
+1 -3
View File
@@ -1,8 +1,7 @@
import {
SETTING_GLOBAL_TIMEZONE,
SETTING_PANEL_ACTIONS_DISABLED,
SETTING_WEBSITE_URL,
SETTING_COPILOT_ENABLED
SETTING_WEBSITE_URL
} from './../constants/settings';
import { workspace } from 'vscode';
import { ContentType, Extension, Logger, Settings, TaxonomyHelper } from '.';
@@ -52,7 +51,6 @@ export class PanelSettings {
try {
return {
aiEnabled: Settings.get<boolean>(SETTING_COPILOT_ENABLED) !== false,
copilotEnabled: await Copilot.isInstalled(),
git: await GitListener.getSettings(),
seo: {
+1 -5
View File
@@ -1,10 +1,8 @@
import { QuickPickItem, QuickPickItemKind, window } from 'vscode';
import { Folders } from '../commands/Folders';
import { SETTING_COPILOT_ENABLED } from '../constants';
import { ContentType } from './ContentType';
import { Notifications } from './Notifications';
import { Logger } from './Logger';
import { Settings } from './SettingsHelper';
import * as l10n from '@vscode/l10n';
import { LocalizationKey } from '../localization';
import { ContentFolder } from '../models';
@@ -39,14 +37,12 @@ export class Questions {
* @returns
*/
public static async ContentTitle(showWarning = true): Promise<string | undefined> {
const copilotEnabled = Settings.get<boolean>(SETTING_COPILOT_ENABLED) !== false;
let title: string | undefined = '';
const isCopilotInstalled = await Copilot.isInstalled();
let aiTitles: string[] | undefined;
// Only show AI suggestions if both the setting is enabled and Copilot is installed
if (copilotEnabled && isCopilotInstalled) {
if (isCopilotInstalled) {
title = await window.showInputBox({
title: l10n.t(LocalizationKey.helpersQuestionsContentTitleAiInputTitle),
prompt: l10n.t(LocalizationKey.helpersQuestionsContentTitleAiInputPrompt),
+12 -38
View File
@@ -26,7 +26,7 @@ import {
import { GeneralCommands } from './../../constants/GeneralCommands';
import simpleGit, { SimpleGit } from 'simple-git';
import { Folders } from '../../commands/Folders';
import { Event, commands, extensions, workspace } from 'vscode';
import { Event, commands, extensions } from 'vscode';
import { GitAPIState, GitRepository, PostMessageData } from '../../models';
import * as l10n from '@vscode/l10n';
import { LocalizationKey } from '../../localization';
@@ -69,21 +69,16 @@ export class GitListener {
const gitActions = Settings.get<boolean>(SETTING_GIT_ENABLED);
if (gitActions) {
Logger.verbose('GitListener:getSettings:end:enabled');
try {
return {
isGitRepo: gitActions ? await GitListener.isGitRepository() : false,
actions: gitActions || false,
disabledBranches: gitActions
? Settings.get<string[]>(SETTING_GIT_DISABLED_BRANCHES) || []
: [],
requiresCommitMessage: gitActions
? Settings.get<string[]>(SETTING_GIT_REQUIRES_COMMIT_MSG) || []
: []
};
} catch (e) {
Logger.error((e as Error).message);
return;
}
return {
isGitRepo: gitActions ? await GitListener.isGitRepository() : false,
actions: gitActions || false,
disabledBranches: gitActions
? Settings.get<string[]>(SETTING_GIT_DISABLED_BRANCHES) || []
: [],
requiresCommitMessage: gitActions
? Settings.get<string[]>(SETTING_GIT_REQUIRES_COMMIT_MSG) || []
: []
};
}
Logger.verbose('GitListener:getSettings:end:disabled');
@@ -343,7 +338,7 @@ export class GitListener {
const options = {
baseDir: submoduleFolder || wsFolder?.fsPath || '',
binary: GitListener.getGitBinary(),
binary: 'git',
maxConcurrentProcesses: 6
};
@@ -356,27 +351,6 @@ export class GitListener {
}
}
/**
* Resolves the Git binary path from VS Code settings.
* Falls back to the default `git` command when no custom path is configured.
*/
private static getGitBinary(): string {
const gitPath = workspace.getConfiguration('git').get<string | string[]>('path');
if (Array.isArray(gitPath)) {
const firstValidPath = gitPath.find((path) => typeof path === 'string' && path.trim());
if (firstValidPath) {
return firstValidPath;
}
}
if (typeof gitPath === 'string' && gitPath.trim()) {
return gitPath;
}
return 'git';
}
/**
* Initializes the VS Code Git provider and sets up event listeners for repository changes.
* @returns {Promise<void>} A promise that resolves when the Git provider is initialized.
+1 -26
View File
@@ -26,8 +26,7 @@ import {
SETTING_DATE_FORMAT,
SETTING_GLOBAL_ACTIVE_MODE,
SETTING_GLOBAL_MODES,
SETTING_TAXONOMY_CONTENT_TYPES,
SETTING_COPILOT_ENABLED
SETTING_TAXONOMY_CONTENT_TYPES
} from '../../constants';
import { Article, Preview } from '../../commands';
import { FrontMatterParser, ParsedFrontMatter } from '../../parsers';
@@ -125,15 +124,6 @@ export class DataListener extends BaseListener {
return;
}
// Check if Copilot is enabled and installed
const copilotEnabled = Settings.get<boolean>(SETTING_COPILOT_ENABLED) !== false;
const isCopilotInstalled = await Copilot.isInstalled();
if (!copilotEnabled || !isCopilotInstalled) {
this.sendRequestError(command, requestId, 'Copilot is not enabled or installed');
return;
}
const aiTitles = await Copilot.suggestTitles(title);
title = await Questions.pickTitleSuggestions(title, aiTitles || [], true);
@@ -155,21 +145,6 @@ export class DataListener extends BaseListener {
return;
}
// Check if Copilot is enabled and installed
const copilotEnabled = Settings.get<boolean>(SETTING_COPILOT_ENABLED) !== false;
const isCopilotInstalled = await Copilot.isInstalled();
if (!copilotEnabled || !isCopilotInstalled) {
const extPath = Extension.getInstance().extensionPath;
const panel = PanelProvider.getInstance(extPath);
panel.getWebview()?.postMessage({
command,
requestId,
error: l10n.t(LocalizationKey.servicesCopilotGetChatResponseError)
} as MessageHandlerData<string>);
return;
}
const article = ArticleHelper.getActiveFile();
if (!article) {
return;
-16
View File
@@ -4,7 +4,6 @@ import { BaseListener } from './BaseListener';
import { authentication, window } from 'vscode';
import { ArticleHelper, Extension, Settings, TaxonomyHelper } from '../../helpers';
import { BlockFieldData, CustomTaxonomyData, PostMessageData, TaxonomyType } from '../../models';
import { SETTING_COPILOT_ENABLED } from '../../constants';
import { DataListener } from '.';
import { SettingsListener as PanelSettingsListener } from '.';
import { SettingsListener as DashboardSettingsListener } from '../dashboard';
@@ -85,21 +84,6 @@ export class TaxonomyListener extends BaseListener {
return;
}
// Check if Copilot is enabled and installed
const copilotEnabled = Settings.get<boolean>(SETTING_COPILOT_ENABLED) !== false;
const isCopilotInstalled = await Copilot.isInstalled();
if (!copilotEnabled || !isCopilotInstalled) {
const extPath = Extension.getInstance().extensionPath;
const panel = PanelProvider.getInstance(extPath);
panel.getWebview()?.postMessage({
command,
requestId,
error: l10n.t(LocalizationKey.servicesCopilotGetChatResponseError)
} as MessageHandlerData<string[]>);
return;
}
const article = ArticleHelper.getActiveFile();
if (!article) {
return;
-1
View File
@@ -28,7 +28,6 @@ export interface PanelSettings {
dataTypes: DataType[] | undefined;
fieldGroups: FieldGroup[] | undefined;
commaSeparatedFields: string[];
aiEnabled: boolean;
copilotEnabled: boolean;
contentFolders: ContentFolder[];
websiteUrl: string;