Add page data delivery and publication guards

This commit is contained in:
john
2026-07-08 21:10:47 +08:00
parent 8d629e7a4e
commit eea14c1855
66 changed files with 3035 additions and 413 deletions
+4 -2
View File
@@ -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}