fix(vscode): wire native notifications from runtime events

This commit is contained in:
Bohdan Triapitsyn
2026-02-24 13:18:48 +02:00
parent 5ab9b1a96e
commit 69c5bbf99a
7 changed files with 192 additions and 28 deletions
@@ -127,7 +127,7 @@ export const NotificationSettings: React.FC = () => {
}
};
const canShowNotifications = isDesktop || (isBrowser && typeof Notification !== 'undefined' && Notification.permission === 'granted');
const canShowNotifications = isDesktop || isVSCode || (isBrowser && typeof Notification !== 'undefined' && Notification.permission === 'granted');
const updateTemplate = (
event: 'completion' | 'error' | 'question' | 'subtask',
@@ -489,7 +489,7 @@ export const NotificationSettings: React.FC = () => {
{isVSCode && (
<div className="mt-1 px-2">
<p className="typography-meta text-muted-foreground/70">
VS Code runtime handles notifications separately natively.
When enabled, notifications are delivered through VS Code native notifications.
</p>
</div>
)}
@@ -173,7 +173,7 @@ export const OpenChamberVisualSettings: React.FC<OpenChamberVisualSettingsProps>
const hasLayoutSettings = shouldShow('fontSize') || shouldShow('terminalFontSize') || shouldShow('spacing') || shouldShow('cornerRadius') || shouldShow('inputBarOffset');
const hasBehaviorSettings = shouldShow('toolOutput')
|| shouldShow('diffLayout')
|| shouldShow('mobileStatusBar')
|| (shouldShow('mobileStatusBar') && isMobile)
|| shouldShow('dotfiles')
|| shouldShow('reasoning')
|| shouldShow('queueMode')
@@ -548,9 +548,9 @@ export const OpenChamberVisualSettings: React.FC<OpenChamberVisualSettingsProps>
</section>
)}
{(shouldShow('mobileStatusBar') || shouldShow('dotfiles') || shouldShow('queueMode') || shouldShow('persistDraft') || shouldShow('reasoning') || shouldShow('textJustificationActivity')) && (
{((shouldShow('mobileStatusBar') && isMobile) || shouldShow('dotfiles') || shouldShow('queueMode') || shouldShow('persistDraft') || shouldShow('reasoning') || shouldShow('textJustificationActivity')) && (
<section className="p-2 space-y-0.5">
{shouldShow('mobileStatusBar') && (
{shouldShow('mobileStatusBar') && isMobile && (
<div
className="group flex cursor-pointer items-center gap-2 py-1.5"
role="button"
@@ -257,6 +257,7 @@ export const SettingsView: React.FC<SettingsViewProps> = ({ onClose, forceMobile
return SETTINGS_PAGE_METADATA
.filter((page) => page.slug !== 'home')
.filter((page) => isPageAvailable(page, runtimeCtx))
.filter((page) => !(runtimeCtx.isVSCode && page.slug === 'projects'))
.filter((page) => !(isMobile && page.slug === 'shortcuts'));
}, [runtimeCtx, isMobile]);