Add page data delivery and publication guards
This commit is contained in:
@@ -325,7 +325,9 @@ export function ChatPanel({
|
||||
const offlineBlocked = !online;
|
||||
const publishSkillName = user?.publishSkillName ?? 'static-page-publish';
|
||||
const hasPublishSkill = grantedSkills?.includes(publishSkillName) ?? false;
|
||||
const canPublish = Boolean(capabilities?.static_publish) || hasPublishSkill;
|
||||
const hasPageDataCollectSkill = grantedSkills?.includes('page-data-collect') ?? false;
|
||||
const canPublish =
|
||||
Boolean(capabilities?.static_publish) || hasPublishSkill || hasPageDataCollectSkill;
|
||||
const chatSkills = filterChatSkills(CHAT_SKILL_OPTIONS, { grantedSkills, canPublish });
|
||||
const compact = variant === 'compact';
|
||||
const showHomeWelcome = !compact && messages.length === 0;
|
||||
@@ -848,7 +850,7 @@ export function ChatPanel({
|
||||
stopSignal={voiceStopSignal}
|
||||
/>
|
||||
</div>
|
||||
{!showHomeWelcome && chatSkills.length > 0 && (
|
||||
{chatSkills.length > 0 && (
|
||||
<ChatSkillPicker
|
||||
skills={chatSkills}
|
||||
disabled={voiceDisabled}
|
||||
|
||||
Reference in New Issue
Block a user