Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix: when the document filetype is agent/plan, not show the saveinto docs button (#11227)

Shinji-Li3a22f32c878d
diff --git a/src/features/Portal/Document/Header.tsx b/src/features/Portal/Document/Header.tsx
index 6920c013ca2..1e6a060fde8 100644
--- a/src/features/Portal/Document/Header.tsx
+++ b/src/features/Portal/Document/Header.tsx
@@ -61,15 +61,17 @@ const Header = () => {
</Flexbox>
<Flexbox align={'center'} gap={8} horizontal>
<AutoSaveHint />
- <Button
- icon={<ExternalLink size={14} />}
- loading={loading}
- onClick={handleOpenInPageEditor}
- size={'small'}
- type={'text'}
- >
- {t('openInPageEditor')}
- </Button>
+ {document.fileType !== 'agent/plan' && (
+ <Button
+ icon={<ExternalLink size={14} />}
+ loading={loading}
+ onClick={handleOpenInPageEditor}
+ size={'small'}
+ type={'text'}
+ >
+ {t('openInPageEditor')}
+ </Button>
+ )}
</Flexbox>
</Flexbox>
);