fix assistant automatic approvals
This commit is contained in:
1 parent
8f81de775e
commit
9e0a6a758f
16 files changed
+403
-78
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import type { AssistantBoardSettingsChanges } from "./assistant-tool-contracts";
|
||||
import type { AssistantBoardSettingsChanges, ConfigureBoardSettingsResult } from "./assistant-tool-contracts";
|
||||
|
||||
export const assistantBoardSettingKeys = [
|
||||
"pageTitle",
|
||||
@@ -27,6 +27,15 @@ export const getChangedBoardSettings = (current: AssistantBoardSettingsChanges,
|
||||
),
|
||||
) as AssistantBoardSettingsChanges;
|
||||
|
||||
export const getAssistantBoardSettingsResult = (
|
||||
id: string,
|
||||
current: AssistantBoardSettingsChanges,
|
||||
next: AssistantBoardSettingsChanges,
|
||||
): ConfigureBoardSettingsResult => {
|
||||
const changes = getChangedBoardSettings(current, next);
|
||||
return Object.keys(changes).length === 0 ? { id, cancelled: true } : { id, ...changes };
|
||||
};
|
||||
|
||||
export const getCustomCssWarnings = (css: string) => ({
|
||||
importsStylesheet: /@import\b/iu.test(css),
|
||||
loadsRemoteResource: /url\(\s*["']?https?:\/\//iu.test(css),
|
||||
|
||||
Reference in new issue
Block a user