Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
import { jsx, css } from '@emotion/core';
import formatMessage from 'format-message';

import { useAutoFix } from './useAutoFix';
import { useDiagnosticsStatistics } from './useDiagnostics';

export const DiagnosticsHeader = () => {
const { hasError, hasWarning } = useDiagnosticsStatistics();
useAutoFix();

return (
<div
Expand Down

This file was deleted.

5 changes: 0 additions & 5 deletions Composer/packages/client/src/pages/diagnostics/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export enum DiagnosticType {
SKILL,
SETTING,
GENERAL,
SCHEMA,
}

export interface IDiagnosticInfo {
Expand Down Expand Up @@ -95,10 +94,6 @@ export class DialogDiagnostic extends DiagnosticInfo {
};
}

export class SchemaDiagnostic extends DialogDiagnostic {
type = DiagnosticType.SCHEMA;
}

export class SkillSettingDiagnostic extends DiagnosticInfo {
type = DiagnosticType.SKILL;
constructor(rootProjectId: string, projectId: string, id: string, location: string, diagnostic: Diagnostic) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { BotIndexer, validateSchema } from '@bfc/indexers';
import { BotIndexer } from '@bfc/indexers';
import { selectorFamily, selector } from 'recoil';
import lodashGet from 'lodash/get';
import formatMessage from 'format-message';
Expand All @@ -18,7 +18,6 @@ import {
BotDiagnostic,
SettingDiagnostic,
SkillSettingDiagnostic,
SchemaDiagnostic,
} from '../../pages/diagnostics/types';
import {
botDiagnosticsState,
Expand Down Expand Up @@ -177,30 +176,7 @@ export const dialogsDiagnosticsSelectorFamily = selectorFamily({
});
});

return diagnosticList;
},
});

export const schemaDiagnosticsSelectorFamily = selectorFamily({
key: 'schemaDiagnosticsSelectorFamily',
get: (projectId: string) => ({ get }) => {
const botAssets = get(botAssetsSelectFamily(projectId));
// Why botAssets.dialogSchemas is a list?
if (botAssets === null) return [];

const rootProjectId = get(rootBotProjectIdSelector) ?? projectId;

const sdkSchemaContent = botAssets.dialogSchemas[0]?.content;
if (!sdkSchemaContent) return [];

const fullDiagnostics: DiagnosticInfo[] = [];
botAssets.dialogs.forEach((dialog) => {
const diagnostics = validateSchema(dialog.id, dialog.content, sdkSchemaContent);
fullDiagnostics.push(
...diagnostics.map((d) => new SchemaDiagnostic(rootProjectId, projectId, dialog.id, `${dialog.id}.dialog`, d))
);
});
return fullDiagnostics;
return [];
},
});

Expand Down Expand Up @@ -281,7 +257,6 @@ export const diagnosticsSelectorFamily = selectorFamily({
...get(luDiagnosticsSelectorFamily(projectId)),
...get(lgDiagnosticsSelectorFamily(projectId)),
...get(qnaDiagnosticsSelectorFamily(projectId)),
...get(schemaDiagnosticsSelectorFamily(projectId)),
],
});

Expand Down

This file was deleted.

This file was deleted.

Loading