From 9f27b17f11979e1240f665f090d45cb71f6da285 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Tue, 26 Nov 2024 02:22:05 -0800 Subject: [PATCH] ignore e.stack --- .../contrib/void/browser/react/src/util/ErrorDisplay.tsx | 4 ++-- src/vs/workbench/contrib/void/browser/registerActions.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/ErrorDisplay.tsx b/src/vs/workbench/contrib/void/browser/react/src/util/ErrorDisplay.tsx index fee117cb..8c34f427 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/util/ErrorDisplay.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/util/ErrorDisplay.tsx @@ -15,7 +15,7 @@ import { getCmdKey } from '../../../getCmdKey.js'; type Details = { message: string, name: string, - // stack: string | null, + stack: string | null, cause: string | null, code: string | null, additional: Record @@ -48,7 +48,7 @@ const getErrorDetails = (error: unknown) => { details = { name: e.name || 'Error', message: message, - // stack: e.stack || null, // can we remove this? it looks awful and not sure stack is ever useful + stack: null, // e.stack is ignored because it's ugly and not very useful cause: e.cause ? String(e.cause) : null, code: e.code || null, additional: {} diff --git a/src/vs/workbench/contrib/void/browser/registerActions.ts b/src/vs/workbench/contrib/void/browser/registerActions.ts index 226bbf39..8e5cc561 100644 --- a/src/vs/workbench/contrib/void/browser/registerActions.ts +++ b/src/vs/workbench/contrib/void/browser/registerActions.ts @@ -147,7 +147,7 @@ registerAction2(class extends Action2 { } async run(accessor: ServicesAccessor): Promise { const stateService = accessor.get(IVoidSidebarStateService) - stateService.setState({ isHistoryOpen: false, currentTab: 'settings' }) + stateService.setState({ isHistoryOpen: false, currentTab: stateService.state.currentTab === 'settings' ? 'chat' : 'settings' }) stateService.fireBlurChat() } })